set agent id

This commit is contained in:
Jicheng Lu 2025-04-25 13:58:56 -05:00
parent 8de7e699a7
commit 2e45a66edc

View file

@ -1,4 +1,3 @@
using Azure;
using BotSharp.Abstraction.Realtime;
using BotSharp.Abstraction.Realtime.Models;
using Microsoft.AspNetCore.Http;
@ -52,6 +51,7 @@ public class ChatStreamMiddleware
{
var hub = services.GetRequiredService<IRealtimeHub>();
var conn = hub.SetHubConnection(conversationId);
conn.CurrentAgentId = agentId;
// load conversation and state
var convService = services.GetRequiredService<IConversationService>();