Merge pull request #343 from hchen2020/master
expected_next_action_agent
This commit is contained in:
commit
010bcf82eb
|
|
@ -10,11 +10,11 @@ public class RouteToAgentRoutingHandler : RoutingHandlerBase, IRoutingHandler
|
|||
|
||||
public List<ParameterPropertyDef> Parameters => new List<ParameterPropertyDef>
|
||||
{
|
||||
new ParameterPropertyDef("next_action_reason", "the reason why route to this agent")
|
||||
new ParameterPropertyDef("next_action_reason", "the reason why route to this agent, if user is replying last agent's question, you must route to this agent")
|
||||
{
|
||||
Required = true
|
||||
},
|
||||
new ParameterPropertyDef("next_action_agent", "agent for next action based on user latest response")
|
||||
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
|
||||
},
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ public class NaivePlanner : IPlaner
|
|||
var render = _services.GetRequiredService<ITemplateRender>();
|
||||
return render.Render(template, new Dictionary<string, object>
|
||||
{
|
||||
{ "next_action_agent", states.GetState("next_action_agent")}
|
||||
{ "expected_next_action_agent", states.GetState("expected_next_action_agent")}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
What is the next step based on the CONVERSATION?
|
||||
If user is replying with agent's question, you must route back to the previous agent {{ next_action_agent }}.
|
||||
If user wants to speak to customer service, use function human_intervention_needed.
|
||||
What is the next step based on the CONVERSATION?
|
||||
Route to the appropriate agent last handled agent based on the context.
|
||||
{% if expected_next_action_agent != empty -%}
|
||||
Expected next action agent is {{ expected_next_action_agent }}.
|
||||
{%- endif %}
|
||||
Try to keep the User Goal Agent be consistent as previous goal agent.
|
||||
If user wants to speak to customer service, use function human_intervention_needed.
|
||||
Loading…
Reference in a new issue