Class: AlpacaChatWrapper
Extends
Constructors
new AlpacaChatWrapper()
new AlpacaChatWrapper(__namedParameters: {
userMessageTitle: "Instruction";
modelResponseTitle: "Response";
middleSystemMessageTitle: "System";
allowSpecialTokensInTitles: false;
}): AlpacaChatWrapper
Parameters
Parameter | Type |
---|---|
__namedParameters | object |
__namedParameters.userMessageTitle ? | string |
__namedParameters.modelResponseTitle ? | string |
__namedParameters.middleSystemMessageTitle ? | string |
__namedParameters.allowSpecialTokensInTitles ? | boolean |
Returns
Overrides
GeneralChatWrapper
.constructor
Defined in
chatWrappers/AlpacaChatWrapper.ts:7
Properties
defaultSettings
static defaultSettings: ChatWrapperSettings;
Inherited from
GeneralChatWrapper
.defaultSettings
Defined in
settings
readonly settings: ChatWrapperSettings = ChatWrapper.defaultSettings;
Inherited from
Defined in
wrapperName
readonly wrapperName: string = "AlpacaChat";
Overrides
GeneralChatWrapper
.wrapperName
Defined in
chatWrappers/AlpacaChatWrapper.ts:5
Accessors
userMessageTitle
get userMessageTitle(): string
Returns
string
Overrides
GeneralChatWrapper
.userMessageTitle
Defined in
chatWrappers/AlpacaChatWrapper.ts:21
modelResponseTitle
get modelResponseTitle(): string
Returns
string
Overrides
GeneralChatWrapper
.modelResponseTitle
Defined in
chatWrappers/AlpacaChatWrapper.ts:25
middleSystemMessageTitle
get middleSystemMessageTitle(): string
Returns
string
Overrides
GeneralChatWrapper
.middleSystemMessageTitle
Defined in
chatWrappers/AlpacaChatWrapper.ts:29
Methods
generateFunctionCallsAndResults()
generateFunctionCallsAndResults(functionCalls: ChatModelFunctionCall[], useRawCall: boolean): LlamaText
Parameters
Parameter | Type | Default value |
---|---|---|
functionCalls | ChatModelFunctionCall [] | undefined |
useRawCall | boolean | true |
Returns
Inherited from
GeneralChatWrapper
.generateFunctionCallsAndResults
Defined in
generateFunctionCall()
generateFunctionCall(name: string, params: any): LlamaText
Parameters
Parameter | Type |
---|---|
name | string |
params | any |
Returns
Inherited from
GeneralChatWrapper
.generateFunctionCall
Defined in
generateFunctionCallResult()
generateFunctionCallResult(
functionName: string,
functionParams: any,
result: any): LlamaText
Parameters
Parameter | Type |
---|---|
functionName | string |
functionParams | any |
result | any |
Returns
Inherited from
GeneralChatWrapper
.generateFunctionCallResult
Defined in
generateModelResponseText()
generateModelResponseText(modelResponse: (string | ChatModelFunctionCall)[], useRawCall: boolean): LlamaText
Parameters
Parameter | Type | Default value |
---|---|---|
modelResponse | (string | ChatModelFunctionCall )[] | undefined |
useRawCall | boolean | true |
Returns
Inherited from
GeneralChatWrapper
.generateModelResponseText
Defined in
generateAvailableFunctionsSystemText()
generateAvailableFunctionsSystemText(availableFunctions: ChatModelFunctions, __namedParameters: {
documentParams: true;
}): LlamaText
Parameters
Parameter | Type |
---|---|
availableFunctions | ChatModelFunctions |
__namedParameters | object |
__namedParameters.documentParams ? | boolean |
Returns
Inherited from
GeneralChatWrapper
.generateAvailableFunctionsSystemText
Defined in
addAvailableFunctionsSystemMessageToHistory()
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
GeneralChatWrapper
.addAvailableFunctionsSystemMessageToHistory
Defined in
generateInitialChatHistory()
generateInitialChatHistory(__namedParameters: ChatWrapperGenerateInitialHistoryOptions): ChatHistoryItem[]
Parameters
Parameter | Type |
---|---|
__namedParameters | ChatWrapperGenerateInitialHistoryOptions |
Returns
Inherited from
GeneralChatWrapper
.generateInitialChatHistory
Defined in
generateContextState()
generateContextState(__namedParameters: ChatWrapperGenerateContextStateOptions): ChatWrapperGeneratedContextState
Parameters
Parameter | Type |
---|---|
__namedParameters | ChatWrapperGenerateContextStateOptions |
Returns
ChatWrapperGeneratedContextState
Inherited from
GeneralChatWrapper
.generateContextState