Class: MistralAI
MistralAI LLM implementation
Extends
Constructors
new MistralAI()
new MistralAI(
init
?):MistralAI
Parameters
• init?: Partial
<MistralAI
>
Returns
Overrides
Source
packages/llamaindex/src/llm/mistral.ts:56
Properties
apiKey?
optional
apiKey:string
Source
packages/llamaindex/src/llm/mistral.ts:50
maxTokens?
optional
maxTokens:number
Source
packages/llamaindex/src/llm/mistral.ts:49
model
model:
"mistral-tiny"
|"mistral-small"
|"mistral-medium"
Source
packages/llamaindex/src/llm/mistral.ts:46
randomSeed?
optional
randomSeed:number
Source
packages/llamaindex/src/llm/mistral.ts:52
safeMode
safeMode:
boolean
Source
packages/llamaindex/src/llm/mistral.ts:51
session
private
session:MistralAISession
Source
packages/llamaindex/src/llm/mistral.ts:54
temperature
temperature:
number
Source
packages/llamaindex/src/llm/mistral.ts:47
topP
topP:
number
Source
packages/llamaindex/src/llm/mistral.ts:48
Accessors
metadata
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
Source
packages/llamaindex/src/llm/mistral.ts:67
Methods
buildParams()
private
buildParams(messages
):any
Parameters
• messages: ChatMessage
[]
Returns
any
Source
packages/llamaindex/src/llm/mistral.ts:78
chat()
chat(params)
chat(
params
):Promise
<AsyncIterable
<ChatResponseChunk
>>
Get a chat response from the LLM
Parameters
• params: LLMChatParamsStreaming
<object
, object
>
Returns
Promise
<AsyncIterable
<ChatResponseChunk
>>
Overrides
Source
packages/llamaindex/src/llm/mistral.ts:90
chat(params)
chat(
params
):Promise
<ChatResponse
<object
>>
Parameters
• params: LLMChatParamsNonStreaming
<object
, object
>
Returns
Promise
<ChatResponse
<object
>>
Overrides
Source
packages/llamaindex/src/llm/mistral.ts:93
complete()
complete(params)
complete(
params
):Promise
<AsyncIterable
<CompletionResponse
>>
Get a prompt completion from the LLM
Parameters
• params: LLMCompletionParamsStreaming
Returns
Promise
<AsyncIterable
<CompletionResponse
>>
Inherited from
Source
packages/core/dist/llms/index.d.ts:168
complete(params)
complete(
params
):Promise
<CompletionResponse
>
Parameters
• params: LLMCompletionParamsNonStreaming
Returns
Promise
<CompletionResponse
>
Inherited from
Source
packages/core/dist/llms/index.d.ts:169
streamChat()
protected
streamChat(__namedParameters
):AsyncIterable
<ChatResponseChunk
>
Parameters
• __namedParameters: LLMChatParamsStreaming
<object
, object
>
Returns
AsyncIterable
<ChatResponseChunk
>