Documentation
¶
Overview ¶
Package artifact defines the extensible Artifact interface and common concrete types used throughout ore. The Artifact interface exposes a public Kind() method to allow custom artifact types to be defined in other packages.
Package artifact defines the extensible Artifact interface and common concrete types used throughout ore.
The Artifact interface exposes a public Kind() method to allow custom artifact types to be defined in other packages. Private marker methods would prevent cross-package extensibility because Go does not allow implementing unexported methods across package boundaries.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Accumulable ¶ added in v0.1.0
Accumulable marks delta artifacts that can be merged into complete artifacts by a generic accumulator. Implementations must return a stable AccumulatorKey and define MergeInto to combine the delta with an existing accumulated artifact or seed a new one when acc is nil.
type Artifact ¶
type Artifact interface {
Kind() string
}
Artifact is the base interface for all LLM response artifacts.
type Delta ¶
type Delta interface {
Artifact
IsDelta()
}
Delta marks artifacts that are ephemeral streaming fragments. These must never be persisted to state; only complete artifacts should be.
type Reasoning ¶
type Reasoning struct {
Content string
}
Reasoning represents a reasoning or thinking content artifact.
type ReasoningDelta ¶
type ReasoningDelta struct {
Content string
}
ReasoningDelta represents a partial chunk of reasoning content for streaming.
func (ReasoningDelta) AccumulatorKey ¶ added in v0.1.0
func (d ReasoningDelta) AccumulatorKey() string
AccumulatorKey returns a stable routing key for the generic accumulator. ReasoningDelta accumulates into a single "reasoning" block.
func (ReasoningDelta) IsDelta ¶
func (r ReasoningDelta) IsDelta()
IsDelta marks ReasoningDelta as an ephemeral streaming fragment.
func (ReasoningDelta) Kind ¶
func (r ReasoningDelta) Kind() string
Kind returns the artifact kind identifier.
func (ReasoningDelta) MergeInto ¶ added in v0.1.0
func (d ReasoningDelta) MergeInto(acc Artifact) Artifact
MergeInto merges the delta into an existing Reasoning artifact or seeds a new one.
type TextDelta ¶
type TextDelta struct {
Content string
}
TextDelta represents a partial chunk of text content for streaming.
func (TextDelta) AccumulatorKey ¶ added in v0.1.0
AccumulatorKey returns a stable routing key for the generic accumulator. TextDelta accumulates into a single "text" block.
type ToolCallDelta ¶
ToolCallDelta represents a partial chunk of a tool invocation for streaming. Index identifies which parallel tool call in the current turn this fragment belongs to, enabling the generic accumulator to merge chunks independently.
func (ToolCallDelta) AccumulatorKey ¶ added in v0.1.0
func (d ToolCallDelta) AccumulatorKey() string
AccumulatorKey returns a stable routing key for the generic accumulator. ToolCallDelta accumulates per-index: "tool_call:0", "tool_call:1", etc.
func (ToolCallDelta) IsDelta ¶
func (t ToolCallDelta) IsDelta()
IsDelta marks ToolCallDelta as an ephemeral streaming fragment.
func (ToolCallDelta) Kind ¶
func (t ToolCallDelta) Kind() string
Kind returns the artifact kind identifier.
func (ToolCallDelta) MergeInto ¶ added in v0.1.0
func (d ToolCallDelta) MergeInto(acc Artifact) Artifact
MergeInto merges the delta into an existing ToolCall artifact or seeds a new one. ID uses latest-wins semantics; Name and Arguments are concatenated.
type ToolResult ¶
ToolResult represents the result of executing a tool call.
func (ToolResult) Kind ¶
func (t ToolResult) Kind() string
Kind returns the artifact kind identifier.