Closed jwerre closed 1 month ago
When doing chat completions the response can either be ChatCompletionResponse or { object: 'error', message: string, type: string}. For example:
ChatCompletionResponse
{ object: 'error', message: string, type: string}
export interface ErrorResponse { object: 'error', message: string, type: string, } class MistralClient { constructor(...); chat( request: ChatRequest, options?: ChatRequestOptions ): Promise<ChatCompletionResponse|ErrorResponse>; // <---------- ADD }
Ooops, was using version 0
When doing chat completions the response can either be
ChatCompletionResponse
or{ object: 'error', message: string, type: string}
. For example: