Versions in this module Expand all Collapse all v0 v0.2.0 Jul 14, 2026 v0.1.0 Jun 22, 2026 Changes in this version + func ContainsTextAttachment(attachments []Attachment) bool + func PromptWithTextAttachments(prompt string, attachments []Attachment) string + type Attachment struct + Content []byte + FileName string + FilePath string + MimeType string + func (a Attachment) IsImage() bool + func (a Attachment) IsMarkdown() bool + func (a Attachment) IsText() bool + type BinaryContent struct + Data []byte + MIMEType string + Path string + func (bc BinaryContent) String(p catwalk.InferenceProvider) string + type ContentPart interface + type CreateMessageParams struct + IsSummaryMessage bool + Model string + Parts []ContentPart + Provider string + Role MessageRole + type Finish struct + Details string + Message string + Reason FinishReason + Time int64 + type FinishReason string + const FinishReasonCanceled + const FinishReasonEndTurn + const FinishReasonError + const FinishReasonMaxTokens + const FinishReasonToolUse + const FinishReasonUnknown + type ImageURLContent struct + Detail string + URL string + func (iuc ImageURLContent) String() string + type Message struct + CreatedAt int64 + ID string + IsSummaryMessage bool + Model string + Parts []ContentPart + Provider string + Role MessageRole + SessionID string + UpdatedAt int64 + func (m *Message) AddBinary(mimeType string, data []byte) + func (m *Message) AddFinish(reason FinishReason, message, details string) + func (m *Message) AddImageURL(url, detail string) + func (m *Message) AddToolCall(tc ToolCall) + func (m *Message) AddToolResult(tr ToolResult) + func (m *Message) AppendContent(delta string) + func (m *Message) AppendReasoningContent(delta string) + func (m *Message) AppendReasoningSignature(signature string) + func (m *Message) AppendThoughtSignature(signature string, toolCallID string) + func (m *Message) AppendToolCallInput(toolCallID string, inputDelta string) + func (m *Message) BinaryContent() []BinaryContent + func (m *Message) Clone() Message + func (m *Message) Content() TextContent + func (m *Message) FinishPart() *Finish + func (m *Message) FinishReason() FinishReason + func (m *Message) FinishThinking() + func (m *Message) FinishToolCall(toolCallID string) + func (m *Message) ImageURLContent() []ImageURLContent + func (m *Message) IsFinished() bool + func (m *Message) IsThinking() bool + func (m *Message) ReasoningContent() ReasoningContent + func (m *Message) SetToolCalls(tc []ToolCall) + func (m *Message) SetToolResults(tr []ToolResult) + func (m *Message) ThinkingDuration() time.Duration + func (m *Message) ToolCalls() []ToolCall + func (m *Message) ToolResults() []ToolResult + type MessageRole string + const Assistant + const System + const Tool + const User + type ReasoningContent struct + FinishedAt int64 + Signature string + StartedAt int64 + Thinking string + ThoughtSignature string + ToolID string + func (tc ReasoningContent) String() string + type Service interface + Create func(ctx context.Context, sessionID string, params CreateMessageParams) (Message, error) + Delete func(ctx context.Context, id string) error + DeleteSessionMessages func(ctx context.Context, sessionID string) error + Flush func(ctx context.Context, id string) error + FlushAll func(ctx context.Context) error + Get func(ctx context.Context, id string) (Message, error) + List func(ctx context.Context, sessionID string) ([]Message, error) + ListAllUserMessages func(ctx context.Context) ([]Message, error) + ListUserMessages func(ctx context.Context, sessionID string) ([]Message, error) + Update func(ctx context.Context, message Message) error + type TextContent struct + Text string + func (tc TextContent) String() string + type ToolCall struct + Finished bool + ID string + Input string + Name string + ProviderExecuted bool + type ToolResult struct + Content string + Data string + IsError bool + MIMEType string + Metadata string + Name string + ToolCallID string