From f11790ed104ca40cd1cc75d4ffd0e0ca093c225c Mon Sep 17 00:00:00 2001 From: Haiping Chen Date: Fri, 27 Jun 2025 08:28:22 -0500 Subject: [PATCH] Added conversation_end to response_to_user --- .../BotSharp.Core/Routing/Reasoning/ReasonerHelper.cs | 6 ++++++ .../functions/response_to_user.json | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/src/Infrastructure/BotSharp.Core/Routing/Reasoning/ReasonerHelper.cs b/src/Infrastructure/BotSharp.Core/Routing/Reasoning/ReasonerHelper.cs index 59ff3b9a..a37e2407 100644 --- a/src/Infrastructure/BotSharp.Core/Routing/Reasoning/ReasonerHelper.cs +++ b/src/Infrastructure/BotSharp.Core/Routing/Reasoning/ReasonerHelper.cs @@ -65,6 +65,12 @@ public static class ReasonerHelper } } + if (args.AgentName == "response_to_user") + { + args.AgentName = ""; + malformed = true; + } + if (malformed) { Console.WriteLine($"Captured LLM malformed response"); diff --git a/src/Infrastructure/BotSharp.Core/data/agents/01fcc3e5-9af7-49e6-ad7a-a760bd12dc4a/functions/response_to_user.json b/src/Infrastructure/BotSharp.Core/data/agents/01fcc3e5-9af7-49e6-ad7a-a760bd12dc4a/functions/response_to_user.json index 9e7f8929..6f6c995a 100644 --- a/src/Infrastructure/BotSharp.Core/data/agents/01fcc3e5-9af7-49e6-ad7a-a760bd12dc4a/functions/response_to_user.json +++ b/src/Infrastructure/BotSharp.Core/data/agents/01fcc3e5-9af7-49e6-ad7a-a760bd12dc4a/functions/response_to_user.json @@ -7,6 +7,10 @@ "content": { "type": "string", "description": "Response content" + }, + "conversation_end": { + "type": "boolean", + "description": "User is ending the conversation." } }, "required": [ "content" ]