From 52d542cafa35ded16b3e9f5ac2e00222e2584d23 Mon Sep 17 00:00:00 2001 From: Haiping Chen <101423@smsassist.com> Date: Fri, 29 Mar 2024 19:07:09 -0500 Subject: [PATCH] response_to_user --- .../Routing/Handlers/ResponseToUserRoutingHandler.cs | 6 +++--- .../templates/planner_prompt.naive.liquid | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Infrastructure/BotSharp.Core/Routing/Handlers/ResponseToUserRoutingHandler.cs b/src/Infrastructure/BotSharp.Core/Routing/Handlers/ResponseToUserRoutingHandler.cs index 3a093b874..ad6eaf8dc 100644 --- a/src/Infrastructure/BotSharp.Core/Routing/Handlers/ResponseToUserRoutingHandler.cs +++ b/src/Infrastructure/BotSharp.Core/Routing/Handlers/ResponseToUserRoutingHandler.cs @@ -6,12 +6,12 @@ public class ResponseToUserRoutingHandler : RoutingHandlerBase, IRoutingHandler { public string Name => "response_to_user"; - public string Description => "Response according to the context without asking specific agent."; + public string Description => "When you can handle the conversation without asking specific agent."; public List Parameters => new List { - new ParameterPropertyDef("reason", "why response to user"), - new ParameterPropertyDef("response", "response content"), + new ParameterPropertyDef("reason", "why response to user directly without go to other agents"), + new ParameterPropertyDef("response", "response content to user in courteous words. If the user wants to end the conversation, you must set conversation_end to true and response politely."), new ParameterPropertyDef("conversation_end", "whether to end this conversation, true or false", type: "boolean") }; diff --git a/src/Infrastructure/BotSharp.Core/data/agents/01fcc3e5-9af7-49e6-ad7a-a760bd12dc4a/templates/planner_prompt.naive.liquid b/src/Infrastructure/BotSharp.Core/data/agents/01fcc3e5-9af7-49e6-ad7a-a760bd12dc4a/templates/planner_prompt.naive.liquid index 0d5e8600b..f9d6935d3 100644 --- a/src/Infrastructure/BotSharp.Core/data/agents/01fcc3e5-9af7-49e6-ad7a-a760bd12dc4a/templates/planner_prompt.naive.liquid +++ b/src/Infrastructure/BotSharp.Core/data/agents/01fcc3e5-9af7-49e6-ad7a-a760bd12dc4a/templates/planner_prompt.naive.liquid @@ -1,12 +1,12 @@ What is the next step based on the CONVERSATION? Route to the last handling agent in priority. -{%- if expected_next_action_agent != empty -%} +{% if expected_next_action_agent != empty -%} Expected next action agent is {{ expected_next_action_agent }}. {%- endif -%} {%- if expected_user_goal_agent != empty -%} Expected user goal agent is {{ expected_user_goal_agent }}. -{%- endif -%} +{%- endif %} If user wants to speak to customer service, use function human_intervention_needed. If user wants to or is processing with a specific task that can be handled by agents, respond in appropriate output format defined to let proper agent to handle the task. \ No newline at end of file