Class: Llama3_1ChatWrapper
Defined in: chatWrappers/Llama3_1ChatWrapper.ts:12
Extends
Constructors
new Llama3_1ChatWrapper()
new Llama3_1ChatWrapper(options: {
cuttingKnowledgeDate: | null
| string
| number
| Date
| () => Date;
todayDate: | null
| string
| number
| Date
| () => Date;
noToolInstructions: boolean;
}): Llama3_1ChatWrapper
Defined in: chatWrappers/Llama3_1ChatWrapper.ts:40
Parameters
Parameter | Type | Description |
---|---|---|
options | { cuttingKnowledgeDate : | null | string | number | Date | () => Date ; todayDate : | null | string | number | Date | () => Date ; noToolInstructions : boolean ; } | |
options.cuttingKnowledgeDate ? | | null | string | number | Date | () => Date | Set to null to disable Defaults to December 2023 |
options.todayDate ? | | null | string | number | Date | () => Date | Set to null to disable Defaults to current date |
options.noToolInstructions ? | boolean | - |
Returns
Overrides
Properties
defaultSettings
static defaultSettings: ChatWrapperSettings;
Defined in: ChatWrapper.ts:11
Inherited from
wrapperName
readonly wrapperName: string = "Llama 3.1";
Defined in: chatWrappers/Llama3_1ChatWrapper.ts:13
Overrides
cuttingKnowledgeDate?
readonly optional cuttingKnowledgeDate:
| null
| Date
| () => Date;
Defined in: chatWrappers/Llama3_1ChatWrapper.ts:15
todayDate
readonly todayDate:
| null
| Date
| () => Date;
Defined in: chatWrappers/Llama3_1ChatWrapper.ts:16
noToolInstructions
readonly noToolInstructions: boolean;
Defined in: chatWrappers/Llama3_1ChatWrapper.ts:17
settings
readonly settings: ChatWrapperSettings;
Defined in: chatWrappers/Llama3_1ChatWrapper.ts:21
Overrides
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
ChatWrapper
.generateFunctionCallsAndResults
generateFunctionCall()
generateFunctionCall(name: string, params: any): LlamaText
Defined in: ChatWrapper.ts:102
Parameters
Parameter | Type |
---|---|
name | string |
params | any |
Returns
Inherited from
ChatWrapper
.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
ChatWrapper
.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
ChatWrapper
.generateModelResponseText
generateInitialChatHistory()
generateInitialChatHistory(__namedParameters: ChatWrapperGenerateInitialHistoryOptions): ChatHistoryItem[]
Defined in: ChatWrapper.ts:217
Parameters
Parameter | Type |
---|---|
__namedParameters | ChatWrapperGenerateInitialHistoryOptions |
Returns
Inherited from
ChatWrapper
.generateInitialChatHistory
addAvailableFunctionsSystemMessageToHistory()
addAvailableFunctionsSystemMessageToHistory(
history: readonly ChatHistoryItem[],
availableFunctions?: ChatModelFunctions,
__namedParameters?: {
documentParams: boolean;
}): readonly ChatHistoryItem[]
Defined in: chatWrappers/Llama3_1ChatWrapper.ts:85
Parameters
Parameter | Type |
---|---|
history | readonly ChatHistoryItem [] |
availableFunctions ? | ChatModelFunctions |
__namedParameters ? | { documentParams : boolean ; } |
__namedParameters.documentParams ? | boolean |
Returns
readonly ChatHistoryItem
[]
Overrides
ChatWrapper
.addAvailableFunctionsSystemMessageToHistory
generateContextState()
generateContextState(__namedParameters: ChatWrapperGenerateContextStateOptions): ChatWrapperGeneratedContextState
Defined in: chatWrappers/Llama3_1ChatWrapper.ts:116
Parameters
Parameter | Type |
---|---|
__namedParameters | ChatWrapperGenerateContextStateOptions |
Returns
ChatWrapperGeneratedContextState
Overrides
ChatWrapper
.generateContextState
generateAvailableFunctionsSystemText()
generateAvailableFunctionsSystemText(availableFunctions: ChatModelFunctions, __namedParameters: {
documentParams: boolean;
}): LlamaText
Defined in: chatWrappers/Llama3_1ChatWrapper.ts:239
Parameters
Parameter | Type |
---|---|
availableFunctions | ChatModelFunctions |
__namedParameters | { documentParams : boolean ; } |
__namedParameters.documentParams ? | boolean |
Returns
Overrides
ChatWrapper
.generateAvailableFunctionsSystemText
prependPreambleToChatHistory()
prependPreambleToChatHistory(chatHistory: readonly ChatHistoryItem[]): readonly ChatHistoryItem[]
Defined in: chatWrappers/Llama3_1ChatWrapper.ts:278
Parameters
Parameter | Type |
---|---|
chatHistory | readonly ChatHistoryItem [] |
Returns
readonly ChatHistoryItem
[]