Skip to content

Class: LlamaChat

Defined in: evaluator/LlamaChat/LlamaChat.ts:302

Constructors

new LlamaChat()

ts
new LlamaChat(__namedParameters: LlamaChatOptions): LlamaChat

Defined in: evaluator/LlamaChat/LlamaChat.ts:310

Parameters

ParameterType
__namedParametersLlamaChatOptions

Returns

LlamaChat

Properties

onDispose

ts
readonly onDispose: EventRelay<void>;

Defined in: evaluator/LlamaChat/LlamaChat.ts:308

Accessors

disposed

Get Signature

ts
get disposed(): boolean

Defined in: evaluator/LlamaChat/LlamaChat.ts:353

Returns

boolean


chatWrapper

Get Signature

ts
get chatWrapper(): ChatWrapper

Defined in: evaluator/LlamaChat/LlamaChat.ts:357

Returns

ChatWrapper


sequence

Get Signature

ts
get sequence(): LlamaContextSequence

Defined in: evaluator/LlamaChat/LlamaChat.ts:364

Returns

LlamaContextSequence


context

Get Signature

ts
get context(): LlamaContext

Defined in: evaluator/LlamaChat/LlamaChat.ts:371

Returns

LlamaContext


model

Get Signature

ts
get model(): LlamaModel

Defined in: evaluator/LlamaChat/LlamaChat.ts:375

Returns

LlamaModel

Methods

dispose()

ts
dispose(__namedParameters: {
  disposeSequence: boolean;
 }): void

Defined in: evaluator/LlamaChat/LlamaChat.ts:336

Parameters

ParameterType
__namedParameters{ disposeSequence: boolean; }
__namedParameters.disposeSequence?boolean

Returns

void


generateResponse()

ts
generateResponse<Functions>(history: ChatHistoryItem[], options: LLamaChatGenerateResponseOptions<Functions>): Promise<LlamaChatResponse<Functions>>

Defined in: evaluator/LlamaChat/LlamaChat.ts:379

Type Parameters

Type ParameterDefault type
Functions extends | undefined | ChatModelFunctionsundefined

Parameters

ParameterType
historyChatHistoryItem[]
optionsLLamaChatGenerateResponseOptions<Functions>

Returns

Promise<LlamaChatResponse<Functions>>


loadChatAndCompleteUserMessage()

ts
loadChatAndCompleteUserMessage<Functions>(history: ChatHistoryItem[], options: LLamaChatLoadAndCompleteUserMessageOptions<Functions>): Promise<LlamaChatLoadAndCompleteUserResponse>

Defined in: evaluator/LlamaChat/LlamaChat.ts:546

Type Parameters

Type ParameterDefault type
Functions extends | undefined | ChatModelFunctionsundefined

Parameters

ParameterType
historyChatHistoryItem[]
optionsLLamaChatLoadAndCompleteUserMessageOptions<Functions>

Returns

Promise<LlamaChatLoadAndCompleteUserResponse>