Merge branch 'master' into features/add-sql-executor-utility

This commit is contained in:
Jicheng Lu 2024-07-16 10:20:03 -05:00
commit d3de1ba9fd
3 changed files with 2 additions and 7 deletions

View file

@ -110,7 +110,7 @@ public class RoleDialogModel : ITrackableMessage
{
if (Role == AgentRole.Function)
{
return $"{Role}: {FunctionName}({FunctionArgs}) => {Content}";
return $"{Role}: {Content} <= {FunctionName}({FunctionArgs})";
}
else
{

View file

@ -89,7 +89,6 @@ public partial class RouteToAgentFn : IFunctionCallback
// Stack redirection agent
_context.Push(agentId, reason: $"REDIRECTION {reason}");
message.Content = reason;
message.Role = AgentRole.Function;
}
}

View file

@ -59,12 +59,8 @@ public class RouteToAgentRoutingHandler : RoutingHandlerBase, IRoutingHandler
message.FunctionArgs = JsonSerializer.Serialize(inst);
if (message.FunctionName != null)
{
var msg = RoleDialogModel.From(message);
var msg = RoleDialogModel.From(message, role: AgentRole.Function);
var ret = await routing.InvokeFunction(message.FunctionName, msg);
if (msg.Role == AgentRole.Function)
{
_dialogs.Add(msg);
}
}
var agentId = routing.Context.GetCurrentAgentId();