undo indication set.
This commit is contained in:
parent
da402f5eb0
commit
48d2e43e38
|
|
@ -50,14 +50,13 @@ public class ChatCompletionProvider : IChatCompletion
|
|||
var content = response.Content.OfType<TextContent>().FirstOrDefault();
|
||||
var toolResult = response.Content.OfType<ToolUseContent>().First();
|
||||
|
||||
responseMessage = new RoleDialogModel(AgentRole.Function, response.FirstMessage?.Text ?? string.Empty)
|
||||
responseMessage = new RoleDialogModel(AgentRole.Function, content?.Text ?? string.Empty)
|
||||
{
|
||||
CurrentAgentId = agent.Id,
|
||||
MessageId = conversations.LastOrDefault()?.MessageId ?? string.Empty,
|
||||
ToolCallId = toolResult.Id,
|
||||
FunctionName = toolResult.Name,
|
||||
FunctionArgs = JsonSerializer.Serialize(toolResult.Input),
|
||||
Indication = content.Text
|
||||
};
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -58,8 +58,7 @@ public class ChatCompletionProvider : IChatCompletion
|
|||
CurrentAgentId = agent.Id,
|
||||
MessageId = conversations.LastOrDefault()?.MessageId ?? string.Empty,
|
||||
FunctionName = toolCall?.FunctionName,
|
||||
FunctionArgs = toolCall?.FunctionArguments?.ToString(),
|
||||
Indication = value.Content.FirstOrDefault()?.Text
|
||||
FunctionArgs = toolCall?.FunctionArguments?.ToString()
|
||||
};
|
||||
|
||||
// Somethings LLM will generate a function name with agent name.
|
||||
|
|
@ -163,8 +162,7 @@ public class ChatCompletionProvider : IChatCompletion
|
|||
CurrentAgentId = agent.Id,
|
||||
MessageId = conversations.LastOrDefault()?.MessageId ?? string.Empty,
|
||||
FunctionName = toolCall?.FunctionName,
|
||||
FunctionArgs = toolCall?.FunctionArguments?.ToString(),
|
||||
Indication = value.Content.FirstOrDefault()?.Text
|
||||
FunctionArgs = toolCall?.FunctionArguments?.ToString()
|
||||
};
|
||||
|
||||
// Somethings LLM will generate a function name with agent name.
|
||||
|
|
|
|||
|
|
@ -55,8 +55,7 @@ public class ChatCompletionProvider : IChatCompletion
|
|||
MessageId = conversations.LastOrDefault()?.MessageId ?? string.Empty,
|
||||
ToolCallId = toolCall?.Id,
|
||||
FunctionName = toolCall?.FunctionName,
|
||||
FunctionArgs = toolCall?.FunctionArguments?.ToString(),
|
||||
Indication = value.Content.FirstOrDefault()?.Text
|
||||
FunctionArgs = toolCall?.FunctionArguments?.ToString()
|
||||
};
|
||||
|
||||
// Somethings LLM will generate a function name with agent name.
|
||||
|
|
@ -142,8 +141,7 @@ public class ChatCompletionProvider : IChatCompletion
|
|||
MessageId = conversations.LastOrDefault()?.MessageId ?? string.Empty,
|
||||
ToolCallId = toolCall?.Id,
|
||||
FunctionName = toolCall?.FunctionName,
|
||||
FunctionArgs = toolCall?.FunctionArguments?.ToString(),
|
||||
Indication = value.Content.FirstOrDefault()?.Text
|
||||
FunctionArgs = toolCall?.FunctionArguments?.ToString()
|
||||
};
|
||||
|
||||
// Somethings LLM will generate a function name with agent name.
|
||||
|
|
|
|||
Loading…
Reference in a new issue