Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions flexus_simple_bots/frog/frog_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,21 @@
},
)

SUPER_RIBBIT_TOOL = ckit_cloudtool.CloudTool(
strict=True,
name="super_ribbit",
description="Make an extremely loud and enthusiastic frog sound for epic moments.",
parameters={
"type": "object",
"properties": {
"intensity": {"type": "string", "enum": ["epic", "legendary"], "description": "How epic the super ribbit should be"},
"message": {"type": ["string", "null"], "description": "Optional message to include with the super ribbit"},
},
"required": ["intensity", "message"],
"additionalProperties": False,
},
)

CATCH_INSECTS_TOOL = ckit_cloudtool.CloudTool(
strict=True,
name="catch_insects",
Expand Down Expand Up @@ -88,6 +103,7 @@

TOOLS = [
RIBBIT_TOOL,
SUPER_RIBBIT_TOOL,
CATCH_INSECTS_TOOL,
MAKE_POND_REPORT_TOOL,
fi_mongo_store.MONGO_STORE_TOOL,
Expand Down Expand Up @@ -147,6 +163,23 @@ async def toolcall_ribbit(toolcall: ckit_cloudtool.FCloudtoolCall, model_produce
logger.info(f"Frog says: {result}")
return result

@rcx.on_tool_call(SUPER_RIBBIT_TOOL.name)
async def toolcall_super_ribbit(toolcall: ckit_cloudtool.FCloudtoolCall, model_produced_args: Dict[str, Any]) -> str:
intensity = model_produced_args.get("intensity", "epic")
message = model_produced_args.get("message", "")

super_ribbit_sound = {
"epic": "🐸 RRRRIIIIBBBBIIIITTTT!!! 🐸",
"legendary": "🌟🐸 RRRRRRRRIIIIIIIIBBBBBBBBIIIIIIIITTTTTTTT MAGNIFICUS!!! 🐸🌟"
}.get(intensity, "🐸 RRRRIIIIBBBBIIIITTTT!!! 🐸")

result = super_ribbit_sound
if message:
result += f" {message}"

logger.info(f"Frog SUPER says: {result}")
return result

@rcx.on_tool_call(CATCH_INSECTS_TOOL.name)
async def toolcall_catch_insects(toolcall: ckit_cloudtool.FCloudtoolCall, model_produced_args: Dict[str, Any]) -> str:
N = model_produced_args.get("N", 1)
Expand Down
2 changes: 1 addition & 1 deletion flexus_simple_bots/version_common.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
SIMPLE_BOTS_COMMON_VERSION = "0.2.23"
SIMPLE_BOTS_COMMON_VERSION = "0.2.24"