18c9354095
- 注入数据库、运行时配置、统一响应、文件存储和平台 AI 能力,补充业务读写工具与客户快捷操作契约。 - 移除模块内重复的组织、客户、工单、标签、技能、旧工作流、MCP 和迁移实现,将身份权限与业务主体交由宿主管理。 - 使用 libSQL 重构向量存储,并完善图片消息、访客身份、排队调度、企业微信和支持聊天页面。 - 统一 HTTP、DTO 与 WebSocket 的 snake_case 协议,补齐模块初始化、业务动作和公共载荷等回归测试。
83 lines
3.0 KiB
Go
83 lines
3.0 KiB
Go
package request
|
|
|
|
import "code.tczkiot.com/wlw/ai-agent/internal/pkg/enums"
|
|
|
|
type CreateAIConfigRequest struct {
|
|
Name string `json:"name"`
|
|
Provider enums.AIProvider `json:"provider"`
|
|
BaseURL string `json:"base_url"`
|
|
APIKey string `json:"api_key"`
|
|
ModelType enums.AIModelType `json:"model_type"`
|
|
ModelName string `json:"model_name"`
|
|
Dimension int `json:"dimension"`
|
|
MaxContextTokens int `json:"max_context_tokens"`
|
|
MaxOutputTokens int `json:"max_output_tokens"`
|
|
TimeoutMS int `json:"timeout_ms"`
|
|
MaxRetryCount int `json:"max_retry_count"`
|
|
RPMLimit int `json:"rpm_limit"`
|
|
TPMLimit int `json:"tpm_limit"`
|
|
Remark string `json:"remark"`
|
|
}
|
|
|
|
type UpdateAIConfigRequest struct {
|
|
ID int64 `json:"id"`
|
|
CreateAIConfigRequest
|
|
}
|
|
|
|
type DeleteAIConfigRequest struct {
|
|
ID int64 `json:"id"`
|
|
}
|
|
|
|
type UpdateAIConfigStatusRequest struct {
|
|
ID int64 `json:"id"`
|
|
Status enums.Status `json:"status"`
|
|
}
|
|
|
|
type CreateAIAgentRequest struct {
|
|
Name string `json:"name"`
|
|
Avatar string `json:"avatar"`
|
|
Description string `json:"description"`
|
|
AIConfigID int64 `json:"ai_config_id"`
|
|
MaxSteps int `json:"max_steps"`
|
|
ContextWindow int `json:"context_window"`
|
|
ToolPolicy string `json:"tool_policy"`
|
|
KnowledgePolicy string `json:"knowledge_policy"`
|
|
ServiceMode enums.IMConversationServiceMode `json:"service_mode"`
|
|
SystemPrompt string `json:"system_prompt"`
|
|
WelcomeMessage string `json:"welcome_message"`
|
|
ReplyTimeoutSeconds int `json:"reply_timeout_seconds"`
|
|
RolloutPercent int `json:"rollout_percent"`
|
|
TeamIDs []int64 `json:"team_ids"`
|
|
HandoffMode enums.AIAgentHandoffMode `json:"handoff_mode"`
|
|
FallbackMode enums.AIAgentFallbackMode `json:"fallback_mode"`
|
|
FallbackMessage string `json:"fallback_message"`
|
|
KnowledgeBaseIDs []int64 `json:"knowledge_base_ids"`
|
|
}
|
|
|
|
type UpdateAIAgentRequest struct {
|
|
ID int64 `json:"id"`
|
|
CreateAIAgentRequest
|
|
}
|
|
|
|
type DeleteAIAgentRequest struct {
|
|
ID int64 `json:"id"`
|
|
}
|
|
|
|
type PublishAIAgentRequest struct {
|
|
ID int64 `json:"id"`
|
|
}
|
|
|
|
type RollbackAIAgentRequest struct {
|
|
ID int64 `json:"id"`
|
|
RevisionID int64 `json:"revision_id"`
|
|
}
|
|
|
|
type RollbackAIAgentRolloutRequest struct {
|
|
ID int64 `json:"id"`
|
|
}
|
|
|
|
type UpdateAIAgentStatusRequest struct {
|
|
ID int64 `json:"id"`
|
|
Status int `json:"status"`
|
|
}
|