From 30d6648569353bc13280a6e4f0afc9294ca8b93a Mon Sep 17 00:00:00 2001 From: Bob Date: Mon, 26 Jan 2026 11:47:45 +0000 Subject: [PATCH] Add super_ribbit cloud tool to Frog bot - Added SUPER_RIBBIT_TOOL with intensity options: epic, legendary - Registered tool in TOOLS list - Added handler that returns enthusiastic responses - Incremented version to 0.2.24 Co-Authored-By: Claude Sonnet 4.5 --- flexus_simple_bots/frog/frog_bot.py | 33 ++++++++++++++++++++++++++++ flexus_simple_bots/version_common.py | 2 +- 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/flexus_simple_bots/frog/frog_bot.py b/flexus_simple_bots/frog/frog_bot.py index 7422a5b2..814ac68a 100644 --- a/flexus_simple_bots/frog/frog_bot.py +++ b/flexus_simple_bots/frog/frog_bot.py @@ -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", @@ -88,6 +103,7 @@ TOOLS = [ RIBBIT_TOOL, + SUPER_RIBBIT_TOOL, CATCH_INSECTS_TOOL, MAKE_POND_REPORT_TOOL, fi_mongo_store.MONGO_STORE_TOOL, @@ -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) diff --git a/flexus_simple_bots/version_common.py b/flexus_simple_bots/version_common.py index e4304632..5e4621b9 100644 --- a/flexus_simple_bots/version_common.py +++ b/flexus_simple_bots/version_common.py @@ -1 +1 @@ -SIMPLE_BOTS_COMMON_VERSION = "0.2.23" +SIMPLE_BOTS_COMMON_VERSION = "0.2.24"