From 8fa9e89c8a5cc102c276de3f5fdd58e3fc961b2d Mon Sep 17 00:00:00 2001 From: Haiping Chen Date: Mon, 26 Aug 2024 21:46:48 -0500 Subject: [PATCH] restore route to agent. --- .../Routing/Handlers/RouteToAgentRoutingHandler.cs | 8 ++++---- .../instructions/instruction.liquid | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Infrastructure/BotSharp.Core/Routing/Handlers/RouteToAgentRoutingHandler.cs b/src/Infrastructure/BotSharp.Core/Routing/Handlers/RouteToAgentRoutingHandler.cs index 6faf6471..94539b9b 100644 --- a/src/Infrastructure/BotSharp.Core/Routing/Handlers/RouteToAgentRoutingHandler.cs +++ b/src/Infrastructure/BotSharp.Core/Routing/Handlers/RouteToAgentRoutingHandler.cs @@ -11,18 +11,18 @@ public class RouteToAgentRoutingHandler : RoutingHandlerBase, IRoutingHandler public List Parameters => new List { - /*new ParameterPropertyDef("next_action_reason", + new ParameterPropertyDef("next_action_reason", "the reason why route to this virtual agent.", - required: true),*/ + required: true), new ParameterPropertyDef("next_action_agent", "agent for next action based on user latest response, if user is replying last agent's question, you must route to this agent.", required: true), new ParameterPropertyDef("args", "useful parameters of next action agent, format: { }", type: "object"), - /*new ParameterPropertyDef("user_goal_description", + new ParameterPropertyDef("user_goal_description", "user goal based on user initial task.", - required: true),*/ + required: true), new ParameterPropertyDef("user_goal_agent", "agent who can acheive user initial task.", required: true), diff --git a/src/Infrastructure/BotSharp.Core/data/agents/01fcc3e5-9af7-49e6-ad7a-a760bd12dc4a/instructions/instruction.liquid b/src/Infrastructure/BotSharp.Core/data/agents/01fcc3e5-9af7-49e6-ad7a-a760bd12dc4a/instructions/instruction.liquid index 182a2584..bc614f81 100644 --- a/src/Infrastructure/BotSharp.Core/data/agents/01fcc3e5-9af7-49e6-ad7a-a760bd12dc4a/instructions/instruction.liquid +++ b/src/Infrastructure/BotSharp.Core/data/agents/01fcc3e5-9af7-49e6-ad7a-a760bd12dc4a/instructions/instruction.liquid @@ -19,6 +19,7 @@ Follow these steps to handle user request: # {{ handler.description}} {% if handler.parameters and handler.parameters != empty -%} Parameters: + - function: {{ handler.name }} {% for p in handler.parameters -%} - {{ p.name }} {% if p.required -%}(required){%- endif %}: {{ p.description }}{{ "\r\n " }} {%- endfor %}