Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Agent ¶
type Agent struct {
ID string `json:"id"`
ParentID *string `json:"parent_id,omitempty"`
ContainerID *string `json:"container_id,omitempty"`
Name string `json:"name"`
Description string `json:"description"`
Status AgentStatus `json:"status"`
Instructions *string `json:"instructions,omitempty"`
Address *string `json:"address,omitempty"`
ClientID string `json:"-"`
ClientSecret Secret `json:"-"`
Settings AgentSettings `json:"settings"`
Position Position `json:"position,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
type AgentLog ¶
type AgentLog struct {
ID string `json:"id"`
AgentID string `json:"agent_id"`
Level LogLevel `json:"level"`
Text string `json:"text"`
Data Map[any] `json:"data"`
CreatedAt time.Time `json:"created_at"`
}
func NewAgentLog ¶
func NewAgentLog() AgentLog
type AgentSettings ¶
type AgentSettings struct {
ApiKey string `json:"api_key"`
Model string `json:"model"` // https://platform.openai.com/docs/api-reference/chat/create#chat-create-model
FrequencyPenalty *float32 `json:"frequency_penalty,omitempty"` // https://platform.openai.com/docs/api-reference/chat/create#chat-create-frequency_penalty
LogitBias Map[any] `json:"logit_bias,omitempty"` // https://platform.openai.com/docs/api-reference/chat/create#chat-create-logit_bias
LogProbs *bool `json:"logprobs,omitempty"` // https://platform.openai.com/docs/api-reference/chat/create#chat-create-logprobs
}
func (*AgentSettings) Scan ¶
func (self *AgentSettings) Scan(value any) error
func (AgentSettings) String ¶
func (self AgentSettings) String() string
type AgentStat ¶
type AgentStatus ¶
type AgentStatus string
const ( AGENT_STATUS_UP AgentStatus = "up" AGENT_STATUS_DOWN AgentStatus = "down" )
func (AgentStatus) Valid ¶
func (self AgentStatus) Valid() bool
type Chat ¶
type Message ¶
type Message struct {
ID string `json:"id"`
ChatID string `json:"chat_id"`
FromID string `json:"from_id"`
Text string `json:"text"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
func NewMessage ¶
func NewMessage() Message
Click to show internal directories.
Click to hide internal directories.