Huggingface.js documentation

Interface: TextGenerationOutputDetails

Hugging Face's logo
Join the Hugging Face community

and get access to the augmented documentation experience

to get started

Interface: TextGenerationOutputDetails

When enabled, details about the generation

Indexable

▪ [property: string]: unknown

Properties

best _ of _ sequences

Optional best_of_sequences: TextGenerationOutputSequenceDetails[]

Details about additional sequences when best_of is provided

Defined in

inference/src/tasks/nlp/textGeneration.ts:119


finish _ reason

finish_reason: TextGenerationFinishReason

The reason why the generation was stopped.

Defined in

inference/src/tasks/nlp/textGeneration.ts:123


generated _ tokens

generated_tokens: number

The number of generated tokens

Defined in

inference/src/tasks/nlp/textGeneration.ts:127


prefill

prefill: TextGenerationPrefillToken[]

Defined in

inference/src/tasks/nlp/textGeneration.ts:128


seed

Optional seed: number

The random seed used for generation

Defined in

inference/src/tasks/nlp/textGeneration.ts:132


tokens

tokens: TextGenerationOutputToken[]

The generated tokens and associated details

Defined in

inference/src/tasks/nlp/textGeneration.ts:136


top _ tokens

Optional top_tokens: TextGenerationOutputToken[][]

Most likely tokens

Defined in

inference/src/tasks/nlp/textGeneration.ts:140

< > Update on GitHub