Documentation
¶
Index ¶
- type API
- type Agent
- type AgentGroup
- type AgentGroupType
- type AgentPage
- type Service
- func (s *Service) AddAgent(spaceID, userUID, botID string) (*Agent, error)
- func (s *Service) ArchiveSession(spaceID, userUID, shortID string, archive bool) error
- func (s *Service) CreateSession(spaceID, userUID, botID, idempotencyKey, name string) (*Session, error)
- func (s *Service) DeleteSession(spaceID, userUID, shortID string) error
- func (s *Service) GetSession(spaceID, userUID, shortID string) (*Session, error)
- func (s *Service) ListAgents(spaceID, userUID string, beforeID int64, limit int) (*AgentPage, error)
- func (s *Service) ListSessions(spaceID, userUID, botID string, statuses []int, pageIndex, pageSize int) (*SessionPage, error)
- func (s *Service) RemoveAgent(spaceID, userUID, botID string) error
- func (s *Service) RenameSession(spaceID, userUID, shortID, name string) error
- func (s *Service) UpdateSessionSetting(spaceID, userUID, shortID string, settings map[string]interface{}) error
- type Session
- type SessionPage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Agent ¶
type Agent struct {
ID int64 `db:"id" json:"-"`
SpaceID string `db:"space_id" json:"space_id"`
UserUID string `db:"user_uid" json:"user_uid"`
BotID string `db:"bot_id" json:"bot_id"`
BotName string `db:"bot_name" json:"bot_name"`
GroupNo string `db:"group_no" json:"group_no,omitempty"`
IsAdded int `db:"is_added" json:"is_added"`
ContainerState int `db:"container_state" json:"container_state"`
SessionCount int64 `db:"session_count" json:"session_count"`
CreatedAt time.Time `db:"created_at" json:"created_at"`
UpdatedAt time.Time `db:"updated_at" json:"updated_at"`
GroupType AgentGroupType `db:"agent_group" json:"-"`
}
type AgentGroup ¶
type AgentGroup struct {
Type AgentGroupType `json:"type"`
Count int64 `json:"count"`
Items []*Agent `json:"items"`
}
type AgentGroupType ¶
type AgentGroupType string
const ( AgentGroupTypeCloudClone AgentGroupType = "cloud_clone" AgentGroupTypePersonalAssistant AgentGroupType = "personal_assistant" AgentGroupTypeDigitalEmployee AgentGroupType = "digital_employee" )
type AgentPage ¶
type AgentPage struct {
Groups []*AgentGroup `json:"groups"`
NextCursor string `json:"next_cursor,omitempty"`
}
type Service ¶
func NewService ¶
func (*Service) ArchiveSession ¶
func (*Service) CreateSession ¶
func (*Service) DeleteSession ¶
DeleteSession applies the existing thread soft-delete contract: the thread is hidden and its IM channel is banned, while persisted history is not physically erased. Ownership is resolved from the AI association before the thread service performs its own parent membership and creator checks.
func (*Service) GetSession ¶
func (*Service) ListAgents ¶
func (*Service) ListSessions ¶
func (*Service) RemoveAgent ¶
func (*Service) RenameSession ¶
type Session ¶
type Session struct {
ID int64 `db:"id" json:"-"`
AgentID int64 `db:"agent_id" json:"-"`
ShortID string `db:"short_id" json:"session_id"`
GroupNo string `db:"group_no" json:"group_no"`
ChannelID string `db:"-" json:"channel_id"`
Name string `db:"name" json:"name"`
Status int `db:"status" json:"status"`
MessageCount int64 `db:"message_count" json:"message_count"`
LastMessageContent string `db:"last_message_content" json:"last_message_content,omitempty"`
LastMessageAt *time.Time `db:"last_message_at" json:"last_message_at,omitempty"`
CreatedAt time.Time `db:"created_at" json:"created_at"`
UpdatedAt time.Time `db:"updated_at" json:"updated_at"`
State int `db:"state" json:"state"`
ManualTitle int `db:"manual_title" json:"manual_title"`
Mute int `db:"mute" json:"mute"`
IsPinned bool `db:"is_pinned" json:"is_pinned"`
RequestHash string `db:"request_hash" json:"-"`
}
Click to show internal directories.
Click to hide internal directories.