Documentation
¶
Index ¶
- type Text
- type Thinking
- type ToolCall
- func (c *ToolCall) AppendArguments(delta string)
- func (c *ToolCall) ArgumentsText() string
- func (c *ToolCall) ArgumentsValue() any
- func (c *ToolCall) DecodeArguments() (any, bool)
- func (c *ToolCall) ID() string
- func (c *ToolCall) Name() string
- func (c *ToolCall) Partial(argumentsDelta string, mode ToolPartialMode) *sigma.PartialToolCall
- func (c *ToolCall) SetArguments(arguments string)
- func (c *ToolCall) SetID(value string)
- func (c *ToolCall) SetName(value string)
- func (c *ToolCall) ToolCall() sigma.ToolCall
- type ToolPartialMode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Text ¶
type Text struct {
ContentIndex int
Started bool
Closed bool
// contains filtered or unexported fields
}
Text accumulates streamed text for one content block.
type Thinking ¶
type Thinking struct {
ContentIndex int
Signature string
ProviderSignature string
Redacted bool
Started bool
Closed bool
// contains filtered or unexported fields
}
Thinking accumulates streamed thinking for one content block.
type ToolCall ¶
type ToolCall struct {
ContentIndex int
ProviderSignature string
Started bool
Closed bool
// contains filtered or unexported fields
}
ToolCall accumulates streamed tool-call identity and argument fragments.
func (*ToolCall) AppendArguments ¶
AppendArguments adds an argument fragment.
func (*ToolCall) ArgumentsText ¶
ArgumentsText returns the accumulated raw argument text.
func (*ToolCall) ArgumentsValue ¶
ArgumentsValue returns decoded arguments, an empty object for empty arguments, or the raw text while arguments are invalid/incomplete JSON.
func (*ToolCall) DecodeArguments ¶
DecodeArguments decodes accumulated arguments only when callers need the structured value, caching the result until the argument text changes.
func (*ToolCall) Partial ¶
func (c *ToolCall) Partial(argumentsDelta string, mode ToolPartialMode) *sigma.PartialToolCall
Partial builds the public partial tool-call payload for the accumulated state.
func (*ToolCall) SetArguments ¶
SetArguments replaces the accumulated argument text.
type ToolPartialMode ¶
type ToolPartialMode int
ToolPartialMode controls how partial tool-call metadata is exposed.
const ( // ToolPartialArgumentsText preserves raw argument text and adds decoded // arguments only when the accumulated value is valid JSON. ToolPartialArgumentsText ToolPartialMode = iota // ToolPartialArguments exposes the provider-neutral arguments value, // returning the raw text while JSON is still incomplete. ToolPartialArguments )