temp save
This commit is contained in:
parent
eeb4f06f63
commit
1b32cb5c68
|
|
@ -208,20 +208,18 @@ public class ChatCompletionProvider : IChatCompletion
|
|||
if (choice.FinishReason == ChatFinishReason.FunctionCall || choice.FinishReason == ChatFinishReason.ToolCalls)
|
||||
{
|
||||
var update = choice.ToolCallUpdates?.FirstOrDefault()?.FunctionArgumentsUpdate?.ToString() ?? string.Empty;
|
||||
_logger.LogInformation(update);
|
||||
_logger.LogCritical($"Tool Call (reason: {choice.FinishReason}): {update}");
|
||||
|
||||
//await onMessageReceived(new RoleDialogModel(AgentRole.Assistant, update)
|
||||
//{
|
||||
// //RenderedInstruction = string.Join("\r\n", renderedInstructions)
|
||||
//});
|
||||
continue;
|
||||
}
|
||||
|
||||
if (choice.ContentUpdate.IsNullOrEmpty()) continue;
|
||||
|
||||
else if (!choice.ContentUpdate.IsNullOrEmpty())
|
||||
{
|
||||
var text = choice.ContentUpdate[0]?.Text ?? string.Empty;
|
||||
allText += text;
|
||||
_logger.LogInformation(text);
|
||||
_logger.LogCritical($"Content update (reason: {choice.FinishReason}) {text}");
|
||||
|
||||
var content = new RoleDialogModel(AgentRole.Assistant, text)
|
||||
{
|
||||
|
|
@ -240,6 +238,7 @@ public class ChatCompletionProvider : IChatCompletion
|
|||
// RenderedInstruction = string.Join("\r\n", renderedInstructions)
|
||||
//});
|
||||
}
|
||||
}
|
||||
|
||||
hub.Push(new()
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue