diff --git a/src/Infrastructure/BotSharp.Abstraction/Routing/Models/RoutingItem.cs b/src/Infrastructure/BotSharp.Abstraction/Routing/Models/RoutingItem.cs index 2774bfac..f98c26e2 100644 --- a/src/Infrastructure/BotSharp.Abstraction/Routing/Models/RoutingItem.cs +++ b/src/Infrastructure/BotSharp.Abstraction/Routing/Models/RoutingItem.cs @@ -13,6 +13,6 @@ public class RoutingItem [JsonPropertyName("description")] public string Description { get; set; } = string.Empty; - [JsonPropertyName("required")] + [JsonPropertyName("required_fields")] public List RequiredFields { get; set; } = new List(); } diff --git a/src/WebStarter/data/agents/01fcc3e5-9af7-49e6-ad7a-a760bd12dc4a/instruction.liquid b/src/WebStarter/data/agents/01fcc3e5-9af7-49e6-ad7a-a760bd12dc4a/instruction.liquid index 9f9f8770..949877c8 100644 --- a/src/WebStarter/data/agents/01fcc3e5-9af7-49e6-ad7a-a760bd12dc4a/instruction.liquid +++ b/src/WebStarter/data/agents/01fcc3e5-9af7-49e6-ad7a-a760bd12dc4a/instruction.liquid @@ -20,6 +20,12 @@ AGENTS {% for agent in routing_agents %} * {{ agent.name }} {{ agent.description}} +{% if agent.required_fields and agent.required_fields != empty -%} +Required: + {% for f in agent.required_fields -%} + {{ f.name }}: {{ f.description }}{{ "\r\n " }} + {%- endfor %} +{%- endif %} {% endfor %} CONVERSATION \ No newline at end of file diff --git a/src/WebStarter/data/agents/01fcc3e5-9af7-49e6-ad7a-a760bd12dc4a/templates/next_step_prompt.liquid b/src/WebStarter/data/agents/01fcc3e5-9af7-49e6-ad7a-a760bd12dc4a/templates/next_step_prompt.liquid index 13315c02..f9f3f8c0 100644 --- a/src/WebStarter/data/agents/01fcc3e5-9af7-49e6-ad7a-a760bd12dc4a/templates/next_step_prompt.liquid +++ b/src/WebStarter/data/agents/01fcc3e5-9af7-49e6-ad7a-a760bd12dc4a/templates/next_step_prompt.liquid @@ -2,9 +2,18 @@ What is the next step based on the CONVERSATION? Or you can handle without askin Response must be in JSON format {% if enabled_reasoning -%} -{"function":"route_to_agent"} +{ + "function":"route_to_agent" +} {%- else -%} -{"function":"route_to_agent","reason":"the reason why you select this function or agent","response":"content of replying to user","next_action_agent":"agent for next action based on user latest response","user_goal_agent":"agent who can achieve user original goal"} +{ + "function":"route_to_agent", + "reason":"the reason why you select this function or agent", + "response":"content of replying to user", + "next_action_agent":"agent for next action based on user latest response", + "user_goal_agent":"agent who can achieve user original goal", + "args": {} +} {%- endif %} If the user has no other tasks need help with, set function as conversation_end with reason and reply user courteously.