Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WebChatMessage ¶
type WebChatMessage struct { Role string `json:"role"` Text string `json:"text"` Images []string `json:"images,omitempty"` // URLs only for web rendering }
WebChatMessage represents a chat message for web rendering
func (*WebChatMessage) ToJSON ¶
func (w *WebChatMessage) ToJSON() ([]byte, error)
func (*WebChatMessage) Type ¶
func (w *WebChatMessage) Type() string
type WebConversation ¶
type WebConversation struct {
Messages []*WebMessage `json:"messages"`
}
WebConversation represents a conversation for web rendering
func ConvertConversation ¶
func ConvertConversation(conv conversation.Conversation) (*WebConversation, error)
ConvertConversation converts a conversation.Conversation to a WebConversation
type WebMessage ¶
type WebMessage struct { ID string `json:"id"` ParentID string `json:"parentId"` Time time.Time `json:"time"` LastUpdate time.Time `json:"lastUpdate"` Type string `json:"type"` Content WebMessageContent `json:"content"` Metadata map[string]interface{} `json:"metadata,omitempty"` }
WebMessage represents a simplified message structure for web rendering
func ConvertMessage ¶
func ConvertMessage(msg *conversation.Message) (*WebMessage, error)
ConvertMessage converts a conversation.Message to a WebMessage
type WebMessageContent ¶
WebMessageContent is the base interface for different types of web message content
type WebToolResultMessage ¶
WebToolResultMessage represents a tool result message for web rendering
func (*WebToolResultMessage) ToJSON ¶
func (w *WebToolResultMessage) ToJSON() ([]byte, error)
func (*WebToolResultMessage) Type ¶
func (w *WebToolResultMessage) Type() string
type WebToolUseMessage ¶
type WebToolUseMessage struct { ToolID string `json:"toolId"` Name string `json:"name"` Input json.RawMessage `json:"input"` }
WebToolUseMessage represents a tool use message for web rendering
func (*WebToolUseMessage) ToJSON ¶
func (w *WebToolUseMessage) ToJSON() ([]byte, error)
func (*WebToolUseMessage) Type ¶
func (w *WebToolUseMessage) Type() string
Click to show internal directories.
Click to hide internal directories.