Skip to content

Class: MistralChatWrapper

Defined in: chatWrappers/MistralChatWrapper.ts:14

Extends

Constructors

new MistralChatWrapper()

ts
new MistralChatWrapper(__namedParameters: {
  addSpaceBeforeEos: boolean;
 }): MistralChatWrapper

Defined in: chatWrappers/MistralChatWrapper.ts:47

Parameters

ParameterTypeDescription
__namedParameters{ addSpaceBeforeEos: boolean; }-
__namedParameters.addSpaceBeforeEos?booleanDefault to true

Returns

MistralChatWrapper

Overrides

ChatWrapper.constructor

Properties

defaultSettings

ts
static defaultSettings: ChatWrapperSettings;

Defined in: ChatWrapper.ts:11

Inherited from

ChatWrapper.defaultSettings


wrapperName

ts
readonly wrapperName: string = "Mistral";

Defined in: chatWrappers/MistralChatWrapper.ts:15

Overrides

ChatWrapper.wrapperName


settings

ts
readonly settings: ChatWrapperSettings;

Defined in: chatWrappers/MistralChatWrapper.ts:17

Overrides

ChatWrapper.settings

Methods

generateFunctionCallsAndResults()

ts
generateFunctionCallsAndResults(functionCalls: ChatModelFunctionCall[], useRawCall: boolean): LlamaText

Defined in: ChatWrapper.ts:55

Parameters

ParameterTypeDefault value
functionCallsChatModelFunctionCall[]undefined
useRawCallbooleantrue

Returns

LlamaText

Inherited from

ChatWrapper.generateFunctionCallsAndResults


generateFunctionCall()

ts
generateFunctionCall(name: string, params: any): LlamaText

Defined in: ChatWrapper.ts:102

Parameters

ParameterType
namestring
paramsany

Returns

LlamaText

Inherited from

ChatWrapper.generateFunctionCall


generateFunctionCallResult()

ts
generateFunctionCallResult(
   functionName: string, 
   functionParams: any, 
   result: any): LlamaText

Defined in: ChatWrapper.ts:116

Parameters

ParameterType
functionNamestring
functionParamsany
resultany

Returns

LlamaText

Inherited from

ChatWrapper.generateFunctionCallResult


generateModelResponseText()

ts
generateModelResponseText(modelResponse: (
  | string
  | ChatModelFunctionCall)[], useRawCall: boolean): LlamaText

Defined in: ChatWrapper.ts:140

Parameters

ParameterTypeDefault value
modelResponse( | string | ChatModelFunctionCall)[]undefined
useRawCallbooleantrue

Returns

LlamaText

Inherited from

ChatWrapper.generateModelResponseText


generateAvailableFunctionsSystemText()

ts
generateAvailableFunctionsSystemText(availableFunctions: ChatModelFunctions, __namedParameters: {
  documentParams: boolean;
 }): LlamaText

Defined in: ChatWrapper.ts:170

Parameters

ParameterType
availableFunctionsChatModelFunctions
__namedParameters{ documentParams: boolean; }
__namedParameters.documentParams?boolean

Returns

LlamaText

Inherited from

ChatWrapper.generateAvailableFunctionsSystemText


addAvailableFunctionsSystemMessageToHistory()

ts
addAvailableFunctionsSystemMessageToHistory(history: readonly ChatHistoryItem[]): readonly ChatHistoryItem[]

Defined in: chatWrappers/MistralChatWrapper.ts:60

Parameters

ParameterType
historyreadonly ChatHistoryItem[]

Returns

readonly ChatHistoryItem[]

Overrides

ChatWrapper.addAvailableFunctionsSystemMessageToHistory


generateContextState()

ts
generateContextState(__namedParameters: ChatWrapperGenerateContextStateOptions): ChatWrapperGeneratedContextState

Defined in: chatWrappers/MistralChatWrapper.ts:64

Parameters

ParameterType
__namedParametersChatWrapperGenerateContextStateOptions

Returns

ChatWrapperGeneratedContextState

Overrides

ChatWrapper.generateContextState


generateInitialChatHistory()

ts
generateInitialChatHistory(__namedParameters: ChatWrapperGenerateInitialHistoryOptions): ChatHistoryItem[]

Defined in: chatWrappers/MistralChatWrapper.ts:139

Parameters

ParameterType
__namedParametersChatWrapperGenerateInitialHistoryOptions

Returns

ChatHistoryItem[]

Overrides

ChatWrapper.generateInitialChatHistory