Replies: 1 comment 3 replies
-
How are you serializing them? The OpenAI library relies on its own serialization mechanism rather than STJ. You need to cast to its IJsonModel and then use the methods there to read/write, eg https://github.com/openai/openai-dotnet/blob/cc157bd8f16898c0d8754037a8cccf2ea9d4198f/examples/Chat/Example08_ChatSerialization.cs#L27 |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
In my company, we would like to leverage MEAI to build a AI gateway. That would make all our LLM usages enjoy the MEAI features:
The OpenAI request/response model is quite complex. Since MEAI.OpenAI already has helpers to do these conversions:
It would be great if we could also have:
so at the end we could do this
I'm playing with MicrosoftExtensionsAIChatExtensions but the extension methods there don't seem to match the OpenAI request/response. For example, serializing the result of
AsOpenAIChatCompletion
returns something that is very different from the expected responsealso deserializing an
OpenAI.Chat.ChatMessage
(so we can just doAsChatMessages
to get a MEAIChatMessage
) throwsBeta Was this translation helpful? Give feedback.
All reactions