From 7d351e92856b90bfc19458597a88a9fe4391422e Mon Sep 17 00:00:00 2001 From: Nicholas Dudfield Date: Wed, 8 May 2024 07:36:32 +0700 Subject: [PATCH] fix: technically do not need to await chatStream --- examples/chat_with_streaming.js | 2 +- examples/typescript/chat_with_streaming.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/chat_with_streaming.js b/examples/chat_with_streaming.js index 191381a..4da7bee 100644 --- a/examples/chat_with_streaming.js +++ b/examples/chat_with_streaming.js @@ -4,7 +4,7 @@ const apiKey = process.env.MISTRAL_API_KEY; const client = new MistralClient(apiKey); -const chatStreamResponse = await client.chatStream({ +const chatStreamResponse = client.chatStream({ model: 'mistral-tiny', messages: [{role: 'user', content: 'What is the best French cheese?'}], }); diff --git a/examples/typescript/chat_with_streaming.ts b/examples/typescript/chat_with_streaming.ts index cb4aa58..564c9bc 100644 --- a/examples/typescript/chat_with_streaming.ts +++ b/examples/typescript/chat_with_streaming.ts @@ -5,7 +5,7 @@ const apiKey = process.env.MISTRAL_API_KEY; const client = new MistralClient(apiKey); const responseInterface = '{"best": string, "reasoning": string}'; -const chatStreamResponse = await client.chatStream({ +const chatStreamResponse = client.chatStream({ model: 'open-mistral-7b', responseFormat: {type: 'json_object'}, messages: [{