Class: LlamaChat
Constructors
new LlamaChat()
ts
new LlamaChat(__namedParameters: LlamaChatOptions): LlamaChat
Parameters
Parameter | Type |
---|---|
__namedParameters | LlamaChatOptions |
Returns
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
Defined in
evaluator/LlamaChat/LlamaChat.ts:352
sequence
ts
get sequence(): LlamaContextSequence
Returns
Defined in
evaluator/LlamaChat/LlamaChat.ts:359
context
ts
get context(): LlamaContext
Returns
Defined in
evaluator/LlamaChat/LlamaChat.ts:366
model
ts
get model(): LlamaModel
Returns
Defined in
evaluator/LlamaChat/LlamaChat.ts:370
Methods
dispose()
ts
dispose(__namedParameters: {
disposeSequence: boolean;
}): void
Parameters
Parameter | Type |
---|---|
__namedParameters | object |
__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 Parameter | Default type |
---|---|
Functions extends undefined | ChatModelFunctions | undefined |
Parameters
Parameter | Type |
---|---|
history | ChatHistoryItem [] |
options | LLamaChatGenerateResponseOptions <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 Parameter | Default type |
---|---|
Functions extends undefined | ChatModelFunctions | undefined |
Parameters
Parameter | Type |
---|---|
history | ChatHistoryItem [] |
options | LLamaChatLoadAndCompleteUserMessageOptions <Functions > |
Returns
Promise
<LlamaChatLoadAndCompleteUserResponse
>