Skip to content
This repository has been archived by the owner on Oct 10, 2024. It is now read-only.

Commit

Permalink
fix: technically do not need to await chatStream
Browse files Browse the repository at this point in the history
  • Loading branch information
sublimator committed May 8, 2024
1 parent 560df86 commit 7d351e9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/chat_with_streaming.js
Original file line number Diff line number Diff line change
Expand Up @@ -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?'}],
});
Expand Down
2 changes: 1 addition & 1 deletion examples/typescript/chat_with_streaming.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: [{
Expand Down

0 comments on commit 7d351e9

Please sign in to comment.