In this example, the messages[0].content is String, not {"type": text, "content": ""}.
Some third-party API forward provider (such as deepseek) use this example struct as the only correct struct, without supporting the struct now implemented in this package.
I have made a change as follow: If messages[INDEX].content only has one child of type text, then the content will set as a string.
As the OpenAI API ref, the body of
/chat/completions
can be:In this example, the
messages[0].content
is String, not{"type": text, "content": ""}
.Some third-party API forward provider (such as
deepseek
) use this example struct as the only correct struct, without supporting the struct now implemented in this package.I have made a change as follow: If
messages[INDEX].content
only has one child of typetext
, then the content will set as a string.Thanks for your review. :)