Documentation
¶
Index ¶
- func AddGroupDocument(c *gin.Context)
- func AddMemberToGroup(c *gin.Context)
- func AddToBlacklist(c *gin.Context)
- func AddUserToDepartment(c *gin.Context)
- func AdminDeleteChannel(c *gin.Context)
- func AdminDeleteGroup(c *gin.Context)
- func AdminGetChannels(c *gin.Context)
- func AdminGetDashboardStats(c *gin.Context)
- func AdminGetDashboardTrend(c *gin.Context)
- func AdminGetGroups(c *gin.Context)
- func AdminGetRecentRegistrations(c *gin.Context)
- func AdminGetStatistics(c *gin.Context)
- func AdminGetUserAIConfigs(c *gin.Context)
- func AdminGetUsers(c *gin.Context)
- func AdminGetVectorCollectionData(c *gin.Context)
- func AdminListVectorCollections(c *gin.Context)
- func AdminUpdateChannel(c *gin.Context)
- func AdminUpdateUserAIConfig(c *gin.Context)
- func AnalyzeNote(c *gin.Context)
- func ApplyJoinGroup(c *gin.Context)
- func ApproveJoin(c *gin.Context)
- func BatchAssignUserRoles(c *gin.Context)
- func BatchCreateSensitiveWords(c *gin.Context)
- func BatchCreateShortLinks(c *gin.Context)
- func BatchDeleteShortLinks(c *gin.Context)
- func BatchGetMessageReadUsers(c *gin.Context)
- func BatchOperation(c *gin.Context)
- func BatchProcessDocuments(c *gin.Context)
- func BatchRetryDocuments(c *gin.Context)
- func BroadcastAIMessage(conversationID uint, content string, assistantName string) error
- func BroadcastMessage(c *gin.Context)
- func CancelUpload(c *gin.Context)
- func CheckSensitiveWords(c *gin.Context)
- func CheckTwoFAStatus(c *gin.Context)
- func CheckUpdateHealth(c *gin.Context)
- func ClearAllNotifications(c *gin.Context)
- func CommentChannelMessage(c *gin.Context)
- func CompleteUpload(c *gin.Context)
- func CreateAIProvider(c *gin.Context)
- func CreateApp(c *gin.Context)
- func CreateBot(c *gin.Context)
- func CreateBotConversation(c *gin.Context)
- func CreateChannel(c *gin.Context)
- func CreateChannelMessage(c *gin.Context)
- func CreateConversation(c *gin.Context)
- func CreateDepartment(c *gin.Context)
- func CreateDiscussionConversation(c *gin.Context)
- func CreateEvent(c *gin.Context)
- func CreateFolder(c *gin.Context)
- func CreateGroupConversation(c *gin.Context)
- func CreateMiniApp(c *gin.Context)
- func CreateNote(c *gin.Context)
- func CreateRole(c *gin.Context)
- func CreateSensitiveWord(c *gin.Context)
- func CreateSession(c *gin.Context)
- func CreateShortLink(c *gin.Context)
- func CreateSingleConversation(c *gin.Context)
- func CreateSystemMessage(c *gin.Context)
- func CreateTask(c *gin.Context)
- func CreateUser(c *gin.Context)
- func CreateVersion(c *gin.Context)
- func DeleteAIProvider(c *gin.Context)
- func DeleteApp(c *gin.Context)
- func DeleteConversation(c *gin.Context)
- func DeleteDepartment(c *gin.Context)
- func DeleteEvent(c *gin.Context)
- func DeleteFile(c *gin.Context)
- func DeleteFolder(c *gin.Context)
- func DeleteMessage(c *gin.Context)
- func DeleteMiniApp(c *gin.Context)
- func DeleteMyBot(c *gin.Context)
- func DeleteNote(c *gin.Context)
- func DeleteRole(c *gin.Context)
- func DeleteSensitiveWord(c *gin.Context)
- func DeleteShortLink(c *gin.Context)
- func DeleteTask(c *gin.Context)
- func DeleteUser(c *gin.Context)
- func DeleteVersion(c *gin.Context)
- func DissolveGroup(c *gin.Context)
- func DownloadFile(c *gin.Context)
- func EndSession(c *gin.Context)
- func ExitGroup(c *gin.Context)
- func ExportNote(c *gin.Context)
- func ExportOperationLogs(c *gin.Context)
- func ExportSensitiveWords(c *gin.Context)
- func GetAIConfig(c *gin.Context)
- func GetAIProviders(c *gin.Context)
- func GetAIUsageLogs(c *gin.Context)
- func GetActiveSessions(c *gin.Context)
- func GetAdminFileStatistics(c *gin.Context)
- func GetAdminLargeFiles(c *gin.Context)
- func GetAllApps(c *gin.Context)
- func GetApps(c *gin.Context)
- func GetBlacklist(c *gin.Context)
- func GetBots(c *gin.Context)
- func GetBuiltInApps(c *gin.Context)
- func GetChannelMessageComments(c *gin.Context)
- func GetChannelMessageLikes(c *gin.Context)
- func GetChannelMessages(c *gin.Context)
- func GetChannels(c *gin.Context)
- func GetConversation(c *gin.Context)
- func GetConversations(c *gin.Context)
- func GetCurrentUser(c *gin.Context)
- func GetDepartmentEmployees(c *gin.Context)
- func GetDocumentProcessStatus(c *gin.Context)
- func GetEvent(c *gin.Context)
- func GetEvents(c *gin.Context)
- func GetFileStats(c *gin.Context)
- func GetFiles(c *gin.Context)
- func GetFolderFiles(c *gin.Context)
- func GetFolderTree(c *gin.Context)
- func GetGroupAISettings(c *gin.Context)
- func GetGroupDocuments(c *gin.Context)
- func GetGroupDocumentsWithStatus(c *gin.Context)
- func GetLatestYML(c *gin.Context)
- func GetMessageQuoteChain(c *gin.Context)
- func GetMessageReadUsers(c *gin.Context)
- func GetMessages(c *gin.Context)
- func GetMessagesByFilter(c *gin.Context)
- func GetMiniApp(c *gin.Context)
- func GetMiniApps(c *gin.Context)
- func GetMyBotCount(c *gin.Context)
- func GetMyBots(c *gin.Context)
- func GetNote(c *gin.Context)
- func GetNotes(c *gin.Context)
- func GetNotifications(c *gin.Context)
- func GetOperationLogDetail(c *gin.Context)
- func GetOperationLogStats(c *gin.Context)
- func GetOperationLogs(c *gin.Context)
- func GetOrganizationTree(c *gin.Context)
- func GetPendingRequests(c *gin.Context)
- func GetPublicSystemConfig(c *gin.Context)
- func GetRoleUsers(c *gin.Context)
- func GetRoles(c *gin.Context)
- func GetSensitiveWords(c *gin.Context)
- func GetSession(c *gin.Context)
- func GetShortLinks(c *gin.Context)
- func GetStarredFiles(c *gin.Context)
- func GetStatistics(c *gin.Context)
- func GetSystemConfig(c *gin.Context)
- func GetSystemMessages(c *gin.Context)
- func GetTasks(c *gin.Context)
- func GetTemplates(c *gin.Context)
- func GetUpdateFile(c *gin.Context)
- func GetUser(c *gin.Context)
- func GetUserByID(c *gin.Context)
- func GetUserStatus(c *gin.Context)
- func GetVersionDistribution(c *gin.Context)
- func GetVersions(c *gin.Context)
- func HandleBotMessage(userID uint, convID uint, content string)
- func HandleNotificationAction(c *gin.Context)
- func HandleUpdateRequest(c *gin.Context)
- func ImportSensitiveWords(c *gin.Context)
- func InitAnomalyDetector()
- func InitSmartReplyEngine(aiService *ai.AIService)
- func InitSmartReplyGraph() error
- func InitUpload(c *gin.Context)
- func InitWSHandlers()
- func LeaveSession(c *gin.Context)
- func LikeChannelMessage(c *gin.Context)
- func LogAIUsage(userID uint, botID uint, messagePreview string, callType string)
- func Login(c *gin.Context)
- func Logout(c *gin.Context)
- func MarkAllNotificationsAsRead(c *gin.Context)
- func MarkConversationAsRead(c *gin.Context)
- func MarkNotificationAsRead(c *gin.Context)
- func NoteVectorSearch(c *gin.Context)
- func PatchNotification(c *gin.Context)
- func PinConversation(c *gin.Context)
- func PreviewFile(c *gin.Context)
- func ProcessGroupDocument(c *gin.Context)
- func PublicDownloadFile(c *gin.Context)
- func RecallMessage(c *gin.Context)
- func RedirectShortLink(c *gin.Context)
- func RedirectUpdateFile(c *gin.Context, platformParam string, filename string)
- func RefreshOAuthToken(c *gin.Context)
- func RefreshToken(c *gin.Context)
- func Register(c *gin.Context)
- func RegisterAdminTools(mcpServer *ai.MCPServer)
- func RegisterSensitiveWordRoutes(r *gin.RouterGroup)
- func RejectJoin(c *gin.Context)
- func RejectJoinRequest(c *gin.Context)
- func RemindMessage(c *gin.Context)
- func RemoveBlacklistEntry(c *gin.Context)
- func RemoveEmployeeFromDepartment(c *gin.Context)
- func RemoveGroupDocument(c *gin.Context)
- func RemoveMemberFromGroup(c *gin.Context)
- func RemoveUserRole(c *gin.Context)
- func RequestJoin(c *gin.Context)
- func RespondToShareRequest(c *gin.Context)
- func SearchMessages(c *gin.Context)
- func SearchUsers(c *gin.Context)
- func SendMessage(c *gin.Context)
- func SendToUserMessage(c *gin.Context)
- func ServeScreenShare(hub *ws.Hub, c *gin.Context)
- func ServeWs(hub *ws.Hub, c *gin.Context)
- func SetAvatarWorkerPool(pool *service.AvatarWorkerPool)
- func SetConfig(c *config.Config)
- func SetConversationMute(c *gin.Context)
- func SetMemberRole(c *gin.Context)
- func SetMemoryService(ms *service.AvatarMemoryService)
- func SetUnifiedKnowledge(uk *service.UnifiedKnowledgeService)
- func StartAnomalyDetection(detector *AnomalyDetector)
- func StreamMessage(c *gin.Context)
- func SubscribeChannel(c *gin.Context)
- func TestAIProviderConnection(c *gin.Context)
- func ToggleAIProviderStatus(c *gin.Context)
- func ToggleAppStatus(c *gin.Context)
- func ToggleImportantNotification(c *gin.Context)
- func TogglePinNotification(c *gin.Context)
- func ToggleSensitiveWordStatus(c *gin.Context)
- func ToggleStar(c *gin.Context)
- func ToggleVersionStatus(c *gin.Context)
- func TransferOwner(c *gin.Context)
- func UnifiedAuthCallback(c *gin.Context)
- func UnlikeChannelMessage(c *gin.Context)
- func UnsubscribeChannel(c *gin.Context)
- func UpdateAIConfig(c *gin.Context)
- func UpdateAIProvider(c *gin.Context)
- func UpdateAnnouncement(c *gin.Context)
- func UpdateApp(c *gin.Context)
- func UpdateEvent(c *gin.Context)
- func UpdateFile(c *gin.Context)
- func UpdateFolder(c *gin.Context)
- func UpdateGroupAISettings(c *gin.Context)
- func UpdateGroupInfo(c *gin.Context)
- func UpdateMiniApp(c *gin.Context)
- func UpdateMyBot(c *gin.Context)
- func UpdateNote(c *gin.Context)
- func UpdateNoteSummary(c *gin.Context)
- func UpdateNoteTags(c *gin.Context)
- func UpdateRole(c *gin.Context)
- func UpdateSensitiveWord(c *gin.Context)
- func UpdateSystemConfig(c *gin.Context)
- func UpdateSystemMessage(c *gin.Context)
- func UpdateTask(c *gin.Context)
- func UpdateTaskStatus(c *gin.Context)
- func UpdateUser(c *gin.Context)
- func UpdateVersion(c *gin.Context)
- func UploadChunk(c *gin.Context)
- func UploadFile(c *gin.Context)
- func VerifyTwoFA(c *gin.Context)
- type AIAnalyzeResponse
- type AIBotHandler
- type AIHandler
- func (h *AIHandler) AISearch(c *gin.Context)
- func (h *AIHandler) CommandGeneration(c *gin.Context)
- func (h *AIHandler) ExecuteTool(c *gin.Context)
- func (h *AIHandler) GenerateSummary(c *gin.Context)
- func (h *AIHandler) GetCompletion(c *gin.Context)
- func (h *AIHandler) GetCompletionStream(c *gin.Context)
- func (h *AIHandler) GetDigest(c *gin.Context)
- func (h *AIHandler) GetKnowledgeGraph(c *gin.Context)
- func (h *AIHandler) IntelligentAlert(c *gin.Context)
- func (h *AIHandler) IntelligentTroubleshooting(c *gin.Context)
- func (h *AIHandler) ListMCPTools(c *gin.Context)
- func (h *AIHandler) ListTools(c *gin.Context)
- func (h *AIHandler) LogAnalysis(c *gin.Context)
- func (h *AIHandler) OpsDashboard(c *gin.Context)
- func (h *AIHandler) OpsKnowledge(c *gin.Context)
- func (h *AIHandler) PolishText(c *gin.Context)
- func (h *AIHandler) RegisterRoutes(router *gin.RouterGroup)
- func (h *AIHandler) RewriteText(c *gin.Context)
- func (h *AIHandler) SetSmartDigestGraph(graph *service.SmartDigestGraph)
- func (h *AIHandler) SetSummaryGraph(graph *service.SummaryGraph)
- func (h *AIHandler) SetTextProcessGraph(graph *service.TextProcessGraph)
- func (h *AIHandler) SetUnifiedSearchGraph(graph *service.UnifiedSearchGraph)
- func (h *AIHandler) TranslateImage(c *gin.Context)
- func (h *AIHandler) TranslateText(c *gin.Context)
- func (h *AIHandler) UpdateMCPToolConfig(c *gin.Context)
- type AIResponse
- type AISearchRequest
- type AISearchResult
- type AlertHandler
- type AnomalyAlert
- type AnomalyDetector
- func (d *AnomalyDetector) CalculateMessageVariance(conversationID uint) float64
- func (d *AnomalyDetector) CheckInactiveGroup(conversationID uint) *AnomalyAlert
- func (d *AnomalyDetector) CheckMessageAnomaly(conversationID uint) *AnomalyAlert
- func (d *AnomalyDetector) CheckMessageFrequency(userID uint, conversationID uint) *AnomalyAlert
- func (d *AnomalyDetector) CheckSensitiveContent(content string) *AnomalyAlert
- func (d *AnomalyDetector) GetDetectionStats() map[string]interface{}
- func (d *AnomalyDetector) RecordMessage(conversationID uint)
- func (d *AnomalyDetector) SendAlert(adminID uint, alert *AnomalyAlert)
- func (d *AnomalyDetector) UpdateBaseline()
- type AuthProviderHandler
- func (h *AuthProviderHandler) CreateProvider(c *gin.Context)
- func (h *AuthProviderHandler) DeleteProvider(c *gin.Context)
- func (h *AuthProviderHandler) GetProviderLoginURL(c *gin.Context)
- func (h *AuthProviderHandler) GetProviders(c *gin.Context)
- func (h *AuthProviderHandler) TestProvider(c *gin.Context)
- func (h *AuthProviderHandler) UpdateProvider(c *gin.Context)
- type AvatarConfigResponse
- type AvatarHandler
- func (h *AvatarHandler) ApplyForApproval(c *gin.Context)
- func (h *AvatarHandler) BindTool(c *gin.Context)
- func (h *AvatarHandler) CancelApplication(c *gin.Context)
- func (h *AvatarHandler) CheckTrigger(c *gin.Context)
- func (h *AvatarHandler) ClearLearnedPersona(c *gin.Context)
- func (h *AvatarHandler) CreateConfig(c *gin.Context)
- func (h *AvatarHandler) DeleteConfig(c *gin.Context)
- func (h *AvatarHandler) DeleteMemory(c *gin.Context)
- func (h *AvatarHandler) GetAvailableTools(c *gin.Context)
- func (h *AvatarHandler) GetAvatarTools(c *gin.Context)
- func (h *AvatarHandler) GetConfig(c *gin.Context)
- func (h *AvatarHandler) GetLearnStatus(c *gin.Context)
- func (h *AvatarHandler) GetLearnedPersona(c *gin.Context)
- func (h *AvatarHandler) GetMemories(c *gin.Context)
- func (h *AvatarHandler) GetSessions(c *gin.Context)
- func (h *AvatarHandler) PreviewReply(c *gin.Context)
- func (h *AvatarHandler) RegisterRoutes(router *gin.RouterGroup)
- func (h *AvatarHandler) SearchMemories(c *gin.Context)
- func (h *AvatarHandler) SearchNotes(c *gin.Context)
- func (h *AvatarHandler) TakeoverSession(c *gin.Context)
- func (h *AvatarHandler) TriggerLearnPersona(c *gin.Context)
- func (h *AvatarHandler) UnbindTool(c *gin.Context)
- func (h *AvatarHandler) UpdateAvatarTools(c *gin.Context)
- func (h *AvatarHandler) UpdateConfig(c *gin.Context)
- func (h *AvatarHandler) UpdateSession(c *gin.Context)
- type AvatarTool
- type CancelUploadRequest
- type CommandGenerationRequest
- type CompleteUploadRequest
- type ConfigResponse
- type CrashLogHandler
- type CreateAvatarConfigRequest
- type CreateBotRequest
- type CreateConfigRequest
- type DBPoolStats
- type ExecuteToolRequest
- type ExtractedTodo
- type FeedbackHandler
- type FileStatistics
- type GenerateSummaryRequest
- type GetCompletionRequest
- type GroupManagementTool
- type GroupSummaryJob
- type InitUploadRequest
- type InitUploadResponse
- type IntelligentAlertRequest
- type IntelligentTroubleshootingRequest
- type KnowledgeGraphQueryRequest
- type KnowledgeResult
- type KnowledgeService
- func (k *KnowledgeService) AnswerWithKnowledge(query string, userID uint) (string, error)
- func (k *KnowledgeService) BuildKnowledgeContext(query string) string
- func (k *KnowledgeService) GetKnowledgeStats() map[string]interface{}
- func (k *KnowledgeService) SearchKnowledge(query string, limit int) []KnowledgeResult
- type LargeFile
- type LogAnalysisRequest
- type MCPToolConfigRequest
- type MessageSender
- type MonitorHandler
- type NetworkIO
- type NoteSearchResult
- type NoteSummaryRequest
- type NoteTagsRequest
- type NoteVectorSearchItem
- type NoteVectorSearchRequest
- type OpsKnowledgeRequest
- type OrgSyncHandler
- func (h *OrgSyncHandler) CreateConfig(c *gin.Context)
- func (h *OrgSyncHandler) DeleteConfig(c *gin.Context)
- func (h *OrgSyncHandler) GetConfigs(c *gin.Context)
- func (h *OrgSyncHandler) GetLogs(c *gin.Context)
- func (h *OrgSyncHandler) TriggerSync(c *gin.Context)
- func (h *OrgSyncHandler) UpdateConfig(c *gin.Context)
- type PolishTextRequest
- type PromptBuilder
- type PromptContext
- type RateLimiter
- type RewriteTextRequest
- type ServerMetrics
- type ServiceStatus
- type SmartPromptBuilder
- type SmartReplyEngine
- func (e *SmartReplyEngine) HandleMessage(userID uint, conversationID uint, content string, mentionUserIDs []uint)
- func (e *SmartReplyEngine) InitSmartReplyGraph() error
- func (e *SmartReplyEngine) SetAvatarWorkerPool(pool *service.AvatarWorkerPool)
- func (e *SmartReplyEngine) SetMemoryService(ms *service.AvatarMemoryService)
- func (e *SmartReplyEngine) SetUnifiedKnowledge(uk *service.UnifiedKnowledgeService)
- type SystemNotificationTool
- type TodoExtractor
- type TranslateImageRequest
- type TranslateTextRequest
- type UpdateAvatarConfigRequest
- type UploadChunkRequest
- type UserAIConfigHandler
- func (h *UserAIConfigHandler) CreateConfig(c *gin.Context)
- func (h *UserAIConfigHandler) DeleteConfig(c *gin.Context)
- func (h *UserAIConfigHandler) ListMyConfigs(c *gin.Context)
- func (h *UserAIConfigHandler) RegisterRoutes(router *gin.RouterGroup)
- func (h *UserAIConfigHandler) TestConfig(c *gin.Context)
- func (h *UserAIConfigHandler) UpdateConfig(c *gin.Context)
- type UserHandler
- type UserManagementTool
- type WebSocketMessageSender
- func (s *WebSocketMessageSender) SendAIMessage(conversationID uint, content string, assistantName string) error
- func (s *WebSocketMessageSender) SendMessageWithContext(conversationID uint, content string, assistantName string, msg *model.Message) error
- func (s *WebSocketMessageSender) SendStreamingAIMessage(conversationID uint, assistantName string) (func(string) error, func() error, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddGroupDocument ¶
func AddMemberToGroup ¶
func AddToBlacklist ¶
func AddUserToDepartment ¶
func AdminDeleteChannel ¶
func AdminDeleteGroup ¶
func AdminGetChannels ¶
func AdminGetDashboardStats ¶
AdminGetDashboardStats 获取仪表盘统计数据
func AdminGetDashboardTrend ¶
AdminGetDashboardTrend 获取仪表盘趋势数据(用户增长 + 消息活跃度)
func AdminGetGroups ¶
func AdminGetStatistics ¶
func AdminGetUserAIConfigs ¶
AdminGetUserAIConfigs 管理员获取指定用户的AI配置列表
func AdminGetUsers ¶
func AdminUpdateChannel ¶
func AdminUpdateUserAIConfig ¶
AdminUpdateUserAIConfig 管理员更新指定用户的AI配置
func AnalyzeNote ¶
func ApplyJoinGroup ¶
func ApproveJoin ¶
func BatchCreateShortLinks ¶
BatchCreateShortLinks 批量创建短链接
func BatchDeleteShortLinks ¶
BatchDeleteShortLinks 批量删除短链接
func BatchOperation ¶
func BatchProcessDocuments ¶
BatchProcessDocuments 批量处理文档
func BroadcastAIMessage ¶
func BroadcastMessage ¶
func CheckSensitiveWords ¶
func CheckTwoFAStatus ¶
func CheckUpdateHealth ¶
CheckUpdateHealth 检查更新服务健康状态 GET /api/v1/updates/health
func ClearAllNotifications ¶
func CommentChannelMessage ¶
func CreateBotConversation ¶
CreateBotConversation 创建或获取 Bot 会话
func CreateChannel ¶
func CreateChannelMessage ¶
func CreateConversation ¶
CreateConversation 统一会话创建入口 请求体:
{
"type": "single|bot|group|discussion",
...具体类型对应的字段
}
该 handler 仅作为分发,复用原有具体类型的 handler 逻辑。
func CreateDepartment ¶
func CreateEvent ¶
func CreateFolder ¶
func CreateGroupConversation ¶
func CreateMiniApp ¶
func CreateNote ¶
func CreateRole ¶
func CreateSensitiveWord ¶
func CreateShortLink ¶
func CreateSystemMessage ¶
func CreateTask ¶
func CreateUser ¶
func CreateVersion ¶
func DeleteConversation ¶
func DeleteEvent ¶
func DeleteFile ¶
func DeleteFolder ¶
func DeleteMessage ¶
func DeleteMiniApp ¶
func DeleteNote ¶
func DeleteRole ¶
func DeleteSensitiveWord ¶
func DeleteShortLink ¶
func DeleteTask ¶
func DeleteVersion ¶
func DissolveGroup ¶
func DownloadFile ¶
func EndSession ¶
func ExportNote ¶
func ExportOperationLogs ¶
func ExportSensitiveWords ¶
func GetAIConfig ¶
func GetActiveSessions ¶
func GetAdminFileStatistics ¶
func GetAdminLargeFiles ¶
func GetAllApps ¶
func GetBlacklist ¶
func GetChannelMessageLikes ¶
func GetChannelMessages ¶
func GetChannels ¶
func GetConversation ¶
func GetConversations ¶
func GetDepartmentEmployees ¶
GetDepartmentEmployees 获取部门员工列表
func GetFileStats ¶
func GetFolderFiles ¶
func GetFolderTree ¶
func GetGroupAISettings ¶
func GetGroupDocuments ¶
func GetLatestYML ¶
GetLatestYML 返回 electron-updater 需要的 latest.yml 格式 GET /api/v1/updates/:platform/latest.yml
func GetMessageQuoteChain ¶
func GetMessageReadUsers ¶
func GetMessages ¶
func GetMessagesByFilter ¶
func GetMiniApp ¶
func GetMiniApps ¶
func GetNotifications ¶
func GetOperationLogDetail ¶
func GetOperationLogStats ¶
func GetOperationLogs ¶
func GetOrganizationTree ¶
func GetPendingRequests ¶
GetPendingRequests 获取待处理的共享请求(用户登录后调用)
func GetPublicSystemConfig ¶
func GetRoleUsers ¶
func GetSensitiveWords ¶
func GetShortLinks ¶
func GetStarredFiles ¶
func GetStatistics ¶
func GetSystemConfig ¶
func GetSystemMessages ¶
func GetUpdateFile ¶
GetUpdateFile 下载更新文件 GET /api/v1/updates/:platform/files/:filename
func GetUserByID ¶
func GetUserStatus ¶
GetUserStatus 查询用户在线状态 兼容:
- 单个:?user_id=1 返回对象 { user_id, status, last_online }
- 批量:?user_ids=1,2,3 返回数组 [{...}, {...}]
func GetVersionDistribution ¶
func GetVersions ¶
func HandleBotMessage ¶
func HandleUpdateRequest ¶
HandleUpdateRequest 统一处理更新请求 GET /api/v1/updates/:platform/*action
func ImportSensitiveWords ¶
func InitAnomalyDetector ¶
func InitAnomalyDetector()
InitAnomalyDetector initializes the anomaly detector
func InitSmartReplyEngine ¶
InitSmartReplyEngine initializes the smart reply engine with the given AI service
func InitSmartReplyGraph ¶
func InitSmartReplyGraph() error
InitSmartReplyGraph initializes the Eino Graph for smart reply
func LeaveSession ¶
func LikeChannelMessage ¶
func LogAIUsage ¶
LogAIUsage 记录 AI 使用日志(内部调用)
func MarkConversationAsRead ¶
func MarkNotificationAsRead ¶
func NoteVectorSearch ¶
func PatchNotification ¶
PatchNotification 统一通知更新接口 请求体可包含以下字段(任一或多个):
{
"read": true, // 标记已读(true 才生效)
"pinned": true|false, // 切换置顶(传 true 切换;传 false 切换为非置顶)
"important": true|false, // 切换重要
"action": "accept|ignore|confirm|reschedule" // 处理动作
}
注意:pinned / important 实际语义为「切换(toggle)」,与原接口保持一致。
func PinConversation ¶
func PreviewFile ¶
func ProcessGroupDocument ¶
func PublicDownloadFile ¶
PublicDownloadFile 公开下载文件(无需认证,用于客户端安装包等)
func RecallMessage ¶
func RedirectShortLink ¶
func RedirectUpdateFile ¶
func RefreshOAuthToken ¶
func RefreshToken ¶
func RegisterAdminTools ¶
RegisterAdminTools 注册管理操作工具到 MCP 服务器
func RegisterSensitiveWordRoutes ¶
func RegisterSensitiveWordRoutes(r *gin.RouterGroup)
func RejectJoin ¶
func RejectJoinRequest ¶
func RemindMessage ¶
func RemoveBlacklistEntry ¶
func RemoveEmployeeFromDepartment ¶
RemoveEmployeeFromDepartment 从部门移除员工
func RemoveGroupDocument ¶
func RemoveMemberFromGroup ¶
func RemoveUserRole ¶
func RespondToShareRequest ¶
func SearchMessages ¶
func SearchUsers ¶
func SendMessage ¶
func SendToUserMessage ¶
func SetAvatarWorkerPool ¶
func SetAvatarWorkerPool(pool *service.AvatarWorkerPool)
SetAvatarWorkerPool sets the avatar worker pool for the smart reply engine
func SetConversationMute ¶
func SetMemberRole ¶
func SetMemoryService ¶
func SetMemoryService(ms *service.AvatarMemoryService)
SetMemoryService sets the avatar memory service for the smart reply engine
func SetUnifiedKnowledge ¶
func SetUnifiedKnowledge(uk *service.UnifiedKnowledgeService)
SetUnifiedKnowledge sets the unified knowledge service for the smart reply engine
func StartAnomalyDetection ¶
func StartAnomalyDetection(detector *AnomalyDetector)
StartAnomalyDetection 启动异常检测定时任务
func StreamMessage ¶
func SubscribeChannel ¶
func TestAIProviderConnection ¶
TestAIProviderConnection 测试AI提供商连接
func ToggleAIProviderStatus ¶
ToggleAIProviderStatus 切换AI提供商状态
func ToggleAppStatus ¶
func TogglePinNotification ¶
func ToggleStar ¶
func ToggleVersionStatus ¶
func TransferOwner ¶
func UnifiedAuthCallback ¶
func UnlikeChannelMessage ¶
func UnsubscribeChannel ¶
func UpdateAIConfig ¶
func UpdateAnnouncement ¶
func UpdateEvent ¶
func UpdateFile ¶
func UpdateFolder ¶
func UpdateGroupAISettings ¶
func UpdateGroupInfo ¶
func UpdateMiniApp ¶
func UpdateNote ¶
func UpdateNoteSummary ¶
func UpdateNoteTags ¶
func UpdateRole ¶
func UpdateSensitiveWord ¶
func UpdateSystemConfig ¶
func UpdateSystemMessage ¶
func UpdateTask ¶
func UpdateTaskStatus ¶
func UpdateUser ¶
func UpdateVersion ¶
func UploadFile ¶
func VerifyTwoFA ¶
Types ¶
type AIAnalyzeResponse ¶
type AIBotHandler ¶
type AIBotHandler struct {
// contains filtered or unexported fields
}
func NewAIBotHandler ¶
func NewAIBotHandler(db *gorm.DB) *AIBotHandler
func (*AIBotHandler) CreateAIBot ¶
func (h *AIBotHandler) CreateAIBot(c *gin.Context)
func (*AIBotHandler) DeleteAIBot ¶
func (h *AIBotHandler) DeleteAIBot(c *gin.Context)
func (*AIBotHandler) GetAIBots ¶
func (h *AIBotHandler) GetAIBots(c *gin.Context)
func (*AIBotHandler) ToggleAIBotStatus ¶
func (h *AIBotHandler) ToggleAIBotStatus(c *gin.Context)
func (*AIBotHandler) UpdateAIBot ¶
func (h *AIBotHandler) UpdateAIBot(c *gin.Context)
type AIHandler ¶
type AIHandler struct {
// contains filtered or unexported fields
}
AIHandler AI处理器
func NewAIHandler ¶
NewAIHandler 创建AI处理器
func (*AIHandler) CommandGeneration ¶
CommandGeneration 命令生成 @Summary 命令生成 @Description 根据描述生成运维命令 @Tags AI @Accept json @Produce json @Param request body CommandGenerationRequest true "命令生成请求" @Success 200 {object} AIResponse "成功响应" @Failure 400 {object} AIResponse "参数错误" @Failure 500 {object} AIResponse "服务器错误" @Router /api/ai/ops/command [post]
func (*AIHandler) ExecuteTool ¶
ExecuteTool 执行MCP工具 @Summary 执行MCP工具 @Description 执行指定的MCP工具 @Tags AI @Accept json @Produce json @Param request body ExecuteToolRequest true "执行工具请求" @Success 200 {object} AIResponse "成功响应" @Failure 400 {object} AIResponse "参数错误" @Failure 500 {object} AIResponse "服务器错误" @Router /api/ai/tools/execute [post]
func (*AIHandler) GenerateSummary ¶
GenerateSummary 生成会话摘要
func (*AIHandler) GetCompletion ¶
GetCompletion 获取AI完成 @Summary 获取AI完成 @Description 根据消息获取AI完成 @Tags AI @Accept json @Produce json @Param request body GetCompletionRequest true "AI完成请求" @Success 200 {object} AIResponse "成功响应" @Failure 400 {object} AIResponse "参数错误" @Failure 500 {object} AIResponse "服务器错误" @Router /api/ai/completion [post]
func (*AIHandler) GetCompletionStream ¶
GetCompletionStream 流式获取AI完成 @Summary 流式获取AI完成 @Description 流式获取AI完成,使用服务器发送事件(SSE)返回统一JSON格式 @Tags AI @Accept json @Produce text/event-stream @Param request body GetCompletionRequest true "AI完成请求" @Success 200 {string} string "流式输出" @Failure 400 {object} AIResponse "参数错误" @Failure 500 {object} AIResponse "服务器错误" @Router /api/ai/completion/stream [post]
func (*AIHandler) GetKnowledgeGraph ¶
GetKnowledgeGraph 获取知识图谱数据 @Summary 获取知识图谱数据 @Description 获取指定集合的知识图谱节点和关系数据 @Tags 知识图谱 @Accept json @Produce json @Param collection query string true "集合名称" @Param query query string false "搜索查询" @Param max_nodes query int false "最大节点数" @Success 200 {object} AIResponse "成功响应" @Failure 400 {object} AIResponse "参数错误" @Failure 500 {object} AIResponse "服务器错误" @Router /api/admin/knowledge-graph [get]
func (*AIHandler) IntelligentAlert ¶
IntelligentAlert 智能告警处理 @Summary 智能告警处理 @Description 分析和处理告警 @Tags AI @Accept json @Produce json @Param request body IntelligentAlertRequest true "智能告警处理请求" @Success 200 {object} AIResponse "成功响应" @Failure 400 {object} AIResponse "参数错误" @Failure 500 {object} AIResponse "服务器错误" @Router /api/ai/ops/alert [post]
func (*AIHandler) IntelligentTroubleshooting ¶
IntelligentTroubleshooting 智能故障排查 @Summary 智能故障排查 @Description 分析服务器故障并提供解决方案 @Tags AI @Accept json @Produce json @Param request body IntelligentTroubleshootingRequest true "智能故障排查请求" @Success 200 {object} AIResponse "成功响应" @Failure 400 {object} AIResponse "参数错误" @Failure 500 {object} AIResponse "服务器错误" @Router /api/ai/ops/troubleshooting [post]
func (*AIHandler) ListMCPTools ¶
ListMCPTools 列出所有MCP工具(包含启用状态) @Summary 列出所有MCP工具(管理后台) @Description 列出所有MCP工具及其启用状态,用于管理后台配置 @Tags MCP工具管理 @Produce json @Success 200 {object} AIResponse "成功响应" @Router /api/admin/mcp/tools [get]
func (*AIHandler) ListTools ¶
ListTools 列出所有MCP工具 @Summary 列出所有MCP工具 @Description 列出所有可用的MCP工具 @Tags AI @Produce json @Success 200 {object} AIResponse "成功响应" @Router /api/ai/tools [get]
func (*AIHandler) LogAnalysis ¶
LogAnalysis 日志分析 @Summary 日志分析 @Description 分析服务器日志并提供建议 @Tags AI @Accept json @Produce json @Param request body LogAnalysisRequest true "日志分析请求" @Success 200 {object} AIResponse "成功响应" @Failure 400 {object} AIResponse "参数错误" @Failure 500 {object} AIResponse "服务器错误" @Router /api/ai/ops/logs [post]
func (*AIHandler) OpsDashboard ¶
OpsDashboard 运维面板数据 @Summary 运维面板数据 @Description 获取AI运维面板的统计数据 @Tags AI @Produce json @Success 200 {object} AIResponse "成功响应" @Router /api/ai/ops/dashboard [get]
func (*AIHandler) OpsKnowledge ¶
OpsKnowledge 运维知识问答 @Summary 运维知识问答 @Description 回答运维相关问题 @Tags AI @Accept json @Produce json @Param request body OpsKnowledgeRequest true "运维知识问答请求" @Success 200 {object} AIResponse "成功响应" @Failure 400 {object} AIResponse "参数错误" @Failure 500 {object} AIResponse "服务器错误" @Router /api/ai/ops/knowledge [post]
func (*AIHandler) RegisterRoutes ¶
func (h *AIHandler) RegisterRoutes(router *gin.RouterGroup)
RegisterRoutes 注册路由
func (*AIHandler) SetSmartDigestGraph ¶
func (h *AIHandler) SetSmartDigestGraph(graph *service.SmartDigestGraph)
func (*AIHandler) SetSummaryGraph ¶
func (h *AIHandler) SetSummaryGraph(graph *service.SummaryGraph)
func (*AIHandler) SetTextProcessGraph ¶
func (h *AIHandler) SetTextProcessGraph(graph *service.TextProcessGraph)
func (*AIHandler) SetUnifiedSearchGraph ¶
func (h *AIHandler) SetUnifiedSearchGraph(graph *service.UnifiedSearchGraph)
func (*AIHandler) TranslateImage ¶
TranslateImage 图片翻译(AI 视觉识别 + 翻译)
func (*AIHandler) TranslateText ¶
TranslateText 翻译文本
func (*AIHandler) UpdateMCPToolConfig ¶
UpdateMCPToolConfig 更新MCP工具配置 @Summary 更新MCP工具配置 @Description 启用或禁用指定的MCP工具 @Tags MCP工具管理 @Accept json @Produce json @Param tool_name path string true "工具名称" @Param request body MCPToolConfigRequest true "工具配置请求" @Success 200 {object} AIResponse "成功响应" @Failure 400 {object} AIResponse "参数错误" @Failure 404 {object} AIResponse "工具不存在" @Router /api/admin/mcp/tools/{tool_name} [put]
type AIResponse ¶
type AIResponse struct {
Code int `json:"code"`
Message string `json:"message"`
Data interface{} `json:"data"`
}
AIResponse 标准AI响应结构体
type AISearchRequest ¶
type AISearchRequest struct {
ConversationID uint `json:"conversation_id" binding:"required"`
Query string `json:"query" binding:"required"`
SenderID *uint `json:"sender_id"`
StartTime string `json:"start_time"`
EndTime string `json:"end_time"`
Limit int `json:"limit"`
}
AISearchRequest 语义搜索请求
type AISearchResult ¶
type AISearchResult struct {
MessageID uint `json:"message_id"`
Content string `json:"content"`
SenderName string `json:"sender_name"`
Timestamp string `json:"timestamp"`
RelevanceScore int `json:"relevance_score"`
Highlighted string `json:"highlighted"`
}
AISearchResult 搜索结果
type AlertHandler ¶
type AlertHandler struct {
// contains filtered or unexported fields
}
func NewAlertHandler ¶
func NewAlertHandler(db *gorm.DB) *AlertHandler
func (*AlertHandler) CreateAlertRule ¶
func (h *AlertHandler) CreateAlertRule(c *gin.Context)
func (*AlertHandler) DeleteAlertRule ¶
func (h *AlertHandler) DeleteAlertRule(c *gin.Context)
func (*AlertHandler) GetAlertHistory ¶
func (h *AlertHandler) GetAlertHistory(c *gin.Context)
func (*AlertHandler) GetAlertRules ¶
func (h *AlertHandler) GetAlertRules(c *gin.Context)
func (*AlertHandler) UpdateAlertRule ¶
func (h *AlertHandler) UpdateAlertRule(c *gin.Context)
type AnomalyAlert ¶
type AnomalyAlert struct {
Type string `json:"type"`
Level string `json:"level"`
ConversationID uint `json:"conversation_id,omitempty"`
Message string `json:"message"`
Details map[string]interface{} `json:"details,omitempty"`
}
AnomalyAlert 异常告警
type AnomalyDetector ¶
type AnomalyDetector struct {
// contains filtered or unexported fields
}
AnomalyDetector 异常检测器
func (*AnomalyDetector) CalculateMessageVariance ¶
func (d *AnomalyDetector) CalculateMessageVariance(conversationID uint) float64
CalculateMessageVariance 计算消息方差(用于判断异常波动)
func (*AnomalyDetector) CheckInactiveGroup ¶
func (d *AnomalyDetector) CheckInactiveGroup(conversationID uint) *AnomalyAlert
CheckInactiveGroup 检测不活跃群组突然活跃
func (*AnomalyDetector) CheckMessageAnomaly ¶
func (d *AnomalyDetector) CheckMessageAnomaly(conversationID uint) *AnomalyAlert
CheckMessageAnomaly 检查消息异常
func (*AnomalyDetector) CheckMessageFrequency ¶
func (d *AnomalyDetector) CheckMessageFrequency(userID uint, conversationID uint) *AnomalyAlert
CheckMessageFrequency 检测单用户消息频率异常
func (*AnomalyDetector) CheckSensitiveContent ¶
func (d *AnomalyDetector) CheckSensitiveContent(content string) *AnomalyAlert
CheckSensitiveContent 检测敏感内容爆发
func (*AnomalyDetector) GetDetectionStats ¶
func (d *AnomalyDetector) GetDetectionStats() map[string]interface{}
GetDetectionStats 获取检测统计信息
func (*AnomalyDetector) RecordMessage ¶
func (d *AnomalyDetector) RecordMessage(conversationID uint)
RecordMessage 记录消息用于检测
func (*AnomalyDetector) SendAlert ¶
func (d *AnomalyDetector) SendAlert(adminID uint, alert *AnomalyAlert)
SendAlert 发送告警通知
func (*AnomalyDetector) UpdateBaseline ¶
func (d *AnomalyDetector) UpdateBaseline()
UpdateBaseline 更新基线数据
type AuthProviderHandler ¶
type AuthProviderHandler struct {
// contains filtered or unexported fields
}
func NewAuthProviderHandler ¶
func NewAuthProviderHandler() *AuthProviderHandler
func (*AuthProviderHandler) CreateProvider ¶
func (h *AuthProviderHandler) CreateProvider(c *gin.Context)
func (*AuthProviderHandler) DeleteProvider ¶
func (h *AuthProviderHandler) DeleteProvider(c *gin.Context)
func (*AuthProviderHandler) GetProviderLoginURL ¶
func (h *AuthProviderHandler) GetProviderLoginURL(c *gin.Context)
func (*AuthProviderHandler) GetProviders ¶
func (h *AuthProviderHandler) GetProviders(c *gin.Context)
func (*AuthProviderHandler) TestProvider ¶
func (h *AuthProviderHandler) TestProvider(c *gin.Context)
func (*AuthProviderHandler) UpdateProvider ¶
func (h *AuthProviderHandler) UpdateProvider(c *gin.Context)
type AvatarConfigResponse ¶
type AvatarConfigResponse struct {
ID uint `json:"id"`
UserID uint `json:"userId"`
Name string `json:"name"`
Enabled bool `json:"enabled"`
AutoLearnedPersona string `json:"autoLearnedPersona"`
CustomPersonaAddon string `json:"customPersonaAddon"`
PersonaVersion int `json:"personaVersion"`
LastLearnedAt *time.Time `json:"lastLearnedAt"`
KnowledgeScope model.AvatarKnowledgeScope `json:"knowledgeScope"`
TriggerRules model.AvatarTriggerRules `json:"triggerRules"`
ReplyStrategy model.AvatarReplyStrategy `json:"replyStrategy"`
ModelConfigID *uint `json:"modelConfigId"`
UseSystemConfig bool `json:"useSystemConfig"`
TakeoverCooldown int `json:"takeoverCooldown"`
// 审批相关(从approvals表获取)
ApprovalStatus string `json:"approvalStatus"`
ApprovalRejectedReason string `json:"approvalRejectedReason"`
ApprovalAppliedAt *time.Time `json:"approvalAppliedAt"`
ApprovalReviewedAt *time.Time `json:"approvalReviewedAt"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
}
type AvatarHandler ¶
type AvatarHandler struct {
// contains filtered or unexported fields
}
func NewAvatarHandler ¶
func NewAvatarHandler(db *gorm.DB, avatarService *service.AvatarService, mcpServer *ai.MCPServer, approvalService *service.ApprovalService) *AvatarHandler
func (*AvatarHandler) ApplyForApproval ¶
func (h *AvatarHandler) ApplyForApproval(c *gin.Context)
ApplyForApproval 申请审批
func (*AvatarHandler) CancelApplication ¶
func (h *AvatarHandler) CancelApplication(c *gin.Context)
CancelApplication 取消申请
func (*AvatarHandler) CheckTrigger ¶
func (h *AvatarHandler) CheckTrigger(c *gin.Context)
func (*AvatarHandler) ClearLearnedPersona ¶
func (h *AvatarHandler) ClearLearnedPersona(c *gin.Context)
ClearLearnedPersona 清除学习结果
func (*AvatarHandler) CreateConfig ¶
func (h *AvatarHandler) CreateConfig(c *gin.Context)
func (*AvatarHandler) DeleteConfig ¶
func (h *AvatarHandler) DeleteConfig(c *gin.Context)
func (*AvatarHandler) DeleteMemory ¶
func (h *AvatarHandler) DeleteMemory(c *gin.Context)
func (*AvatarHandler) GetAvailableTools ¶
func (h *AvatarHandler) GetAvailableTools(c *gin.Context)
GetAvailableTools 获取可用工具列表
func (*AvatarHandler) GetAvatarTools ¶
func (h *AvatarHandler) GetAvatarTools(c *gin.Context)
GetAvatarTools 获取分身绑定的工具
func (*AvatarHandler) GetConfig ¶
func (h *AvatarHandler) GetConfig(c *gin.Context)
func (*AvatarHandler) GetLearnStatus ¶
func (h *AvatarHandler) GetLearnStatus(c *gin.Context)
GetLearnStatus 获取学习状态
func (*AvatarHandler) GetLearnedPersona ¶
func (h *AvatarHandler) GetLearnedPersona(c *gin.Context)
GetLearnedPersona 获取学习结果
func (*AvatarHandler) GetMemories ¶
func (h *AvatarHandler) GetMemories(c *gin.Context)
func (*AvatarHandler) GetSessions ¶
func (h *AvatarHandler) GetSessions(c *gin.Context)
GetSessions 获取会话分身状态
func (*AvatarHandler) PreviewReply ¶
func (h *AvatarHandler) PreviewReply(c *gin.Context)
PreviewReply 预览回复
func (*AvatarHandler) RegisterRoutes ¶
func (h *AvatarHandler) RegisterRoutes(router *gin.RouterGroup)
func (*AvatarHandler) SearchMemories ¶
func (h *AvatarHandler) SearchMemories(c *gin.Context)
func (*AvatarHandler) SearchNotes ¶
func (h *AvatarHandler) SearchNotes(c *gin.Context)
func (*AvatarHandler) TakeoverSession ¶
func (h *AvatarHandler) TakeoverSession(c *gin.Context)
TakeoverSession 接管分身
func (*AvatarHandler) TriggerLearnPersona ¶
func (h *AvatarHandler) TriggerLearnPersona(c *gin.Context)
TriggerLearnPersona 触发人设学习
func (*AvatarHandler) UnbindTool ¶
func (h *AvatarHandler) UnbindTool(c *gin.Context)
UnbindTool 解绑工具
func (*AvatarHandler) UpdateAvatarTools ¶
func (h *AvatarHandler) UpdateAvatarTools(c *gin.Context)
UpdateAvatarTools 批量更新分身工具配置
func (*AvatarHandler) UpdateConfig ¶
func (h *AvatarHandler) UpdateConfig(c *gin.Context)
func (*AvatarHandler) UpdateSession ¶
func (h *AvatarHandler) UpdateSession(c *gin.Context)
UpdateSession 更新会话分身状态
type AvatarTool ¶
AvatarTool 工具信息
type CancelUploadRequest ¶
type CancelUploadRequest struct {
UploadID string `json:"upload_id" binding:"required"`
}
CancelUploadRequest 取消上传请求
type CommandGenerationRequest ¶
type CommandGenerationRequest struct {
Description string `json:"description" binding:"required"`
Platform string `json:"platform"`
Format string `json:"format"`
}
CommandGenerationRequest 命令生成请求
type CompleteUploadRequest ¶
type CompleteUploadRequest struct {
UploadID string `json:"upload_id" binding:"required"`
}
CompleteUploadRequest 完成上传请求
type ConfigResponse ¶
type ConfigResponse struct {
ID uint `json:"id"`
ConfigName string `json:"config_name"`
Provider string `json:"provider"`
ModelName string `json:"model_name"`
BaseURL string `json:"base_url"`
Temperature float64 `json:"temperature"`
MaxTokens int `json:"max_tokens"`
IsVerified bool `json:"is_verified"`
Overrides []ai.Override `json:"overrides,omitempty"`
LastTestedAt *time.Time `json:"last_tested_at"`
CreatedAt time.Time `json:"created_at"`
}
type CrashLogHandler ¶
type CrashLogHandler struct {
// contains filtered or unexported fields
}
func NewCrashLogHandler ¶
func NewCrashLogHandler(db *gorm.DB) *CrashLogHandler
func (*CrashLogHandler) CreateCrashLog ¶
func (h *CrashLogHandler) CreateCrashLog(c *gin.Context)
func (*CrashLogHandler) GetCrashDetail ¶
func (h *CrashLogHandler) GetCrashDetail(c *gin.Context)
func (*CrashLogHandler) GetCrashLogs ¶
func (h *CrashLogHandler) GetCrashLogs(c *gin.Context)
type CreateAvatarConfigRequest ¶
type CreateAvatarConfigRequest struct {
Name string `json:"name"`
UseSystemConfig bool `json:"useSystemConfig"`
ModelConfigID *uint `json:"modelConfigId"`
TriggerRules model.AvatarTriggerRules `json:"triggerRules"`
KnowledgeScope model.AvatarKnowledgeScope `json:"knowledgeScope"`
ReplyStrategy model.AvatarReplyStrategy `json:"replyStrategy"`
TakeoverCooldown int `json:"takeoverCooldown"`
CustomPersonaAddon string `json:"customPersonaAddon"`
}
type CreateBotRequest ¶
type CreateBotRequest struct {
Name string `json:"name" binding:"required"`
Description string `json:"description" binding:"required"`
Type string `json:"type" binding:"required"` // ai, custom
Provider string `json:"provider"`
CustomModelURL string `json:"custom_model_url"`
LobsterURL string `json:"lobster_url"`
Avatar string `json:"avatar"`
IsTemplate bool `json:"is_template"`
Config map[string]interface{} `json:"config"`
}
CreateBotRequest 创建 Bot 请求体
type CreateConfigRequest ¶
type CreateConfigRequest struct {
ConfigName string `json:"config_name" binding:"required"`
Provider string `json:"provider" binding:"required"`
APIKey string `json:"api_key" binding:"required"`
ModelName string `json:"model_name" binding:"required"`
BaseURL string `json:"base_url"`
Overrides []ai.Override `json:"overrides,omitempty"`
}
type DBPoolStats ¶
type DBPoolStats struct {
MaxOpenConnections int `json:"maxOpenConnections"`
OpenConnections int `json:"openConnections"`
InUse int `json:"inUse"`
Idle int `json:"idle"`
WaitCount int64 `json:"waitCount"`
WaitDuration time.Duration `json:"waitDuration"`
MaxIdleClosed int64 `json:"maxIdleClosed"`
MaxLifetimeClosed int64 `json:"maxLifetimeClosed"`
}
type ExecuteToolRequest ¶
type ExecuteToolRequest struct {
ToolName string `json:"tool_name" binding:"required"`
Parameters map[string]interface{} `json:"parameters"`
}
ExecuteToolRequest 执行工具请求
type ExtractedTodo ¶
type ExtractedTodo struct {
Title string `json:"title"`
Description string `json:"description"`
Assignee string `json:"assignee,omitempty"`
DueDate string `json:"due_date,omitempty"`
Priority string `json:"priority,omitempty"`
}
ExtractedTodo 提取的待办结构
type FeedbackHandler ¶
type FeedbackHandler struct {
// contains filtered or unexported fields
}
func NewFeedbackHandler ¶
func NewFeedbackHandler(db *gorm.DB) *FeedbackHandler
func (*FeedbackHandler) CreateFeedback ¶
func (h *FeedbackHandler) CreateFeedback(c *gin.Context)
func (*FeedbackHandler) GetFeedbackDetail ¶
func (h *FeedbackHandler) GetFeedbackDetail(c *gin.Context)
func (*FeedbackHandler) GetFeedbacks ¶
func (h *FeedbackHandler) GetFeedbacks(c *gin.Context)
func (*FeedbackHandler) UpdateFeedback ¶
func (h *FeedbackHandler) UpdateFeedback(c *gin.Context)
type FileStatistics ¶
type GenerateSummaryRequest ¶
type GenerateSummaryRequest struct {
ConversationID uint `json:"conversation_id" binding:"required"`
TimeRange string `json:"time_range"` // "1h", "today", "7d", "custom"
StartTime *time.Time `json:"start_time"`
EndTime *time.Time `json:"end_time"`
}
GenerateSummaryRequest 生成摘要请求
type GetCompletionRequest ¶
GetCompletionRequest 获取AI完成请求
type GroupManagementTool ¶
type GroupManagementTool struct{}
GroupManagementTool 群组管理工具
func (*GroupManagementTool) Description ¶
func (t *GroupManagementTool) Description() string
func (*GroupManagementTool) Execute ¶
func (t *GroupManagementTool) Execute(params map[string]interface{}, ctx *ai.CallerContext) (interface{}, error)
func (*GroupManagementTool) Name ¶
func (t *GroupManagementTool) Name() string
func (*GroupManagementTool) Parameters ¶
func (t *GroupManagementTool) Parameters() map[string]interface{}
type GroupSummaryJob ¶
type GroupSummaryJob struct {
// contains filtered or unexported fields
}
GroupSummaryJob 群聊总结定时任务
func NewGroupSummaryJob ¶
func NewGroupSummaryJob(aiService *ai.AIService) *GroupSummaryJob
NewGroupSummaryJob 创建群聊总结任务
func (*GroupSummaryJob) GenerateDailySummaries ¶
func (j *GroupSummaryJob) GenerateDailySummaries()
GenerateDailySummaries 生成所有群的每日总结
type InitUploadRequest ¶
type InitUploadRequest struct {
Filename string `json:"filename" binding:"required"`
FileSize int64 `json:"file_size" binding:"required"`
FileHash string `json:"file_hash" binding:"required"`
FolderID *uint `json:"folder_id"`
}
InitUploadRequest 初始化上传请求
type InitUploadResponse ¶
type InitUploadResponse struct {
UploadID string `json:"upload_id"`
ChunkSize int64 `json:"chunk_size"`
TotalChunks int `json:"total_chunks"`
UploadedChunks []int `json:"uploaded_chunks"`
IsInstantUpload bool `json:"is_quick_upload"`
FileID *uint `json:"file_id,omitempty"`
}
InitUploadResponse 初始化上传响应
type IntelligentAlertRequest ¶
type IntelligentAlertRequest struct {
AlertContent string `json:"alert_content" binding:"required"`
Severity string `json:"severity"`
Service string `json:"service"`
}
IntelligentAlertRequest 智能告警处理请求
type IntelligentTroubleshootingRequest ¶
type IntelligentTroubleshootingRequest struct {
Symptom string `json:"symptom" binding:"required"`
Server string `json:"server"`
Logs string `json:"logs"`
}
IntelligentTroubleshootingRequest 智能故障排查请求
type KnowledgeGraphQueryRequest ¶
type KnowledgeGraphQueryRequest struct {
Collection string `json:"collection" binding:"required"`
Query string `json:"query"`
MaxNodes int `json:"max_nodes"`
}
KnowledgeGraphQueryRequest 知识图谱查询请求
type KnowledgeResult ¶
type KnowledgeResult struct {
Note model.Note `json:"note"`
Score float64 `json:"score"`
Snippet string `json:"snippet"`
}
KnowledgeResult 知识检索结果
type KnowledgeService ¶
type KnowledgeService struct {
// contains filtered or unexported fields
}
KnowledgeService 知识库服务
func NewKnowledgeService ¶
func NewKnowledgeService(aiService *ai.AIService) *KnowledgeService
NewKnowledgeService 创建知识库服务
func (*KnowledgeService) AnswerWithKnowledge ¶
func (k *KnowledgeService) AnswerWithKnowledge(query string, userID uint) (string, error)
AnswerWithKnowledge 基于知识库回答问题
func (*KnowledgeService) BuildKnowledgeContext ¶
func (k *KnowledgeService) BuildKnowledgeContext(query string) string
BuildKnowledgeContext 构建知识库上下文,用于注入到 AI prompt 中
func (*KnowledgeService) GetKnowledgeStats ¶
func (k *KnowledgeService) GetKnowledgeStats() map[string]interface{}
GetKnowledgeStats 获取知识库统计信息
func (*KnowledgeService) SearchKnowledge ¶
func (k *KnowledgeService) SearchKnowledge(query string, limit int) []KnowledgeResult
SearchKnowledge 搜索知识库
type LogAnalysisRequest ¶
type LogAnalysisRequest struct {
LogContent string `json:"log_content" binding:"required"`
Service string `json:"service"`
Severity string `json:"severity"`
}
LogAnalysisRequest 日志分析请求
type MCPToolConfigRequest ¶
type MCPToolConfigRequest struct {
Enabled *bool `json:"enabled" binding:"required"`
}
MCPToolConfigRequest MCP工具配置请求
type MessageSender ¶
type MessageSender interface {
SendAIMessage(conversationID uint, content string, assistantName string) error
SendMessageWithContext(conversationID uint, content string, assistantName string, msg *model.Message) error
SendStreamingAIMessage(conversationID uint, assistantName string) (func(string) error, func() error, error)
}
type MonitorHandler ¶
type MonitorHandler struct {
// contains filtered or unexported fields
}
func NewMonitorHandler ¶
func NewMonitorHandler() *MonitorHandler
func (*MonitorHandler) GetServerMetrics ¶
func (h *MonitorHandler) GetServerMetrics(c *gin.Context)
func (*MonitorHandler) GetServerMetricsHistory ¶
func (h *MonitorHandler) GetServerMetricsHistory(c *gin.Context)
func (*MonitorHandler) GetServiceStatus ¶
func (h *MonitorHandler) GetServiceStatus(c *gin.Context)
func (*MonitorHandler) HealthCheck ¶
func (h *MonitorHandler) HealthCheck(c *gin.Context)
type NoteSearchResult ¶
type NoteSearchResult struct {
Content string `json:"content"`
Score float64 `json:"score"`
Title string `json:"title"`
NoteID string `json:"note_id"`
}
NoteSearchResult 笔记搜索结果
type NoteSummaryRequest ¶
type NoteSummaryRequest struct {
Summary string `json:"summary"`
}
type NoteTagsRequest ¶
type NoteTagsRequest struct {
Tags []string `json:"tags"`
}
type NoteVectorSearchItem ¶
type NoteVectorSearchRequest ¶
type OpsKnowledgeRequest ¶
type OpsKnowledgeRequest struct {
Question string `json:"question" binding:"required"`
Category string `json:"category"`
}
OpsKnowledgeRequest 运维知识问答请求
type OrgSyncHandler ¶
type OrgSyncHandler struct {
// contains filtered or unexported fields
}
func NewOrgSyncHandler ¶
func NewOrgSyncHandler() *OrgSyncHandler
func (*OrgSyncHandler) CreateConfig ¶
func (h *OrgSyncHandler) CreateConfig(c *gin.Context)
func (*OrgSyncHandler) DeleteConfig ¶
func (h *OrgSyncHandler) DeleteConfig(c *gin.Context)
func (*OrgSyncHandler) GetConfigs ¶
func (h *OrgSyncHandler) GetConfigs(c *gin.Context)
func (*OrgSyncHandler) GetLogs ¶
func (h *OrgSyncHandler) GetLogs(c *gin.Context)
func (*OrgSyncHandler) TriggerSync ¶
func (h *OrgSyncHandler) TriggerSync(c *gin.Context)
func (*OrgSyncHandler) UpdateConfig ¶
func (h *OrgSyncHandler) UpdateConfig(c *gin.Context)
type PolishTextRequest ¶
type PolishTextRequest struct {
Text string `json:"text" binding:"required"`
Language string `json:"language"` // zh/en
}
PolishTextRequest 润色请求
type PromptBuilder ¶
type PromptBuilder interface {
BuildSystemPrompt(ctx *PromptContext) string
}
type PromptContext ¶
type RateLimiter ¶
type RateLimiter struct {
// contains filtered or unexported fields
}
RateLimiter 简易令牌桶限流器
func NewRateLimiter ¶
func NewRateLimiter(interval time.Duration, burst int) *RateLimiter
NewRateLimiter 创建限流器,interval 为两次放行间隔,burst 为突发上限
type RewriteTextRequest ¶
type RewriteTextRequest struct {
Text string `json:"text" binding:"required"`
Style string `json:"style"` // formal/casual/concise/detailed
Tone string `json:"tone"` // professional/friendly/neutral
}
RewriteTextRequest 改写请求
type ServerMetrics ¶
type ServiceStatus ¶
type SmartPromptBuilder ¶
type SmartPromptBuilder struct {
// contains filtered or unexported fields
}
func NewSmartPromptBuilder ¶
func NewSmartPromptBuilder(knowledgeSvc *KnowledgeService) *SmartPromptBuilder
func (*SmartPromptBuilder) BuildPromptContext ¶
func (b *SmartPromptBuilder) BuildPromptContext(conversationID uint, userID uint) *PromptContext
func (*SmartPromptBuilder) BuildSystemPrompt ¶
func (b *SmartPromptBuilder) BuildSystemPrompt(ctx *PromptContext) string
type SmartReplyEngine ¶
type SmartReplyEngine struct {
// contains filtered or unexported fields
}
SmartReplyEngine 智能回复引擎
func GetSmartReplyEngine ¶
func GetSmartReplyEngine() *SmartReplyEngine
GetSmartReplyEngine returns the smart reply engine instance
func NewSmartReplyEngine ¶
func NewSmartReplyEngine(aiService *ai.AIService, detector *ai.IntentDetector) *SmartReplyEngine
NewSmartReplyEngine 创建智能回复引擎
func (*SmartReplyEngine) HandleMessage ¶
func (e *SmartReplyEngine) HandleMessage(userID uint, conversationID uint, content string, mentionUserIDs []uint)
func (*SmartReplyEngine) InitSmartReplyGraph ¶
func (e *SmartReplyEngine) InitSmartReplyGraph() error
func (*SmartReplyEngine) SetAvatarWorkerPool ¶
func (e *SmartReplyEngine) SetAvatarWorkerPool(pool *service.AvatarWorkerPool)
SetAvatarWorkerPool 设置分身工作池
func (*SmartReplyEngine) SetMemoryService ¶
func (e *SmartReplyEngine) SetMemoryService(ms *service.AvatarMemoryService)
SetMemoryService sets the avatar memory service for the smart reply engine
func (*SmartReplyEngine) SetUnifiedKnowledge ¶
func (e *SmartReplyEngine) SetUnifiedKnowledge(uk *service.UnifiedKnowledgeService)
SetUnifiedKnowledge 设置统一知识检索服务(向量库+MySQL兜底)
type SystemNotificationTool ¶
type SystemNotificationTool struct{}
SystemNotificationTool 系统通知工具
func (*SystemNotificationTool) Description ¶
func (t *SystemNotificationTool) Description() string
func (*SystemNotificationTool) Execute ¶
func (t *SystemNotificationTool) Execute(params map[string]interface{}, ctx *ai.CallerContext) (interface{}, error)
func (*SystemNotificationTool) Name ¶
func (t *SystemNotificationTool) Name() string
func (*SystemNotificationTool) Parameters ¶
func (t *SystemNotificationTool) Parameters() map[string]interface{}
type TodoExtractor ¶
type TodoExtractor struct {
// contains filtered or unexported fields
}
TodoExtractor 待办提取引擎
func NewTodoExtractor ¶
func NewTodoExtractor(aiService *ai.AIService) *TodoExtractor
NewTodoExtractor 创建待办提取引擎
func (*TodoExtractor) ExtractAndCreateTodos ¶
func (e *TodoExtractor) ExtractAndCreateTodos(content string, senderID uint, conversationID uint)
ExtractAndCreateTodos 从消息中提取待办并创建
type TranslateImageRequest ¶
type TranslateImageRequest struct {
ImageURL string `json:"image_url" binding:"required"`
TargetLang string `json:"target_lang"` // 默认 zh
}
TranslateImageRequest 图片翻译请求
type TranslateTextRequest ¶
type TranslateTextRequest struct {
Text string `json:"text" binding:"required"`
TargetLang string `json:"target_lang" binding:"required"` // zh/en/ja/ko/fr/de
SourceLang string `json:"source_lang"` // auto/zh/en/...
}
TranslateTextRequest 翻译请求
type UpdateAvatarConfigRequest ¶
type UpdateAvatarConfigRequest struct {
Name *string `json:"name"`
Enabled *bool `json:"enabled"`
UseSystemConfig *bool `json:"useSystemConfig"`
ModelConfigID *uint `json:"modelConfigId"`
TriggerRules *model.AvatarTriggerRules `json:"triggerRules"`
KnowledgeScope *model.AvatarKnowledgeScope `json:"knowledgeScope"`
ReplyStrategy *model.AvatarReplyStrategy `json:"replyStrategy"`
TakeoverCooldown *int `json:"takeoverCooldown"`
CustomPersonaAddon *string `json:"customPersonaAddon"`
}
type UploadChunkRequest ¶
type UploadChunkRequest struct {
UploadID string `form:"upload_id" binding:"required"`
ChunkIndex int `form:"chunk_index" binding:"required"`
ChunkHash string `form:"chunk_hash" binding:"required"`
}
UploadChunkRequest 上传分片请求(multipart form)
type UserAIConfigHandler ¶
type UserAIConfigHandler struct{}
func NewUserAIConfigHandler ¶
func NewUserAIConfigHandler() *UserAIConfigHandler
func (*UserAIConfigHandler) CreateConfig ¶
func (h *UserAIConfigHandler) CreateConfig(c *gin.Context)
func (*UserAIConfigHandler) DeleteConfig ¶
func (h *UserAIConfigHandler) DeleteConfig(c *gin.Context)
func (*UserAIConfigHandler) ListMyConfigs ¶
func (h *UserAIConfigHandler) ListMyConfigs(c *gin.Context)
func (*UserAIConfigHandler) RegisterRoutes ¶
func (h *UserAIConfigHandler) RegisterRoutes(router *gin.RouterGroup)
func (*UserAIConfigHandler) TestConfig ¶
func (h *UserAIConfigHandler) TestConfig(c *gin.Context)
func (*UserAIConfigHandler) UpdateConfig ¶
func (h *UserAIConfigHandler) UpdateConfig(c *gin.Context)
type UserHandler ¶
type UserHandler struct {
// contains filtered or unexported fields
}
func NewUserHandler ¶
func NewUserHandler(userService *service.UserService, convService *service.ConversationService) *UserHandler
func (*UserHandler) GetCurrentUser ¶
func (h *UserHandler) GetCurrentUser(c *gin.Context)
func (*UserHandler) SearchUsers ¶
func (h *UserHandler) SearchUsers(c *gin.Context)
func (*UserHandler) UpdateUser ¶
func (h *UserHandler) UpdateUser(c *gin.Context)
type UserManagementTool ¶
type UserManagementTool struct{}
UserManagementTool 用户管理工具
func (*UserManagementTool) Description ¶
func (t *UserManagementTool) Description() string
func (*UserManagementTool) Execute ¶
func (t *UserManagementTool) Execute(params map[string]interface{}, ctx *ai.CallerContext) (interface{}, error)
func (*UserManagementTool) Name ¶
func (t *UserManagementTool) Name() string
func (*UserManagementTool) Parameters ¶
func (t *UserManagementTool) Parameters() map[string]interface{}
type WebSocketMessageSender ¶
type WebSocketMessageSender struct {
// contains filtered or unexported fields
}
func NewWebSocketMessageSender ¶
func NewWebSocketMessageSender(hub *ws.Hub, userSvc *service.UserService) *WebSocketMessageSender
func (*WebSocketMessageSender) SendAIMessage ¶
func (s *WebSocketMessageSender) SendAIMessage(conversationID uint, content string, assistantName string) error
func (*WebSocketMessageSender) SendMessageWithContext ¶
func (*WebSocketMessageSender) SendStreamingAIMessage ¶
Source Files
¶
- admin_file_handler.go
- admin_handler.go
- admin_tools.go
- admin_vector_handler.go
- ai_bot_handler.go
- ai_handler.go
- ai_provider_handler.go
- ai_search_handler.go
- ai_summary_handler.go
- ai_text_handler.go
- ai_usage_handler.go
- alert_handler.go
- anomaly_detector.go
- app_handler.go
- auth_callback.go
- auth_handler.go
- auth_provider_handler.go
- avatar_handler.go
- blacklist_handler.go
- bot_creation_handler.go
- channel_handler.go
- chunk_handler.go
- client_log_handler.go
- conversation_handler.go
- file_handler.go
- group_document_handler.go
- group_handler.go
- knowledge_service.go
- message_handler.go
- message_sender.go
- misc_handler.go
- monitor_handler.go
- note_handler.go
- note_vector_search_handler.go
- notification_handler.go
- operation_log_handler.go
- organization_handler.go
- orgsync_handler.go
- prompt_builder.go
- realtime_handler.go
- sensitive_word_handler.go
- shortlink_handler.go
- smart_reply_handler.go
- statistics_handler.go
- system_config_handler.go
- todo_extractor.go
- update_handler.go
- user_ai_config_handler.go
- user_handler.go
- version_handler.go
- ws_handler.go