You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue has not been reported yet, but I believe it is a possible issue for most providers that use the createOpenAI method of @ai-sdk/openai`. (Perplexity - Perplexity api docs)
To solve this problem, I would like to suggest changing the user role's message to also be sent as a string once the compatibility option in createOpenAI is set to compatibility: "compatible" .
*I like the code that I use for the added features. (ref: 2b18fa1)
I don't think it's possible to use this code, but it's recommended to use the API provider.
Completions that send the messages[0].content field entirely as a string succeed successfully on all providers. However, in this case, function calling is not possible.
The text was updated successfully, but these errors were encountered:
Description
referring to providers/ai-sdk-providers/fireworks and docs/getting-started/nextjs-app-router, and got the following results.
In the latter case, it returns that the content of the messages field cannot begin with a list.
I think this is a problem with the recently changed role of openai's messages field being changed to the form below instead of a string.
This issue has not been reported yet, but I believe it is a possible issue for most providers that use the
createOpenAI method of
@ai-sdk/openai`. (Perplexity - Perplexity api docs)To solve this problem, I would like to suggest changing the user role's message to also be sent as a string once the compatibility option in createOpenAI is set to
compatibility: "compatible"
.*I like the code that I use for the added features. (ref: 2b18fa1)
I don't think it's possible to use this code, but it's recommended to use the API provider.
ai/packages/openai/src/openai-chat-language-model.ts
Line 406 in 8e1f7e3
| Lastly, I apologize for my poor English and explanation.
Code example
app/api/chat/route.ts
Additional context
Completions that send the messages[0].content field entirely as a string succeed successfully on all providers. However, in this case, function calling is not possible.
The text was updated successfully, but these errors were encountered: