Merge pull request #544 from hchen2020/master
remove function return appended to dialogs.
This commit is contained in:
commit
74862eb029
|
|
@ -110,7 +110,7 @@ public class RoleDialogModel : ITrackableMessage
|
|||
{
|
||||
if (Role == AgentRole.Function)
|
||||
{
|
||||
return $"{Role}: {FunctionName}({FunctionArgs}) => {Content}";
|
||||
return $"{Role}: {Content} <= {FunctionName}({FunctionArgs})";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in a new issue