Class: GeneralChatWrapper
Extends
Extended by
Constructors
new GeneralChatWrapper()
ts
new GeneralChatWrapper(__namedParameters: {
userMessageTitle: "Human";
modelResponseTitle: "Assistant";
middleSystemMessageTitle: "System";
allowSpecialTokensInTitles: false;
}): GeneralChatWrapper
Parameters
Parameter | Type |
---|---|
__namedParameters | object |
__namedParameters.userMessageTitle ? | string |
__namedParameters.modelResponseTitle ? | string |
__namedParameters.middleSystemMessageTitle ? | string |
__namedParameters.allowSpecialTokensInTitles ? | boolean |
Returns
Overrides
Defined in
chatWrappers/GeneralChatWrapper.ts:13
Properties
defaultSettings
ts
static defaultSettings: ChatWrapperSettings;
Inherited from
Defined in
settings
ts
readonly settings: ChatWrapperSettings = ChatWrapper.defaultSettings;
Inherited from
Defined in
wrapperName
ts
readonly wrapperName: string = "General";
Overrides
Defined in
chatWrappers/GeneralChatWrapper.ts:6
Accessors
userMessageTitle
ts
get userMessageTitle(): string
Returns
string
Defined in
chatWrappers/GeneralChatWrapper.ts:27
modelResponseTitle
ts
get modelResponseTitle(): string
Returns
string
Defined in
chatWrappers/GeneralChatWrapper.ts:31
middleSystemMessageTitle
ts
get middleSystemMessageTitle(): string
Returns
string
Defined in
chatWrappers/GeneralChatWrapper.ts:35
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
generateAvailableFunctionsSystemText()
ts
generateAvailableFunctionsSystemText(availableFunctions: ChatModelFunctions, __namedParameters: {
documentParams: true;
}): LlamaText
Parameters
Parameter | Type |
---|---|
availableFunctions | ChatModelFunctions |
__namedParameters | object |
__namedParameters.documentParams ? | boolean |
Returns
Inherited from
ChatWrapper
.generateAvailableFunctionsSystemText
Defined in
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
[]
Inherited from
ChatWrapper
.addAvailableFunctionsSystemMessageToHistory
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