Skip to content

Class: Llama2ChatWrapper

Defined in: chatWrappers/Llama2ChatWrapper.ts:6

Extends

Constructors

new Llama2ChatWrapper()

ts
new Llama2ChatWrapper(__namedParameters: {
  addSpaceBeforeEos: boolean;
 }): Llama2ChatWrapper

Defined in: chatWrappers/Llama2ChatWrapper.ts:11

Parameters

ParameterTypeDescription
__namedParameters{ addSpaceBeforeEos: boolean; }-
__namedParameters.addSpaceBeforeEos?booleanDefault to true

Returns

Llama2ChatWrapper

Overrides

ChatWrapper.constructor

Properties

defaultSettings

ts
static defaultSettings: ChatWrapperSettings;

Defined in: ChatWrapper.ts:11

Inherited from

ChatWrapper.defaultSettings


settings

ts
readonly settings: ChatWrapperSettings = ChatWrapper.defaultSettings;

Defined in: ChatWrapper.ts:28

Inherited from

ChatWrapper.settings


wrapperName

ts
readonly wrapperName: string = "Llama2Chat";

Defined in: chatWrappers/Llama2ChatWrapper.ts:7

Overrides

ChatWrapper.wrapperName

Methods

generateFunctionCallsAndResults()

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

Defined in: ChatWrapper.ts:55

Parameters

ParameterTypeDefault value
functionCallsChatModelFunctionCall[]undefined
useRawCallbooleantrue

Returns

LlamaText

Inherited from

ChatWrapper.generateFunctionCallsAndResults


generateFunctionCall()

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

Defined in: ChatWrapper.ts:102

Parameters

ParameterType
namestring
paramsany

Returns

LlamaText

Inherited from

ChatWrapper.generateFunctionCall


generateFunctionCallResult()

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

Defined in: ChatWrapper.ts:116

Parameters

ParameterType
functionNamestring
functionParamsany
resultany

Returns

LlamaText

Inherited from

ChatWrapper.generateFunctionCallResult


generateModelResponseText()

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

Defined in: ChatWrapper.ts:140

Parameters

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

Returns

LlamaText

Inherited from

ChatWrapper.generateModelResponseText


generateAvailableFunctionsSystemText()

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

Defined in: ChatWrapper.ts:170

Parameters

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

Returns

LlamaText

Inherited from

ChatWrapper.generateAvailableFunctionsSystemText


addAvailableFunctionsSystemMessageToHistory()

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

Defined in: ChatWrapper.ts:196

Parameters

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

Returns

readonly ChatHistoryItem[]

Inherited from

ChatWrapper.addAvailableFunctionsSystemMessageToHistory


generateInitialChatHistory()

ts
generateInitialChatHistory(__namedParameters: ChatWrapperGenerateInitialHistoryOptions): ChatHistoryItem[]

Defined in: ChatWrapper.ts:217

Parameters

ParameterType
__namedParametersChatWrapperGenerateInitialHistoryOptions

Returns

ChatHistoryItem[]

Inherited from

ChatWrapper.generateInitialChatHistory


generateContextState()

ts
generateContextState(__namedParameters: ChatWrapperGenerateContextStateOptions): ChatWrapperGeneratedContextState

Defined in: chatWrappers/Llama2ChatWrapper.ts:24

Parameters

ParameterType
__namedParametersChatWrapperGenerateContextStateOptions

Returns

ChatWrapperGeneratedContextState

Overrides

ChatWrapper.generateContextState