Documentation
¶
Index ¶
- type AgentStatus
- type Client
- func (c *Client) GetMessages(ctx context.Context) (*GetMessagesResponse, error)
- func (c *Client) GetStatus(ctx context.Context) (*GetStatusResponse, error)
- func (c *Client) PostMessage(ctx context.Context, body PostMessageParams) (*PostMessageResponse, error)
- func (c *Client) SubscribeEvents(ctx context.Context) (chan Event, chan error, error)
- type ClientOption
- type ConversationRole
- type ErrorDetail
- type ErrorModel
- type Event
- type EventMessageUpdate
- type EventStatusChange
- type EventType
- type GetMessagesResponse
- type GetStatusResponse
- type HTTPDoer
- type Message
- type MessageType
- type PostMessageParams
- type PostMessageResponse
- type RequestEditorFn
- type SubscribeEventsResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentStatus ¶
type AgentStatus = gen.AgentStatus
AgentStatus represents the current state of the agent
const ( // StatusRunning indicates the agent is actively processing StatusRunning AgentStatus = gen.Running // StatusStable indicates the agent is idle StatusStable AgentStatus = gen.Stable )
Constants for agent status
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) GetMessages ¶
func (c *Client) GetMessages(ctx context.Context) (*GetMessagesResponse, error)
func (*Client) GetStatus ¶
func (c *Client) GetStatus(ctx context.Context) (*GetStatusResponse, error)
func (*Client) PostMessage ¶
func (c *Client) PostMessage(ctx context.Context, body PostMessageParams) (*PostMessageResponse, error)
type ClientOption ¶
type ClientOption = gen.ClientOption
func WithBaseURL ¶
func WithBaseURL(baseURL string) ClientOption
WithBaseURL overrides the base URL for the client. This is useful when you want to use a different server than the one provided to NewClient.
func WithHTTPClient ¶
func WithHTTPClient(client HTTPDoer) ClientOption
WithHTTPClient allows overriding the default HTTP client. This is useful for testing with mock clients.
func WithRequestEditorFn ¶
func WithRequestEditorFn(fn RequestEditorFn) ClientOption
WithRequestEditorFn adds a function that will be called to modify each request before sending. This can be used to add headers, modify query parameters, etc.
type ConversationRole ¶
type ConversationRole = gen.ConversationRole
ConversationRole defines the sender of a message (agent or user)
const ( // RoleAgent is the role assigned to agent messages RoleAgent ConversationRole = gen.ConversationRoleAgent // RoleUser is the role assigned to user messages RoleUser ConversationRole = gen.ConversationRoleUser )
Constants for conversation roles
type ErrorDetail ¶
type ErrorDetail = gen.ErrorDetail
ErrorDetail provides additional information about an error
type ErrorModel ¶
type ErrorModel = gen.ErrorModel
ErrorModel represents an error returned by the API
type EventMessageUpdate ¶
type EventMessageUpdate = gen.MessageUpdateBody
EventMessageUpdate represents a message update event
type EventStatusChange ¶
type EventStatusChange = gen.StatusChangeBody
EventStatusChange represents a status change event
type GetMessagesResponse ¶
type GetMessagesResponse = gen.MessagesResponseBody
type GetStatusResponse ¶
type GetStatusResponse = gen.StatusResponseBody
type HTTPDoer ¶
HTTPDoer is an interface for performing HTTP requests. The standard http.Client implements this interface.
type MessageType ¶
type MessageType = gen.MessageType
MessageType defines the type of message being sent
const ( // MessageTypeRaw represents raw keystrokes sent to the agent MessageTypeRaw MessageType = gen.MessageTypeRaw // MessageTypeUser represents a user message MessageTypeUser MessageType = gen.MessageTypeUser )
Constants for message types
type PostMessageParams ¶
type PostMessageParams = gen.PostMessageJSONRequestBody
type PostMessageResponse ¶
type PostMessageResponse = gen.MessageResponseBody
type RequestEditorFn ¶
type RequestEditorFn = gen.RequestEditorFn
RequestEditorFn is a function that modifies HTTP requests before they are sent.
type SubscribeEventsResponse ¶
type SubscribeEventsResponse = gen.SubscribeEventsResponse