Skip to content

Class: FalconChatWrapper

Extends

Constructors

new FalconChatWrapper()

ts
new FalconChatWrapper(__namedParameters: {
  userMessageTitle: "User";
  modelResponseTitle: "Assistant";
  middleSystemMessageTitle: "System";
  allowSpecialTokensInTitles: false;
 }): FalconChatWrapper

Parameters

ParameterType
__namedParametersobject
__namedParameters.userMessageTitle?string
__namedParameters.modelResponseTitle?string
__namedParameters.middleSystemMessageTitle?string
__namedParameters.allowSpecialTokensInTitles?boolean

Returns

FalconChatWrapper

Overrides

ChatWrapper.constructor

Defined in

chatWrappers/FalconChatWrapper.ts:13

Properties

defaultSettings

ts
static defaultSettings: ChatWrapperSettings;

Inherited from

ChatWrapper.defaultSettings

Defined in

ChatWrapper.ts:11


settings

ts
readonly settings: ChatWrapperSettings = ChatWrapper.defaultSettings;

Inherited from

ChatWrapper.settings

Defined in

ChatWrapper.ts:28


wrapperName

ts
readonly wrapperName: string = "Falcon";

Overrides

ChatWrapper.wrapperName

Defined in

chatWrappers/FalconChatWrapper.ts:6

Accessors

userMessageTitle

ts
get userMessageTitle(): string

Returns

string

Defined in

chatWrappers/FalconChatWrapper.ts:26


modelResponseTitle

ts
get modelResponseTitle(): string

Returns

string

Defined in

chatWrappers/FalconChatWrapper.ts:30


middleSystemMessageTitle

ts
get middleSystemMessageTitle(): string

Returns

string

Defined in

chatWrappers/FalconChatWrapper.ts:34

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[], 
   availableFunctions?: ChatModelFunctions, 
   __namedParameters?: {
  documentParams: true;
 }): readonly ChatHistoryItem[]

Parameters

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

Returns

readonly ChatHistoryItem[]

Inherited from

ChatWrapper.addAvailableFunctionsSystemMessageToHistory

Defined in

ChatWrapper.ts:196


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/FalconChatWrapper.ts:38