Class: Llama3_1ChatWrapper
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
Parameters
Parameter | Type | Description |
---|---|---|
options | object | |
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
Defined in
chatWrappers/Llama3_1ChatWrapper.ts:39
Properties
defaultSettings
static defaultSettings: ChatWrapperSettings;
Inherited from
Defined in
wrapperName
readonly wrapperName: string = "Llama 3.1";
Overrides
Defined in
chatWrappers/Llama3_1ChatWrapper.ts:12
cuttingKnowledgeDate?
readonly optional cuttingKnowledgeDate: null | Date | () => Date;
Defined in
chatWrappers/Llama3_1ChatWrapper.ts:14
todayDate
readonly todayDate: null | Date | () => Date;
Defined in
chatWrappers/Llama3_1ChatWrapper.ts:15
noToolInstructions
readonly noToolInstructions: boolean;
Defined in
chatWrappers/Llama3_1ChatWrapper.ts:16
settings
readonly settings: ChatWrapperSettings;
Overrides
Defined in
chatWrappers/Llama3_1ChatWrapper.ts:20
Methods
generateFunctionCallsAndResults()
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()
generateFunctionCall(name: string, params: any): LlamaText
Parameters
Parameter | Type |
---|---|
name | string |
params | any |
Returns
Inherited from
ChatWrapper
.generateFunctionCall
Defined in
generateFunctionCallResult()
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()
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
generateInitialChatHistory()
generateInitialChatHistory(__namedParameters: ChatWrapperGenerateInitialHistoryOptions): ChatHistoryItem[]
Parameters
Parameter | Type |
---|---|
__namedParameters | ChatWrapperGenerateInitialHistoryOptions |
Returns
Inherited from
ChatWrapper
.generateInitialChatHistory
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
[]
Overrides
ChatWrapper
.addAvailableFunctionsSystemMessageToHistory
Defined in
chatWrappers/Llama3_1ChatWrapper.ts:84
generateContextState()
generateContextState(__namedParameters: ChatWrapperGenerateContextStateOptions): ChatWrapperGeneratedContextState
Parameters
Parameter | Type |
---|---|
__namedParameters | ChatWrapperGenerateContextStateOptions |
Returns
ChatWrapperGeneratedContextState
Overrides
ChatWrapper
.generateContextState
Defined in
chatWrappers/Llama3_1ChatWrapper.ts:115
generateAvailableFunctionsSystemText()
generateAvailableFunctionsSystemText(availableFunctions: ChatModelFunctions, __namedParameters: {
documentParams: true;
}): LlamaText
Parameters
Parameter | Type |
---|---|
availableFunctions | ChatModelFunctions |
__namedParameters | object |
__namedParameters.documentParams ? | boolean |
Returns
Overrides
ChatWrapper
.generateAvailableFunctionsSystemText
Defined in
chatWrappers/Llama3_1ChatWrapper.ts:238
prependPreambleToChatHistory()
prependPreambleToChatHistory(chatHistory: readonly ChatHistoryItem[]): readonly ChatHistoryItem[]
Parameters
Parameter | Type |
---|---|
chatHistory | readonly ChatHistoryItem [] |
Returns
readonly ChatHistoryItem
[]