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
import { CoreMessage, smoothStream, streamText } from 'ai'; import { createDeepSeek } from '@ai-sdk/deepseek'; export const runtime = 'edge'; const deepseek = createDeepSeek({ apiKey: process.env.DEEPSEEK_API_KEY ?? '', }); export async function POST(req: Request) { const { messages }: { messages: CoreMessage[] } = await req.json(); const result = streamText({ model: deepseek('deepseek-chat'), system: 'You are a helpful assistant', messages, experimental_transform: smoothStream(), }); return result.toDataStreamResponse(); } "TypeError: Illegal invocation: function called with incorrect this reference. See for details."
this
No response
The text was updated successfully, but these errors were encountered:
Can you provide details about the environment you are running this code in?
Sorry, something went wrong.
No branches or pull requests
Description
import { CoreMessage, smoothStream, streamText } from 'ai';
import { createDeepSeek } from '@ai-sdk/deepseek';
export const runtime = 'edge';
const deepseek = createDeepSeek({
apiKey: process.env.DEEPSEEK_API_KEY ?? '',
});
export async function POST(req: Request) {
const { messages }: { messages: CoreMessage[] } = await req.json();
const result = streamText({
model: deepseek('deepseek-chat'),
system: 'You are a helpful assistant',
messages,
experimental_transform: smoothStream(),
});
return result.toDataStreamResponse();
}
"TypeError: Illegal invocation: function called with incorrect
this
reference. See for details."Code example
No response
AI provider
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: