GenerationChunk#

class langchain_core.outputs.generation.GenerationChunk[source]#

Bases: Generation

Generation chunk, which can be concatenated with other Generation chunks.

Initialize a GenerationChunk.

param generation_info: dict[str, Any] | None = None#

Raw response from the provider.

May include things like the reason for finishing or token log probabilities.

param type: Literal['Generation'] = 'Generation'#

Type is used exclusively for serialization purposes. Set to β€œGeneration” for this class.

property text: str#

The text contents of the output.

Examples using GenerationChunk