Class: MistralAI
MistralAI LLM implementation
Extends
Constructors
new MistralAI()
new MistralAI(
init
?):MistralAI
Parameters
• init?: Partial
<MistralAI
>
Returns
Overrides
Defined in
packages/llamaindex/src/llm/mistral.ts:58
Properties
apiKey?
optional
apiKey:string
Defined in
packages/llamaindex/src/llm/mistral.ts:52
maxTokens?
optional
maxTokens:number
Defined in
packages/llamaindex/src/llm/mistral.ts:51
model
model:
"mistral-tiny"
|"mistral-small"
|"mistral-medium"
Defined in
packages/llamaindex/src/llm/mistral.ts:48
randomSeed?
optional
randomSeed:number
Defined in
packages/llamaindex/src/llm/mistral.ts:54
safeMode
safeMode:
boolean
Defined in
packages/llamaindex/src/llm/mistral.ts:53
temperature
temperature:
number
Defined in
packages/llamaindex/src/llm/mistral.ts:49
topP
topP:
number
Defined in
packages/llamaindex/src/llm/mistral.ts:50
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
Overrides
Defined in
packages/llamaindex/src/llm/mistral.ts:69
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
Defined in
packages/llamaindex/src/llm/mistral.ts:92
chat(params)
chat(
params
):Promise
<ChatResponse
<object
>>
Get a chat response from the LLM
Parameters
• params: LLMChatParamsNonStreaming
<object
, object
>
Returns
Promise
<ChatResponse
<object
>>
Overrides
Defined in
packages/llamaindex/src/llm/mistral.ts:95
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
Defined in
packages/core/llms/dist/index.d.ts:168
complete(params)
complete(
params
):Promise
<CompletionResponse
>
Get a prompt completion from the LLM
Parameters
• params: LLMCompletionParamsNonStreaming
Returns
Promise
<CompletionResponse
>
Inherited from
Defined in
packages/core/llms/dist/index.d.ts:169
streamChat()
protected
streamChat(__namedParameters
):AsyncIterable
<ChatResponseChunk
,any
,any
>
Parameters
• __namedParameters: LLMChatParamsStreaming
<object
, object
>
Returns
AsyncIterable
<ChatResponseChunk
, any
, any
>