Skip to content

Class: Llama3_2LightweightChatWrapper

Extends

Constructors

new Llama3_2LightweightChatWrapper()

ts
new Llama3_2LightweightChatWrapper(options: {
  cuttingKnowledgeDate:   | null
     | string
     | number
     | Date
     | () => Date;
  todayDate:   | null
     | string
     | number
     | Date
     | () => Date;
  noToolInstructions: boolean;
 }): Llama3_2LightweightChatWrapper

Parameters

ParameterTypeDescription
options{ cuttingKnowledgeDate: | null | string | number | Date | () => Date; todayDate: | null | string | number | Date | () => Date; noToolInstructions: boolean; }
options.cuttingKnowledgeDate?| null | string | number | Date | () => DateSet to null to disable Defaults to December 2023
options.todayDate?| null | string | number | Date | () => DateSet to null to disable Defaults to current date
options.noToolInstructions?boolean-

Returns

Llama3_2LightweightChatWrapper

Overrides

ChatWrapper.constructor

Defined in

chatWrappers/Llama3_2LightweightChatWrapper.ts:39

Properties

defaultSettings

ts
static defaultSettings: ChatWrapperSettings;

Inherited from

ChatWrapper.defaultSettings

Defined in

ChatWrapper.ts:11


wrapperName

ts
readonly wrapperName: string = "Llama 3.2 lightweight";

Overrides

ChatWrapper.wrapperName

Defined in

chatWrappers/Llama3_2LightweightChatWrapper.ts:12


cuttingKnowledgeDate?

ts
readonly optional cuttingKnowledgeDate: null | Date | () => Date;

Defined in

chatWrappers/Llama3_2LightweightChatWrapper.ts:14


todayDate

ts
readonly todayDate: null | Date | () => Date;

Defined in

chatWrappers/Llama3_2LightweightChatWrapper.ts:15


noToolInstructions

ts
readonly noToolInstructions: boolean;

Defined in

chatWrappers/Llama3_2LightweightChatWrapper.ts:16


settings

ts
readonly settings: ChatWrapperSettings;

Overrides

ChatWrapper.settings

Defined in

chatWrappers/Llama3_2LightweightChatWrapper.ts:20

Methods

generateFunctionCallsAndResults()

ts
generateFunctionCallsAndResults(functionCalls: ChatModelFunctionCall[], useRawCall: boolean): LlamaText

Parameters

ParameterTypeDefault value
functionCallsChatModelFunctionCall[]undefined
useRawCallbooleantrue

Returns

LlamaText

Inherited from

ChatWrapper.generateFunctionCallsAndResults

Defined in

ChatWrapper.ts:55


generateFunctionCall()

ts
generateFunctionCall(name: string, params: any): LlamaText

Parameters

ParameterType
namestring
paramsany

Returns

LlamaText

Inherited from

ChatWrapper.generateFunctionCall

Defined in

ChatWrapper.ts:102


generateFunctionCallResult()

ts
generateFunctionCallResult(
   functionName: string, 
   functionParams: any, 
   result: any): LlamaText

Parameters

ParameterType
functionNamestring
functionParamsany
resultany

Returns

LlamaText

Inherited from

ChatWrapper.generateFunctionCallResult

Defined in

ChatWrapper.ts:116


generateModelResponseText()

ts
generateModelResponseText(modelResponse: (string | ChatModelFunctionCall)[], useRawCall: boolean): LlamaText

Parameters

ParameterTypeDefault value
modelResponse(string | ChatModelFunctionCall)[]undefined
useRawCallbooleantrue

Returns

LlamaText

Inherited from

ChatWrapper.generateModelResponseText

Defined in

ChatWrapper.ts:140


generateInitialChatHistory()

ts
generateInitialChatHistory(__namedParameters: ChatWrapperGenerateInitialHistoryOptions): ChatHistoryItem[]

Parameters

ParameterType
__namedParametersChatWrapperGenerateInitialHistoryOptions

Returns

ChatHistoryItem[]

Inherited from

ChatWrapper.generateInitialChatHistory

Defined in

ChatWrapper.ts:217


addAvailableFunctionsSystemMessageToHistory()

ts
addAvailableFunctionsSystemMessageToHistory(
   history: readonly ChatHistoryItem[], 
   availableFunctions?: ChatModelFunctions, 
   __namedParameters?: {
  documentParams: boolean;
 }): readonly ChatHistoryItem[]

Parameters

ParameterType
historyreadonly ChatHistoryItem[]
availableFunctions?ChatModelFunctions
__namedParameters?{ documentParams: boolean; }
__namedParameters.documentParams?boolean

Returns

readonly ChatHistoryItem[]

Overrides

ChatWrapper.addAvailableFunctionsSystemMessageToHistory

Defined in

chatWrappers/Llama3_2LightweightChatWrapper.ts:84


generateContextState()

ts
generateContextState(__namedParameters: ChatWrapperGenerateContextStateOptions): ChatWrapperGeneratedContextState

Parameters

ParameterType
__namedParametersChatWrapperGenerateContextStateOptions

Returns

ChatWrapperGeneratedContextState

Overrides

ChatWrapper.generateContextState

Defined in

chatWrappers/Llama3_2LightweightChatWrapper.ts:115


generateAvailableFunctionsSystemText()

ts
generateAvailableFunctionsSystemText(availableFunctions: ChatModelFunctions, __namedParameters: {
  documentParams: boolean;
 }): LlamaText

Parameters

ParameterType
availableFunctionsChatModelFunctions
__namedParameters{ documentParams: boolean; }
__namedParameters.documentParams?boolean

Returns

LlamaText

Overrides

ChatWrapper.generateAvailableFunctionsSystemText

Defined in

chatWrappers/Llama3_2LightweightChatWrapper.ts:238


prependPreambleToChatHistory()

ts
prependPreambleToChatHistory(chatHistory: readonly ChatHistoryItem[]): readonly ChatHistoryItem[]

Parameters

ParameterType
chatHistoryreadonly ChatHistoryItem[]

Returns

readonly ChatHistoryItem[]

Defined in

chatWrappers/Llama3_2LightweightChatWrapper.ts:260