Public declaration syntax from forge-go/core/message.go Original source SHA-256: 3ea2c2745123c0d65d5d161fe2e2d0a2eb46255bb420be7f14c58fd168d167f8 Function bodies and constant values are omitted. This is not the complete implementation. Source line 20 type Role string const ( // RoleSystem is the system instruction role. RoleSystem Role; Source line 34 func (r Role) String() string Source line 39 func (r Role) IsValid() bool Source line 49 type MessagePartType string const ( // MessagePartText is a text content part. MessagePartText MessagePartType; Source line 68 type MessagePart struct Source line 89 func NewTextPart(text string) MessagePart Source line 97 func NewImagePart(url, mimeType string) MessagePart Source line 106 func NewToolCallPart(tc ToolCall) MessagePart Source line 114 func NewToolResultPart(tr ToolResult) MessagePart Source line 125 type ModelMessage struct Source line 134 func NewModelMessage(role Role, parts ...MessagePart) ModelMessage Source line 145 func NewTextMessage(role Role, text string) ModelMessage Source line 153 func NewSystemMessage(text string) ModelMessage Source line 158 func NewUserMessage(text string) ModelMessage Source line 163 func NewAssistantMessage(text string) ModelMessage Source line 169 func (m ModelMessage) TextContent() string Source line 181 func (m ModelMessage) ToolCalls() []ToolCall Source line 193 func (m ModelMessage) ToolResults() []ToolResult Source line 204 func (m ModelMessage) HasToolCalls() bool Source line 214 func (m ModelMessage) MarshalJSON() ([]byte, error) Source line 220 func (m *ModelMessage) UnmarshalJSON(data []byte) error