Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildUIMessage ¶
func BuildUIMessage(p UIMessageParams) map[string]any
BuildUIMessage builds the complete com.beeper.ai UIMessage payload.
func BuildUIMessageMetadata ¶
func BuildUIMessageMetadata(p UIMessageMetadataParams) map[string]any
BuildUIMessageMetadata builds the metadata map for a com.beeper.ai UIMessage.
func MapFinishReason ¶
MapFinishReason normalizes provider-specific finish reasons to standard values.
Types ¶
type UIMessageMetadataParams ¶
type UIMessageMetadataParams struct {
TurnID string
AgentID string
Model string
FinishReason string
CompletionID string
PromptTokens int64
CompletionTokens int64
ReasoningTokens int64
TotalTokens int64
StartedAtMs int64
FirstTokenAtMs int64
CompletedAtMs int64
IncludeUsage bool
}
UIMessageMetadataParams contains parameters for building UI message metadata.
type UIMessageParams ¶
type UIMessageParams struct {
TurnID string
Role string // "assistant", "user"
Metadata map[string]any
Parts []map[string]any
SourceURLs []map[string]any // Optional source-url and source-document parts
FileParts []map[string]any // Optional generated file parts
}
UIMessageParams contains parameters for building a full com.beeper.ai UIMessage.
Click to show internal directories.
Click to hide internal directories.