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
Because of this translation it seems to be getting lost during message persistence. Might be a lot easier to just use the same param across both.
Use Cases
After calling submit({ experimental_attachments: [...] }) on useChat, the stream/generate function calls onFinish will have lost the content type since the params are misaligned.
Feature Description
There's a strange translation happening between UI and core messages, which the params for type of media don't line up.
The UI portion uses a param
contentType
:ai/packages/ui-utils/src/types.ts
Line 36 in 9495438
And core message uses
mimeType
:ai/packages/ai/core/prompt/content-part.ts
Line 54 in 9495438
Because of this translation it seems to be getting lost during message persistence. Might be a lot easier to just use the same param across both.
Use Cases
After calling submit({ experimental_attachments: [...] }) on
useChat
, the stream/generate function callsonFinish
will have lost the content type since the params are misaligned.Additional context
"ai": 4.0.25
"@ai-sdk/openai": 1.0.13
"@ai-sdk/react": 1.0.13
The text was updated successfully, but these errors were encountered: