Closed chanmathew closed 1 month ago
I can give this one a try.
chatStream is a generator function
client: MistralClient {
_request: [AsyncFunction: _request],
_makeChatCompletionRequest: [Function: _makeChatCompletionRequest],
listModels: [AsyncFunction: listModels],
chat: [AsyncFunction: chat],
chatStream: [AsyncGeneratorFunction: chatStream],
embeddings: [AsyncFunction: embeddings],
endpoint: 'https://api.mistral.ai',
apiKey: '********',
maxRetries: 5,
timeout: 120,
modelDefault: 'mistral'
}
This is not necessary. You are supposed to use as so: https://github.com/mistralai/client-js/blob/649923634ff7302f2e7c58c505cbe5cb3a431c68/examples/chat_with_streaming.js#L1-L18
Thanks for reporting this issue. We have deprecated this package in favor of mistralai/client-ts, which is the new official Mistral client, compatible with both TypeScript and JavaScript.
You can find all installation information here.
This change is effective starting with version 1.0.0 of the npm package.
Let us know if your issue persists with the new package by opening an issue there.
Hi there,
Running the latest version of the SDK 0.1.3, but when I try to init and call the client, it does not return anything.
Here is my code: