-
Notifications
You must be signed in to change notification settings - Fork 41
Open
Description
Hi, we're using SemanticKernel in C# with plugins and function calling and would like to switch to OpenRouter. I am getting an exception from the OpenAI SDK which SemanticKernel uses internally when parsing the response from OpenRouter.
System.NullReferenceException: Object reference not set to an instance of an object.
at OpenAI.Chat.ChatCompletion.get_Refusal()
at Microsoft.SemanticKernel.Connectors.OpenAI.ClientCore.GetChatCompletionMetadata(ChatCompletion completions)
at Microsoft.SemanticKernel.Connectors.OpenAI.ClientCore.CreateChatMessageContent(ChatCompletion completion, String targetModel)
I assume it comes from this line: https://github.com/openai/openai-dotnet/blob/c046c34ad06f7ca050b2f8044cfc8372d8cf0e76/src/Custom/Chat/ChatCompletion.cs#L82
Is there any special configuration required to make this work with SemanticKernel?
rCartoux, JudeCalcey, ThimoDEV and JudeVajira
Metadata
Metadata
Assignees
Labels
No labels