-
I'm building an application with Blazor, and I have a Plugin that returns a List of Articles. The issue is that when I access the response of GetStreamingChatMessageContentsAsync, it returns a string. I can't even receive a valid JSON, because it always adds properties that don't make sense. I would like to have the response typed so that it can be presented differently depending on the type of data. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Have you considered using structured outputs? https://github.com/microsoft/semantic-kernel/blob/main/dotnet/samples/Concepts/ChatCompletion/OpenAI_StructuredOutputs.cs |
Beta Was this translation helpful? Give feedback.
-
Please also have a look at how filters may help you, if you need the immediate result of a function result without having the model provide the final natural language response: https://learn.microsoft.com/en-us/semantic-kernel/concepts/enterprise-readiness/filters?pivots=programming-language-csharp. |
Beta Was this translation helpful? Give feedback.
Please also have a look at how filters may help you, if you need the immediate result of a function result without having the model provide the final natural language response: https://learn.microsoft.com/en-us/semantic-kernel/concepts/enterprise-readiness/filters?pivots=programming-language-csharp.