Rollback.
This commit is contained in:
parent
fbd3c6f0ca
commit
8003fc39f0
|
|
@ -9,12 +9,10 @@ public class RoutingArgs
|
|||
public string Reason { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("answer")]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public string? Answer { get; set; }
|
||||
public string Answer { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("agent")]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public string? AgentName { get; set; }
|
||||
public string AgentName { get; set; } = string.Empty;
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,23 +9,13 @@ public partial class RoutingService
|
|||
{
|
||||
public async Task<FunctionCallFromLlm> GetNextInstruction(string prompt)
|
||||
{
|
||||
var responseRouteToAgent = _settings.EnableReasoning ?
|
||||
var responseFormat = _settings.EnableReasoning ?
|
||||
JsonSerializer.Serialize(new FunctionCallFromLlm()) :
|
||||
JsonSerializer.Serialize(new RoutingArgs
|
||||
{
|
||||
Function = "route_to_agent",
|
||||
AgentName = ""
|
||||
Function = "route_to_agent"
|
||||
});
|
||||
|
||||
var responseResponseToUser = _settings.EnableReasoning ?
|
||||
JsonSerializer.Serialize(new FunctionCallFromLlm()) :
|
||||
JsonSerializer.Serialize(new RoutingArgs
|
||||
{
|
||||
Function = "response_to_user",
|
||||
Answer = ""
|
||||
});
|
||||
|
||||
var content = $"{prompt}\r\nIf need to route to specific agent, output in JSON {responseRouteToAgent}.\r\nIf you can handle the request directly, output in JSON {responseResponseToUser}.";
|
||||
var content = $"{prompt} Response must be in JSON format {responseFormat}";
|
||||
|
||||
var state = _services.GetRequiredService<IConversationStateService>();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue