Skip to main content

Class: MistralAI

MistralAI LLM implementation

Extends

Constructors

new MistralAI()

new MistralAI(init?): MistralAI

Parameters

init?: Partial<MistralAI>

Returns

MistralAI

Overrides

BaseLLM.constructor

Defined in

packages/llamaindex/src/llm/mistral.ts:59

Properties

apiKey?

optional apiKey: string

Defined in

packages/llamaindex/src/llm/mistral.ts:53


maxTokens?

optional maxTokens: number

Defined in

packages/llamaindex/src/llm/mistral.ts:52


model

model: "mistral-tiny" | "mistral-small" | "mistral-medium"

Defined in

packages/llamaindex/src/llm/mistral.ts:49


randomSeed?

optional randomSeed: number

Defined in

packages/llamaindex/src/llm/mistral.ts:55


safeMode

safeMode: boolean

Defined in

packages/llamaindex/src/llm/mistral.ts:54


temperature

temperature: number

Defined in

packages/llamaindex/src/llm/mistral.ts:50


topP

topP: number

Defined in

packages/llamaindex/src/llm/mistral.ts:51

Accessors

metadata

Get Signature

get metadata(): object

Returns

object

contextWindow

contextWindow: number

maxTokens

maxTokens: undefined | number

model

model: "mistral-tiny" | "mistral-small" | "mistral-medium"

temperature

temperature: number

tokenizer

tokenizer: undefined = undefined

topP

topP: number

Overrides

BaseLLM.metadata

Defined in

packages/llamaindex/src/llm/mistral.ts:70

Methods

chat()

chat(params)

chat(params): Promise<AsyncIterable<ChatResponseChunk, any, any>>

Get a chat response from the LLM

Parameters

params: LLMChatParamsStreaming<object, object>

Returns

Promise<AsyncIterable<ChatResponseChunk, any, any>>

Overrides

BaseLLM.chat

Defined in

packages/llamaindex/src/llm/mistral.ts:94

chat(params)

chat(params): Promise<ChatResponse<object>>

Parameters

params: LLMChatParamsNonStreaming<object, object>

Returns

Promise<ChatResponse<object>>

Overrides

BaseLLM.chat

Defined in

packages/llamaindex/src/llm/mistral.ts:97


complete()

complete(params)

complete(params): Promise<AsyncIterable<CompletionResponse, any, any>>

Get a prompt completion from the LLM

Parameters

params: LLMCompletionParamsStreaming

Returns

Promise<AsyncIterable<CompletionResponse, any, any>>

Inherited from

BaseLLM.complete

Defined in

packages/core/llms/dist/index.d.ts:163

complete(params)

complete(params): Promise<CompletionResponse>

Parameters

params: LLMCompletionParamsNonStreaming

Returns

Promise<CompletionResponse>

Inherited from

BaseLLM.complete

Defined in

packages/core/llms/dist/index.d.ts:164


streamChat()

protected streamChat(__namedParameters): AsyncIterable<ChatResponseChunk, any, any>

Parameters

__namedParameters: LLMChatParamsStreaming<object, object>

Returns

AsyncIterable<ChatResponseChunk, any, any>

Defined in

packages/llamaindex/src/llm/mistral.ts:116