Skip to content

Class: MistralChatWrapper

Extends

Constructors

new MistralChatWrapper()

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

Parameters

ParameterTypeDescription
__namedParametersobject-
__namedParameters.addSpaceBeforeEos?booleanDefault to true

Returns

MistralChatWrapper

Overrides

ChatWrapper.constructor

Defined in

chatWrappers/MistralChatWrapper.ts:47

Properties

defaultSettings

ts
static defaultSettings: ChatWrapperSettings;

Inherited from

ChatWrapper.defaultSettings

Defined in

ChatWrapper.ts:11


wrapperName

ts
readonly wrapperName: string = "Mistral";

Overrides

ChatWrapper.wrapperName

Defined in

chatWrappers/MistralChatWrapper.ts:15


settings

ts
readonly settings: ChatWrapperSettings;

Overrides

ChatWrapper.settings

Defined in

chatWrappers/MistralChatWrapper.ts:17

Methods

generateFunctionCallsAndResults()

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

Parameters

ParameterTypeDefault value
functionCallsChatModelFunctionCall[]undefined
useRawCallbooleantrue

Returns

LlamaText

Inherited from

ChatWrapper.generateFunctionCallsAndResults

Defined in

ChatWrapper.ts:55


generateFunctionCall()

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

Parameters

ParameterType
namestring
paramsany

Returns

LlamaText

Inherited from

ChatWrapper.generateFunctionCall

Defined in

ChatWrapper.ts:102


generateFunctionCallResult()

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

Parameters

ParameterType
functionNamestring
functionParamsany
resultany

Returns

LlamaText

Inherited from

ChatWrapper.generateFunctionCallResult

Defined in

ChatWrapper.ts:116


generateModelResponseText()

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

Parameters

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

Returns

LlamaText

Inherited from

ChatWrapper.generateModelResponseText

Defined in

ChatWrapper.ts:140


generateAvailableFunctionsSystemText()

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

Parameters

ParameterType
availableFunctionsChatModelFunctions
__namedParametersobject
__namedParameters.documentParams?boolean

Returns

LlamaText

Inherited from

ChatWrapper.generateAvailableFunctionsSystemText

Defined in

ChatWrapper.ts:170


addAvailableFunctionsSystemMessageToHistory()

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

Parameters

ParameterType
historyreadonly ChatHistoryItem[]

Returns

readonly ChatHistoryItem[]

Overrides

ChatWrapper.addAvailableFunctionsSystemMessageToHistory

Defined in

chatWrappers/MistralChatWrapper.ts:60


generateContextState()

ts
generateContextState(__namedParameters: ChatWrapperGenerateContextStateOptions): ChatWrapperGeneratedContextState

Parameters

ParameterType
__namedParametersChatWrapperGenerateContextStateOptions

Returns

ChatWrapperGeneratedContextState

Overrides

ChatWrapper.generateContextState

Defined in

chatWrappers/MistralChatWrapper.ts:64


generateInitialChatHistory()

ts
generateInitialChatHistory(__namedParameters: ChatWrapperGenerateInitialHistoryOptions): ChatHistoryItem[]

Parameters

ParameterType
__namedParametersChatWrapperGenerateInitialHistoryOptions

Returns

ChatHistoryItem[]

Overrides

ChatWrapper.generateInitialChatHistory

Defined in

chatWrappers/MistralChatWrapper.ts:139