Log routing output

This commit is contained in:
Haiping Chen 2024-02-21 17:20:01 -06:00
parent 2d8866af9f
commit f5f60b7178

View file

@ -79,6 +79,17 @@ public class StreamingLogHook : ConversationHookBase, IContentGeneratingHook
var conversationId = _state.GetConversationId();
var agent = await agentService.LoadAgent(message.CurrentAgentId);
// Log routing output
try
{
var inst = message.Content.JsonContent<FunctionCallFromLlm>();
await _chatHub.Clients.User(_user.Id).SendAsync("OnConversationContentLogGenerated", BuildContentLog(conversationId, agent?.Name, message.Content, message));
}
catch
{
// ignore
}
string log;
if (message.Role == AgentRole.Function)
{