Class: FunctionaryChatWrapper
Extends
Constructors
new FunctionaryChatWrapper()
ts
new FunctionaryChatWrapper(__namedParameters: {
variation: "v3";
}): FunctionaryChatWrapper
Parameters
Parameter | Type |
---|---|
__namedParameters | object |
__namedParameters.variation ? | "v3" | "v2.llama3" | "v2" |
Returns
Overrides
Defined in
chatWrappers/FunctionaryChatWrapper.ts:17
Properties
defaultSettings
ts
static defaultSettings: ChatWrapperSettings;
Inherited from
Defined in
wrapperName
ts
readonly wrapperName: string = "Functionary";
Overrides
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
Defined in
chatWrappers/FunctionaryChatWrapper.ts:15
Methods
generateFunctionCallsAndResults()
ts
generateFunctionCallsAndResults(functionCalls: ChatModelFunctionCall[], useRawCall: boolean): LlamaText
Parameters
Parameter | Type | Default value |
---|---|---|
functionCalls | ChatModelFunctionCall [] | undefined |
useRawCall | boolean | true |
Returns
Inherited from
ChatWrapper
.generateFunctionCallsAndResults
Defined in
generateFunctionCall()
ts
generateFunctionCall(name: string, params: any): LlamaText
Parameters
Parameter | Type |
---|---|
name | string |
params | any |
Returns
Inherited from
ChatWrapper
.generateFunctionCall
Defined in
generateFunctionCallResult()
ts
generateFunctionCallResult(
functionName: string,
functionParams: any,
result: any): LlamaText
Parameters
Parameter | Type |
---|---|
functionName | string |
functionParams | any |
result | any |
Returns
Inherited from
ChatWrapper
.generateFunctionCallResult
Defined in
generateModelResponseText()
ts
generateModelResponseText(modelResponse: (string | ChatModelFunctionCall)[], useRawCall: boolean): LlamaText
Parameters
Parameter | Type | Default value |
---|---|---|
modelResponse | (string | ChatModelFunctionCall )[] | undefined |
useRawCall | boolean | true |
Returns
Inherited from
ChatWrapper
.generateModelResponseText
Defined in
generateInitialChatHistory()
ts
generateInitialChatHistory(__namedParameters: ChatWrapperGenerateInitialHistoryOptions): ChatHistoryItem[]
Parameters
Parameter | Type |
---|---|
__namedParameters | ChatWrapperGenerateInitialHistoryOptions |
Returns
Inherited from
ChatWrapper
.generateInitialChatHistory
Defined in
generateContextState()
ts
generateContextState(__namedParameters: ChatWrapperGenerateContextStateOptions): ChatWrapperGeneratedContextState
Parameters
Parameter | Type |
---|---|
__namedParameters | ChatWrapperGenerateContextStateOptions |
Returns
ChatWrapperGeneratedContextState
Overrides
ChatWrapper
.generateContextState
Defined in
chatWrappers/FunctionaryChatWrapper.ts:122
generateAvailableFunctionsSystemText()
ts
generateAvailableFunctionsSystemText(availableFunctions: ChatModelFunctions, __namedParameters: {
documentParams: true;
}): LlamaText
Parameters
Parameter | Type |
---|---|
availableFunctions | ChatModelFunctions |
__namedParameters | object |
__namedParameters.documentParams ? | boolean |
Returns
Overrides
ChatWrapper
.generateAvailableFunctionsSystemText
Defined in
chatWrappers/FunctionaryChatWrapper.ts:648
addAvailableFunctionsSystemMessageToHistory()
ts
addAvailableFunctionsSystemMessageToHistory(
history: readonly ChatHistoryItem[],
availableFunctions?: ChatModelFunctions,
__namedParameters?: {
documentParams: true;
}): readonly ChatHistoryItem[]
Parameters
Parameter | Type |
---|---|
history | readonly ChatHistoryItem [] |
availableFunctions ? | ChatModelFunctions |
__namedParameters ? | object |
__namedParameters.documentParams ? | boolean |
Returns
readonly ChatHistoryItem
[]
Overrides
ChatWrapper
.addAvailableFunctionsSystemMessageToHistory