Share via

Change Kernel endpoint during failover in the same instance (Singleton GenAIService)

dotnet_guy 15 Reputation points
2024-10-23T22:49:48.1066667+00:00

Hello,

I am trying to use a different endpoint during failover to another region's Azure OpenAI Service and don't see a way to change it directly from kernel object. I am trying to use the same kernel object reference, so the returned kernel object after GetChatMessageContentAsync() from ChatCompletionService has kernel data.

From what I can tell, we definitely need another kernel instance to failover as I don't see a way to only change the kernel endpoint and using singleton might be tough, and the code should check for which endpoint is active in the next request.

Is there a way I can move forward in this situation?

Thanks.

Developer technologies | ASP.NET Core | Other
0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.