Class: AlpacaChatWrapper
Defined in: chatWrappers/AlpacaChatWrapper.ts:8
This chat wrapper is not safe against chat syntax injection attacks (learn more).
Extends
Constructors
new AlpacaChatWrapper()
new AlpacaChatWrapper(__namedParameters: {
userMessageTitle: string;
modelResponseTitle: string;
middleSystemMessageTitle: string;
allowSpecialTokensInTitles: boolean;
}): AlpacaChatWrapper
Defined in: chatWrappers/AlpacaChatWrapper.ts:11
Parameters
Parameter | Type |
---|---|
__namedParameters | { userMessageTitle : string ; modelResponseTitle : string ; middleSystemMessageTitle : string ; allowSpecialTokensInTitles : boolean ; } |
__namedParameters.userMessageTitle ? | string |
__namedParameters.modelResponseTitle ? | string |
__namedParameters.middleSystemMessageTitle ? | string |
__namedParameters.allowSpecialTokensInTitles ? | boolean |
Returns
Overrides
GeneralChatWrapper
.constructor
Properties
defaultSettings
static defaultSettings: ChatWrapperSettings;
Defined in: ChatWrapper.ts:11
Inherited from
GeneralChatWrapper
.defaultSettings
settings
readonly settings: ChatWrapperSettings = ChatWrapper.defaultSettings;
Defined in: ChatWrapper.ts:28
Inherited from
wrapperName
readonly wrapperName: string = "AlpacaChat";
Defined in: chatWrappers/AlpacaChatWrapper.ts:9
Overrides
GeneralChatWrapper
.wrapperName
Accessors
userMessageTitle
Get Signature
get userMessageTitle(): string
Defined in: chatWrappers/AlpacaChatWrapper.ts:25
Returns
string
Overrides
GeneralChatWrapper
.userMessageTitle
modelResponseTitle
Get Signature
get modelResponseTitle(): string
Defined in: chatWrappers/AlpacaChatWrapper.ts:29
Returns
string
Overrides
GeneralChatWrapper
.modelResponseTitle
middleSystemMessageTitle
Get Signature
get middleSystemMessageTitle(): string
Defined in: chatWrappers/AlpacaChatWrapper.ts:33
Returns
string
Overrides
GeneralChatWrapper
.middleSystemMessageTitle
Methods
generateFunctionCallsAndResults()
generateFunctionCallsAndResults(functionCalls: ChatModelFunctionCall[], useRawCall: boolean): LlamaText
Defined in: ChatWrapper.ts:55
Parameters
Parameter | Type | Default value |
---|---|---|
functionCalls | ChatModelFunctionCall [] | undefined |
useRawCall | boolean | true |
Returns
Inherited from
GeneralChatWrapper
.generateFunctionCallsAndResults
generateFunctionCall()
generateFunctionCall(name: string, params: any): LlamaText
Defined in: ChatWrapper.ts:102
Parameters
Parameter | Type |
---|---|
name | string |
params | any |
Returns
Inherited from
GeneralChatWrapper
.generateFunctionCall
generateFunctionCallResult()
generateFunctionCallResult(
functionName: string,
functionParams: any,
result: any): LlamaText
Defined in: ChatWrapper.ts:116
Parameters
Parameter | Type |
---|---|
functionName | string |
functionParams | any |
result | any |
Returns
Inherited from
GeneralChatWrapper
.generateFunctionCallResult
generateModelResponseText()
generateModelResponseText(modelResponse: (
| string
| ChatModelFunctionCall)[], useRawCall: boolean): LlamaText
Defined in: ChatWrapper.ts:140
Parameters
Parameter | Type | Default value |
---|---|---|
modelResponse | ( | string | ChatModelFunctionCall )[] | undefined |
useRawCall | boolean | true |
Returns
Inherited from
GeneralChatWrapper
.generateModelResponseText
generateAvailableFunctionsSystemText()
generateAvailableFunctionsSystemText(availableFunctions: ChatModelFunctions, __namedParameters: {
documentParams: boolean;
}): LlamaText
Defined in: ChatWrapper.ts:170
Parameters
Parameter | Type |
---|---|
availableFunctions | ChatModelFunctions |
__namedParameters | { documentParams : boolean ; } |
__namedParameters.documentParams ? | boolean |
Returns
Inherited from
GeneralChatWrapper
.generateAvailableFunctionsSystemText
addAvailableFunctionsSystemMessageToHistory()
addAvailableFunctionsSystemMessageToHistory(
history: readonly ChatHistoryItem[],
availableFunctions?: ChatModelFunctions,
__namedParameters?: {
documentParams: boolean;
}): readonly ChatHistoryItem[]
Defined in: ChatWrapper.ts:196
Parameters
Parameter | Type |
---|---|
history | readonly ChatHistoryItem [] |
availableFunctions ? | ChatModelFunctions |
__namedParameters ? | { documentParams : boolean ; } |
__namedParameters.documentParams ? | boolean |
Returns
readonly ChatHistoryItem
[]
Inherited from
GeneralChatWrapper
.addAvailableFunctionsSystemMessageToHistory
generateInitialChatHistory()
generateInitialChatHistory(__namedParameters: ChatWrapperGenerateInitialHistoryOptions): ChatHistoryItem[]
Defined in: ChatWrapper.ts:217
Parameters
Parameter | Type |
---|---|
__namedParameters | ChatWrapperGenerateInitialHistoryOptions |
Returns
Inherited from
GeneralChatWrapper
.generateInitialChatHistory
generateContextState()
generateContextState(__namedParameters: ChatWrapperGenerateContextStateOptions): ChatWrapperGeneratedContextState
Defined in: chatWrappers/GeneralChatWrapper.ts:43
Parameters
Parameter | Type |
---|---|
__namedParameters | ChatWrapperGenerateContextStateOptions |
Returns
ChatWrapperGeneratedContextState