Class: MistralAI
MistralAI LLM implementation
Hierarchy
-
BaseLLM
↳
MistralAI
Constructors
constructor
• new MistralAI(init?
): MistralAI
Parameters
Name | Type |
---|---|
init? | Partial <MistralAI > |
Returns
Overrides
BaseLLM.constructor
Defined in
packages/core/src/llm/mistral.ts:58
Properties
apiKey
• Optional
apiKey: string
Defined in
packages/core/src/llm/mistral.ts:52
maxTokens
• Optional
maxTokens: number
Defined in
packages/core/src/llm/mistral.ts:51
model
• model: "mistral-tiny"
| "mistral-small"
| "mistral-medium"
Defined in
packages/core/src/llm/mistral.ts:48
randomSeed
• Optional
randomSeed: number
Defined in
packages/core/src/llm/mistral.ts:54
safeMode
• safeMode: boolean
Defined in
packages/core/src/llm/mistral.ts:53
session
• Private
session: MistralAISession
Defined in
packages/core/src/llm/mistral.ts:56
temperature
• temperature: number
Defined in
packages/core/src/llm/mistral.ts:49
topP
• topP: number
Defined in
packages/core/src/llm/mistral.ts:50
Accessors
metadata
• get
metadata(): Object
Returns
Object
Name | Type |
---|---|
contextWindow | number |
maxTokens | undefined | number |
model | "mistral-tiny" | "mistral-small" | "mistral-medium" |
temperature | number |
tokenizer | undefined |
topP | number |
Overrides
BaseLLM.metadata
Defined in
packages/core/src/llm/mistral.ts:69
Methods
buildParams
▸ buildParams(messages
): any
Parameters
Name | Type |
---|---|
messages | ChatMessage [] |
Returns
any
Defined in
packages/core/src/llm/mistral.ts:80
chat
▸ chat(params
): Promise
<AsyncIterable
<ChatResponseChunk
>>
Parameters
Name | Type |
---|---|
params | LLMChatParamsStreaming <object , object > |
Returns
Promise
<AsyncIterable
<ChatResponseChunk
>>
Overrides
BaseLLM.chat
Defined in
packages/core/src/llm/mistral.ts:92
▸ chat(params
): Promise
<ChatResponse
<object
>>
Parameters
Name | Type |
---|---|
params | LLMChatParamsNonStreaming <object , object > |
Returns
Promise
<ChatResponse
<object
>>
Overrides
BaseLLM.chat