Class: Llama3_2LightweightChatWrapper
Extends
Constructors
new Llama3_2LightweightChatWrapper()
new Llama3_2LightweightChatWrapper(options: {
cuttingKnowledgeDate: | null
| string
| number
| Date
| () => Date;
todayDate: | null
| string
| number
| Date
| () => Date;
noToolInstructions: boolean;
}): Llama3_2LightweightChatWrapper
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
Llama3_2LightweightChatWrapper
Overrides
Defined in
chatWrappers/Llama3_2LightweightChatWrapper.ts:39
Properties
defaultSettings
static defaultSettings: ChatWrapperSettings;
Inherited from
Defined in
wrapperName
readonly wrapperName: string = "Llama 3.2 lightweight";
Overrides
Defined in
chatWrappers/Llama3_2LightweightChatWrapper.ts:12
cuttingKnowledgeDate?
readonly optional cuttingKnowledgeDate: null | Date | () => Date;
Defined in
chatWrappers/Llama3_2LightweightChatWrapper.ts:14
todayDate
readonly todayDate: null | Date | () => Date;
Defined in
chatWrappers/Llama3_2LightweightChatWrapper.ts:15
noToolInstructions
readonly noToolInstructions: boolean;
Defined in
chatWrappers/Llama3_2LightweightChatWrapper.ts:16
settings
readonly settings: ChatWrapperSettings;
Overrides
Defined in
chatWrappers/Llama3_2LightweightChatWrapper.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: boolean;
}): readonly ChatHistoryItem[]
Parameters
Parameter | Type |
---|---|
history | readonly ChatHistoryItem [] |
availableFunctions ? | ChatModelFunctions |
__namedParameters ? | { documentParams : boolean ; } |
__namedParameters.documentParams ? | boolean |
Returns
readonly ChatHistoryItem
[]
Overrides
ChatWrapper
.addAvailableFunctionsSystemMessageToHistory
Defined in
chatWrappers/Llama3_2LightweightChatWrapper.ts:84
generateContextState()
generateContextState(__namedParameters: ChatWrapperGenerateContextStateOptions): ChatWrapperGeneratedContextState
Parameters
Parameter | Type |
---|---|
__namedParameters | ChatWrapperGenerateContextStateOptions |
Returns
ChatWrapperGeneratedContextState
Overrides
ChatWrapper
.generateContextState
Defined in
chatWrappers/Llama3_2LightweightChatWrapper.ts:115
generateAvailableFunctionsSystemText()
generateAvailableFunctionsSystemText(availableFunctions: ChatModelFunctions, __namedParameters: {
documentParams: boolean;
}): LlamaText
Parameters
Parameter | Type |
---|---|
availableFunctions | ChatModelFunctions |
__namedParameters | { documentParams : boolean ; } |
__namedParameters.documentParams ? | boolean |
Returns
Overrides
ChatWrapper
.generateAvailableFunctionsSystemText
Defined in
chatWrappers/Llama3_2LightweightChatWrapper.ts:238
prependPreambleToChatHistory()
prependPreambleToChatHistory(chatHistory: readonly ChatHistoryItem[]): readonly ChatHistoryItem[]
Parameters
Parameter | Type |
---|---|
chatHistory | readonly ChatHistoryItem [] |
Returns
readonly ChatHistoryItem
[]