Type Alias: LlamaChatResponseTextChunk
ts
type LlamaChatResponseTextChunk = {
type: undefined;
segmentType: undefined;
text: string;
tokens: Token[];
};Defined in: evaluator/LlamaChat/LlamaChat.ts:50
Properties
type
ts
type: undefined;Defined in: evaluator/LlamaChat/LlamaChat.ts:52
When type is undefined, the chunk is part of the main response and is not a segment
segmentType
ts
segmentType: undefined;Defined in: evaluator/LlamaChat/LlamaChat.ts:57
segmentType has no purpose when type is undefined (meaning that this chunk is part of the main response and is not a segment).
text
ts
text: string;Defined in: evaluator/LlamaChat/LlamaChat.ts:67
The generated text chunk.
Detokenized from the tokens property, but with the context of the previous generation (for better spacing of the text with some models).
Prefer using this property over tokens when streaming the generated response as text.
tokens
ts
tokens: Token[];Defined in: evaluator/LlamaChat/LlamaChat.ts:70
The generated tokens