Versions in this module Expand all Collapse all v0 v0.1.0 Sep 1, 2026 Changes in this version + func DecodeDataURI(uri string) (data []byte, mediaType string, err error) + type AlwaysApproveToolApprovalResponseContent struct + AlwaysApproveTool bool + AlwaysApproveToolWithArguments bool + InnerResponse *ToolApprovalResponseContent + func (t *AlwaysApproveToolApprovalResponseContent) MarshalJSON() ([]byte, error) + type AnnotatedRegion interface + type AnnotatedRegions []AnnotatedRegion + func (as *AnnotatedRegions) UnmarshalJSON(data []byte) error + type Annotation interface + type Annotations []Annotation + func (as *Annotations) UnmarshalJSON(data []byte) error + type CitationAnnotation struct + AdditionalProperties map[string]any + AnnotatedRegions AnnotatedRegions + FileID string + RawRepresentation any + Snippet string + Title string + ToolName string + URL string + func (t *CitationAnnotation) MarshalJSON() ([]byte, error) + type CodeInterpreterToolCallContent struct + CallID string + Inputs Contents + func (t *CodeInterpreterToolCallContent) MarshalJSON() ([]byte, error) + type CodeInterpreterToolResultContent struct + CallID string + Outputs Contents + func (t *CodeInterpreterToolResultContent) MarshalJSON() ([]byte, error) + type Content interface + Header func() *ContentHeader + func CoalesceContents(contents []Content) []Content + type ContentHeader struct + AdditionalProperties map[string]any + Annotations Annotations + RawRepresentation any + func (ch *ContentHeader) Header() *ContentHeader + type Contents []Content + func (cs *Contents) UnmarshalJSON(data []byte) error + func (cs Contents) Text() string + func (cs Contents) Usage() UsageDetails + type DataContent struct + Data string + MediaType string + Name string + func (t *DataContent) Bytes() ([]byte, error) + func (t *DataContent) MarshalJSON() ([]byte, error) + func (t *DataContent) TopLevelMediaType() string + func (t *DataContent) URI() string + func (t *DataContent) UnmarshalJSON(data []byte) error + type ErrorContent struct + Details string + ErrorCode string + Message string + func (t *ErrorContent) MarshalJSON() ([]byte, error) + type FunctionCallContent struct + Arguments string + CallID string + Error error + InformationalOnly bool + Name string + func (t *FunctionCallContent) GetCallID() string + func (t *FunctionCallContent) MarshalJSON() ([]byte, error) + func (t *FunctionCallContent) UnmarshalJSON(data []byte) error + type FunctionResultContent struct + CallID string + Error error + Result any + func (t *FunctionResultContent) MarshalJSON() ([]byte, error) + func (t *FunctionResultContent) UnmarshalJSON(data []byte) error + type HostedFileContent struct + FileID string + MediaType string + Name string + func (t *HostedFileContent) MarshalJSON() ([]byte, error) + func (t *HostedFileContent) TopLevelMediaType() string + type HostedVectorStoreContent struct + VectorStoreID string + func (t *HostedVectorStoreContent) MarshalJSON() ([]byte, error) + type MCPServerToolCallContent struct + Arguments string + CallID string + Name string + ServerName string + func (t *MCPServerToolCallContent) GetCallID() string + func (t *MCPServerToolCallContent) MarshalJSON() ([]byte, error) + type MCPServerToolResultContent struct + CallID string + Error string + Name string + Outputs Contents + ServerName string + func (t *MCPServerToolResultContent) MarshalJSON() ([]byte, error) + type Message struct + AdditionalProperties map[string]any + AuthorName string + Contents Contents + CreatedAt time.Time + ID string + RawRepresentation any + Role Role + Source Source + func New(contents ...Content) *Message + func NewText(text string) *Message + func (m *Message) Clone() *Message + func (m *Message) String() string + func (m *Message) Usage() UsageDetails + type RawAnnotatedRegion struct + RawRepresentation json.RawMessage + func (t *RawAnnotatedRegion) MarshalJSON() ([]byte, error) + type RawAnnotation struct + RawRepresentation json.RawMessage + func (t *RawAnnotation) MarshalJSON() ([]byte, error) + type RawContent struct + func (t *RawContent) MarshalJSON() ([]byte, error) + func (t *RawContent) UnmarshalJSON(data []byte) error + type Role string + const RoleAssistant + const RoleSystem + const RoleTool + const RoleUser + type Source struct + ID string + Type SourceType + type SourceType string + const SourceTypeExternal + type TextContent struct + Text string + func (t *TextContent) MarshalJSON() ([]byte, error) + func (t *TextContent) String() string + type TextReasoningContent struct + ProtectedData string + Text string + func (t *TextReasoningContent) MarshalJSON() ([]byte, error) + func (t *TextReasoningContent) String() string + type TextSpanAnnotatedRegion struct + End int + Start int + func (t *TextSpanAnnotatedRegion) MarshalJSON() ([]byte, error) + type ToolApprovalRequestContent struct + RequestID string + ToolCall ToolCallContent + func (t *ToolApprovalRequestContent) AlwaysApproveToolResponse() *AlwaysApproveToolApprovalResponseContent + func (t *ToolApprovalRequestContent) AlwaysApproveToolWithArgsResponse() *AlwaysApproveToolApprovalResponseContent + func (t *ToolApprovalRequestContent) AlwaysApproveToolWithArgumentsResponse() *AlwaysApproveToolApprovalResponseContent + func (t *ToolApprovalRequestContent) CreateResponse(approved bool, reason string) *ToolApprovalResponseContent + func (t *ToolApprovalRequestContent) MarshalJSON() ([]byte, error) + func (t *ToolApprovalRequestContent) UnmarshalJSON(data []byte) error + type ToolApprovalResponseContent struct + Approved bool + Reason string + RequestID string + ToolCall ToolCallContent + func (t *ToolApprovalResponseContent) MarshalJSON() ([]byte, error) + func (t *ToolApprovalResponseContent) UnmarshalJSON(data []byte) error + type ToolCallContent interface + GetCallID func() string + type URIContent struct + MediaType string + URI string + func NewURIContent(uri string, mediaType string) (*URIContent, error) + func (t *URIContent) MarshalJSON() ([]byte, error) + func (t *URIContent) TopLevelMediaType() string + type UsageContent struct + Details UsageDetails + func (t *UsageContent) MarshalJSON() ([]byte, error) + type UsageDetails struct + AdditionalCounts map[string]int64 + CachedInputTokenCount int64 + InputTokenCount int64 + OutputTokenCount int64 + ReasoningTokenCount int64 + TotalTokenCount int64 + func (u *UsageDetails) Add(other UsageDetails)