matthoffner commited on
Commit
5ea401a
β€’
1 Parent(s): ad5b8b1

Switch to mistral-large-latest

Browse files
Files changed (1) hide show
  1. app/api/chat/route.ts +3 -2
app/api/chat/route.ts CHANGED
@@ -11,7 +11,8 @@ const [, oddsApiSchema] = createOddsApi({ apiKey: process.env.ODDS_API_KEY || ''
11
  const [, coinMarketCapApiSchema] = createCoinMarketCapApi({ apiKey: process.env.COINMARKETCAP_API_KEY || '' });
12
 
13
  const config = new Configuration({
14
- apiKey: process.env.OPENAI_API_KEY,
 
15
  });
16
  const openai = new OpenAIApi(config);
17
 
@@ -26,7 +27,7 @@ export async function POST(req: Request) {
26
  const { messages, function_call } = await req.json()
27
 
28
  const response = await openai.createChatCompletion({
29
- model: 'gpt-3.5-turbo',
30
  stream: true,
31
  messages,
32
  functions,
 
11
  const [, coinMarketCapApiSchema] = createCoinMarketCapApi({ apiKey: process.env.COINMARKETCAP_API_KEY || '' });
12
 
13
  const config = new Configuration({
14
+ apiKey: process.env.MISTRAL_API_KEY,
15
+ baseUrl: "https://api.mistral.ai"
16
  });
17
  const openai = new OpenAIApi(config);
18
 
 
27
  const { messages, function_call } = await req.json()
28
 
29
  const response = await openai.createChatCompletion({
30
+ model: 'mistral-large-latest',
31
  stream: true,
32
  messages,
33
  functions,