human_intervention_needed

This commit is contained in:
Haiping Chen 2024-03-28 14:09:53 -05:00
parent 9f79dcf4a8
commit 16e3a70ce7
3 changed files with 7 additions and 4 deletions

View file

@ -12,7 +12,7 @@ public class HumanInterventionNeededHandler : RoutingHandlerBase, IRoutingHandle
{
new ParameterPropertyDef("reason", "why need customer service"),
new ParameterPropertyDef("summary", "the whole conversation summary with important information"),
new ParameterPropertyDef("response", "tell the user that you are being transferred to customer service")
new ParameterPropertyDef("response", "confirm with user that whether to connect with customer service")
};
public HumanInterventionNeededHandler(IServiceProvider services, ILogger<HumanInterventionNeededHandler> logger, RoutingSettings settings)

View file

@ -74,9 +74,11 @@ public partial class RoutingService
else
{
// Save to memory dialogs
dialogs.Add(RoleDialogModel.From(message,
var msg = RoleDialogModel.From(message,
role: AgentRole.Function,
content: message.Content));
content: message.Content);
dialogs.Add(msg);
// Send to Next LLM
var agentId = routing.Context.GetCurrentAgentId();

View file

@ -3,4 +3,5 @@ Route to the last handling agent in priority.
{% if expected_next_action_agent != empty -%}
Expected next action agent is {{ expected_next_action_agent }}.
{%- endif %}
If user wants to speak to customer service, use function human_intervention_needed.
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 with appropriate agents.