Skip to main content
This class encapsulates single result of Chat LLM generation (either standalone or a chunk of ContentStream). Includes the text content and any tool calls that are embedded within the content.

Implements

  • ContentInterface

Constructor

new Content(
    content: ContentInterface
): Content
Creates a new Content instance.

Parameters

content (ContentInterface) The content data to create the instance from.

Returns

Content Overrides: AbstractApiDataType.constructor

Properties

content

readonly content: string
The content of the message. Implementation of: ContentInterface.content

toolCalls (optional)

readonly toolCalls?: ToolCallInterface[]
The tool calls associated with the content. Implementation of: ContentInterface.toolCalls