Skip to content
New issue

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

cloudflare page not available #4463

Open
gencw opened this issue Jan 21, 2025 · 1 comment
Open

cloudflare page not available #4463

gencw opened this issue Jan 21, 2025 · 1 comment
Labels
bug Something isn't working deployment

Comments

@gencw
Copy link

gencw commented Jan 21, 2025

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

@gencw gencw added the bug Something isn't working label Jan 21, 2025
@lgrammel
Copy link
Collaborator

Can you provide details about the environment you are running this code in?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working deployment
Projects
None yet
Development

No branches or pull requests

2 participants