Fix bug of next_step_prompt with args.

This commit is contained in:
hchen 2023-10-17 10:49:07 -05:00
parent eb7529cf01
commit 8c43de14e9
3 changed files with 18 additions and 3 deletions

View file

@ -13,6 +13,6 @@ public class RoutingItem
[JsonPropertyName("description")]
public string Description { get; set; } = string.Empty;
[JsonPropertyName("required")]
[JsonPropertyName("required_fields")]
public List<NameDesc> RequiredFields { get; set; } = new List<NameDesc>();
}

View file

@ -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

View file

@ -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.