Documentation
¶
Index ¶
- type Client
- func (c *Client) GetMessages() ([]ConversationMessage, error)
- func (c *Client) GetStatus() (*Status, error)
- func (c *Client) IsRunning() (bool, error)
- func (c *Client) SendMessage(content string, msgType string) error
- func (c *Client) WaitForHealthy(timeout time.Duration) error
- func (c *Client) WaitForStable(timeout time.Duration) error
- type ConversationMessage
- type Message
- type MessagesResponse
- type Status
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is an HTTP client for AgentAPI
func (*Client) GetMessages ¶
func (c *Client) GetMessages() ([]ConversationMessage, error)
GetMessages returns the conversation history
func (*Client) SendMessage ¶
SendMessage sends a message to the agent
func (*Client) WaitForHealthy ¶
WaitForHealthy waits until the agent responds to health checks
type ConversationMessage ¶
type ConversationMessage struct {
ID int `json:"id"`
Role string `json:"role"`
Content string `json:"content"`
Time string `json:"time,omitempty"`
}
ConversationMessage represents a message in the conversation history
type Message ¶
type Message struct {
Content string `json:"content"`
Type string `json:"type"` // "user" or "raw"
}
Message represents a message to send to the agent
type MessagesResponse ¶
type MessagesResponse struct {
Messages []ConversationMessage `json:"messages"`
}
MessagesResponse represents the response from GET /messages
Click to show internal directories.
Click to hide internal directories.