fix: update fetch url with env and model to sonnet

This commit is contained in:
Akhileshrangani4 2024-10-14 17:11:54 -04:00
parent bfc687a3e6
commit ab7ee17145
2 changed files with 2 additions and 2 deletions

View File

@ -47,7 +47,7 @@ Provide a clear and concise explanation along with any code snippets. Keep your
const anthropic = new Anthropic({ apiKey: env.ANTHROPIC_API_KEY }); const anthropic = new Anthropic({ apiKey: env.ANTHROPIC_API_KEY });
const stream = await anthropic.messages.create({ const stream = await anthropic.messages.create({
model: "claude-3-opus-20240229", model: "claude-3-5-sonnet-20240620",
max_tokens: 1024, max_tokens: 1024,
messages: [{ role: "user", content: prompt }], messages: [{ role: "user", content: prompt }],
stream: true, stream: true,

View File

@ -60,7 +60,7 @@ export default function AIChat() {
instructions: input, instructions: input,
...(context && { context }) ...(context && { context })
}); });
const response = await fetch(`http://127.0.0.1:8787/api?${queryParams}`, { const response = await fetch(`${process.env.NEXT_PUBLIC_AI_WORKER_URL}/api?${queryParams}`, {
method: 'GET', method: 'GET',
signal: abortControllerRef.current.signal, signal: abortControllerRef.current.signal,
}); });