Skip to content

Class: FunctionaryChatWrapper

Defined in: chatWrappers/FunctionaryChatWrapper.ts:11

Extends

Constructors

new FunctionaryChatWrapper()

ts
new FunctionaryChatWrapper(__namedParameters: {
  variation: "v3" | "v2.llama3" | "v2";
 }): FunctionaryChatWrapper

Defined in: chatWrappers/FunctionaryChatWrapper.ts:17

Parameters

ParameterType
__namedParameters{ variation: "v3" | "v2.llama3" | "v2"; }
__namedParameters.variation?"v3" | "v2.llama3" | "v2"

Returns

FunctionaryChatWrapper

Overrides

ChatWrapper.constructor

Properties

defaultSettings

ts
static defaultSettings: ChatWrapperSettings;

Defined in: ChatWrapper.ts:11

Inherited from

ChatWrapper.defaultSettings


wrapperName

ts
readonly wrapperName: string = "Functionary";

Defined in: chatWrappers/FunctionaryChatWrapper.ts:12

Overrides

ChatWrapper.wrapperName


variation

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

Defined in: chatWrappers/FunctionaryChatWrapper.ts:13


settings

ts
readonly settings: ChatWrapperSettings;

Defined in: chatWrappers/FunctionaryChatWrapper.ts:15

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


generateInitialChatHistory()

ts
generateInitialChatHistory(__namedParameters: ChatWrapperGenerateInitialHistoryOptions): ChatHistoryItem[]

Defined in: ChatWrapper.ts:217

Parameters

ParameterType
__namedParametersChatWrapperGenerateInitialHistoryOptions

Returns

ChatHistoryItem[]

Inherited from

ChatWrapper.generateInitialChatHistory


generateContextState()

ts
generateContextState(__namedParameters: ChatWrapperGenerateContextStateOptions): ChatWrapperGeneratedContextState

Defined in: chatWrappers/FunctionaryChatWrapper.ts:122

Parameters

ParameterType
__namedParametersChatWrapperGenerateContextStateOptions

Returns

ChatWrapperGeneratedContextState

Overrides

ChatWrapper.generateContextState


generateAvailableFunctionsSystemText()

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

Defined in: chatWrappers/FunctionaryChatWrapper.ts:648

Parameters

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

Returns

LlamaText

Overrides

ChatWrapper.generateAvailableFunctionsSystemText


addAvailableFunctionsSystemMessageToHistory()

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

Defined in: chatWrappers/FunctionaryChatWrapper.ts:690

Parameters

ParameterType
historyreadonly ChatHistoryItem[]
availableFunctions?ChatModelFunctions
__namedParameters?{ documentParams: boolean; }
__namedParameters.documentParams?boolean

Returns

readonly ChatHistoryItem[]

Overrides

ChatWrapper.addAvailableFunctionsSystemMessageToHistory