Skip to content

Class: FunctionaryChatWrapper

Extends

Constructors

new FunctionaryChatWrapper()

ts
new FunctionaryChatWrapper(__namedParameters: {
  variation: "v3";
 }): FunctionaryChatWrapper

Parameters

ParameterType
__namedParametersobject
__namedParameters.variation?"v3" | "v2.llama3" | "v2"

Returns

FunctionaryChatWrapper

Overrides

ChatWrapper.constructor

Defined in

chatWrappers/FunctionaryChatWrapper.ts:17

Properties

defaultSettings

ts
static defaultSettings: ChatWrapperSettings;

Inherited from

ChatWrapper.defaultSettings

Defined in

ChatWrapper.ts:11


wrapperName

ts
readonly wrapperName: string = "Functionary";

Overrides

ChatWrapper.wrapperName

Defined in

chatWrappers/FunctionaryChatWrapper.ts:12


variation

ts
readonly variation: "v3" | "v2.llama3" | "v2";

Defined in

chatWrappers/FunctionaryChatWrapper.ts:13


settings

ts
readonly settings: ChatWrapperSettings;

Overrides

ChatWrapper.settings

Defined in

chatWrappers/FunctionaryChatWrapper.ts:15

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


generateInitialChatHistory()

ts
generateInitialChatHistory(__namedParameters: ChatWrapperGenerateInitialHistoryOptions): ChatHistoryItem[]

Parameters

ParameterType
__namedParametersChatWrapperGenerateInitialHistoryOptions

Returns

ChatHistoryItem[]

Inherited from

ChatWrapper.generateInitialChatHistory

Defined in

ChatWrapper.ts:217


generateContextState()

ts
generateContextState(__namedParameters: ChatWrapperGenerateContextStateOptions): ChatWrapperGeneratedContextState

Parameters

ParameterType
__namedParametersChatWrapperGenerateContextStateOptions

Returns

ChatWrapperGeneratedContextState

Overrides

ChatWrapper.generateContextState

Defined in

chatWrappers/FunctionaryChatWrapper.ts:122


generateAvailableFunctionsSystemText()

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

Parameters

ParameterType
availableFunctionsChatModelFunctions
__namedParametersobject
__namedParameters.documentParams?boolean

Returns

LlamaText

Overrides

ChatWrapper.generateAvailableFunctionsSystemText

Defined in

chatWrappers/FunctionaryChatWrapper.ts:648


addAvailableFunctionsSystemMessageToHistory()

ts
addAvailableFunctionsSystemMessageToHistory(
   history: readonly ChatHistoryItem[], 
   availableFunctions?: ChatModelFunctions, 
   __namedParameters?: {
  documentParams: true;
 }): readonly ChatHistoryItem[]

Parameters

ParameterType
historyreadonly ChatHistoryItem[]
availableFunctions?ChatModelFunctions
__namedParameters?object
__namedParameters.documentParams?boolean

Returns

readonly ChatHistoryItem[]

Overrides

ChatWrapper.addAvailableFunctionsSystemMessageToHistory

Defined in

chatWrappers/FunctionaryChatWrapper.ts:690