Skip to content

Class: LlamaChat

Constructors

new LlamaChat()

ts
new LlamaChat(__namedParameters: LlamaChatOptions): LlamaChat

Parameters

ParameterType
__namedParametersLlamaChatOptions

Returns

LlamaChat

Defined in

evaluator/LlamaChat/LlamaChat.ts:298

Properties

onDispose

ts
readonly onDispose: EventRelay<void>;

Defined in

evaluator/LlamaChat/LlamaChat.ts:296

Accessors

disposed

ts
get disposed(): boolean

Returns

boolean

Defined in

evaluator/LlamaChat/LlamaChat.ts:348


chatWrapper

ts
get chatWrapper(): ChatWrapper

Returns

ChatWrapper

Defined in

evaluator/LlamaChat/LlamaChat.ts:352


sequence

ts
get sequence(): LlamaContextSequence

Returns

LlamaContextSequence

Defined in

evaluator/LlamaChat/LlamaChat.ts:359


context

ts
get context(): LlamaContext

Returns

LlamaContext

Defined in

evaluator/LlamaChat/LlamaChat.ts:366


model

ts
get model(): LlamaModel

Returns

LlamaModel

Defined in

evaluator/LlamaChat/LlamaChat.ts:370

Methods

dispose()

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

Parameters

ParameterType
__namedParametersobject
__namedParameters.disposeSequence?boolean

Returns

void

Defined in

evaluator/LlamaChat/LlamaChat.ts:331


generateResponse()

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

Type Parameters

Type ParameterDefault type
Functions extends undefined | ChatModelFunctionsundefined

Parameters

ParameterType
historyChatHistoryItem[]
optionsLLamaChatGenerateResponseOptions<Functions>

Returns

Promise<LlamaChatResponse<Functions>>

Defined in

evaluator/LlamaChat/LlamaChat.ts:374


loadChatAndCompleteUserMessage()

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

Type Parameters

Type ParameterDefault type
Functions extends undefined | ChatModelFunctionsundefined

Parameters

ParameterType
historyChatHistoryItem[]
optionsLLamaChatLoadAndCompleteUserMessageOptions<Functions>

Returns

Promise<LlamaChatLoadAndCompleteUserResponse>

Defined in

evaluator/LlamaChat/LlamaChat.ts:537