part

package
v0.0.0-beta Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 30, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package part defines message part types for content, thinking, and tool calls.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Part

type Part struct {
	// Type identifies what kind of part this is.
	Type Type
	// Text holds the content for thinking/content parts.
	Text string
	// Call holds the tool call information for tool parts.
	Call *call.Call
}

Part represents a single part of a message for incremental UI rendering.

func (Part) IsContent

func (p Part) IsContent() bool

IsContent returns true if this is a content part.

func (Part) IsThinking

func (p Part) IsThinking() bool

IsThinking returns true if this is a thinking part.

func (Part) IsTool

func (p Part) IsTool() bool

IsTool returns true if this is a tool call part.

type Type

type Type string

Type identifies the kind of content in a message part.

const (
	Thinking Type = "thinking"
	Content  Type = "content"
	Tool     Type = "tool"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL