We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Just sending a simple PNG to GPT I'm getting this:
const stream = await streamObject({ model: openai.chat("gpt-4-turbo"), schema: z.object({ children: z.array(z.object({})), }), system: `Do this`, messages: [formatVercelUserMessage(userMessage, base64Image)], }); export const formatVercelUserMessage = ( message: string, base64Image?: string | null ): CoreUserMessage => { if (base64Image) { return { role: "user", content: [ { type: "text", text: message }, { type: "image", image: base64Image, }, ], }; } return { role: "user", content: message, }; };
⨯ unhandledRejection: DOMException [InvalidCharacterError]: Invalid character at atob (node:buffer:1269:13) at convertBase64ToUint8Array (webpack-internal:///(action-browser)/../node_modules/.pnpm/@[email protected][email protected]/node_modules/@ai-sdk/provider-utils/dist/index.mjs:396:35) at convertDataContentToUint8Array (webpack-internal:///(action-browser)/../node_modules/.pnpm/[email protected][email protected][email protected][email protected][email protected][email protected][email protected]/node_modules/ai/dist/index.mjs:121:93) at eval (webpack-internal:///(action-browser)/../node_modules/.pnpm/[email protected][email protected][email protected][email protected][email protected][email protected][email protected]/node_modules/ai/dist/index.mjs:171:44) at Array.map (<anonymous>) at eval (webpack-internal:///(action-browser)/../node_modules/.pnpm/[email protected][email protected][email protected][email protected][email protected][email protected][email protected]/node_modules/ai/dist/index.mjs:156:42) at Array.map (<anonymous>) at convertToLanguageModelPrompt (webpack-internal:///(action-browser)/../node_modules/.pnpm/[email protected][email protected][email protected][email protected][email protected][email protected][email protected]/node_modules/ai/dist/index.mjs:145:28) at streamObject (webpack-internal:///(action-browser)/../node_modules/.pnpm/[email protected][email protected][email protected][email protected][email protected][email protected][email protected]/node_modules/ai/dist/index.mjs:1053:17) at eval (webpack-internal:///(action-browser)/./app/playground/actions.tsx:64:79)
Example image being sent:
The text was updated successfully, but these errors were encountered:
#1569
Sorry, something went wrong.
lgrammel
No branches or pull requests
Description
Just sending a simple PNG to GPT I'm getting this:
Example image being sent:
The text was updated successfully, but these errors were encountered: