2026-04-09 10:01:23 +08:00
|
|
|
package request
|
|
|
|
|
|
2026-05-31 18:43:48 +08:00
|
|
|
import "agent-desk/internal/pkg/enums"
|
2026-04-09 10:01:23 +08:00
|
|
|
|
|
|
|
|
type AIAgentMCPToolRequest struct {
|
2026-07-27 23:29:02 +08:00
|
|
|
ToolCode string `json:"toolCode"`
|
|
|
|
|
ServerCode string `json:"serverCode"`
|
|
|
|
|
ToolName string `json:"toolName"`
|
|
|
|
|
Title string `json:"title"`
|
|
|
|
|
Description string `json:"description"`
|
|
|
|
|
RiskLevel string `json:"riskLevel"`
|
|
|
|
|
RequireConfirmation bool `json:"requireConfirmation"`
|
|
|
|
|
Arguments map[string]string `json:"arguments"`
|
2026-04-09 10:01:23 +08:00
|
|
|
}
|
|
|
|
|
|
2026-07-25 15:24:49 +08:00
|
|
|
type AIAgentWorkflowBindingRequest struct {
|
|
|
|
|
WorkflowVersionID int64 `json:"workflowVersionId"`
|
|
|
|
|
ToolName string `json:"toolName"`
|
|
|
|
|
TriggerInstruction string `json:"triggerInstruction"`
|
|
|
|
|
Priority int `json:"priority"`
|
|
|
|
|
Enabled bool `json:"enabled"`
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-09 10:01:23 +08:00
|
|
|
type CreateAIConfigRequest struct {
|
|
|
|
|
Name string `json:"name"`
|
|
|
|
|
Provider enums.AIProvider `json:"provider"`
|
|
|
|
|
BaseURL string `json:"baseUrl"`
|
|
|
|
|
APIKey string `json:"apiKey"`
|
|
|
|
|
ModelType enums.AIModelType `json:"modelType"`
|
|
|
|
|
ModelName string `json:"modelName"`
|
|
|
|
|
Dimension int `json:"dimension"`
|
|
|
|
|
MaxContextTokens int `json:"maxContextTokens"`
|
|
|
|
|
MaxOutputTokens int `json:"maxOutputTokens"`
|
|
|
|
|
TimeoutMS int `json:"timeoutMs"`
|
|
|
|
|
MaxRetryCount int `json:"maxRetryCount"`
|
|
|
|
|
RPMLimit int `json:"rpmLimit"`
|
|
|
|
|
TPMLimit int `json:"tpmLimit"`
|
|
|
|
|
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"`
|
|
|
|
|
Description string `json:"description"`
|
|
|
|
|
AIConfigID int64 `json:"aiConfigId"`
|
2026-07-25 12:04:06 +08:00
|
|
|
MaxSteps int `json:"maxSteps"`
|
|
|
|
|
ContextWindow int `json:"contextWindow"`
|
|
|
|
|
ToolPolicy string `json:"toolPolicy"`
|
|
|
|
|
KnowledgePolicy string `json:"knowledgePolicy"`
|
2026-04-09 10:01:23 +08:00
|
|
|
ServiceMode enums.IMConversationServiceMode `json:"serviceMode"`
|
|
|
|
|
SystemPrompt string `json:"systemPrompt"`
|
|
|
|
|
WelcomeMessage string `json:"welcomeMessage"`
|
|
|
|
|
ReplyTimeoutSeconds int `json:"replyTimeoutSeconds"`
|
2026-07-25 12:04:06 +08:00
|
|
|
RolloutPercent int `json:"rolloutPercent"`
|
2026-04-09 10:01:23 +08:00
|
|
|
TeamIDs []int64 `json:"teamIds"`
|
|
|
|
|
HandoffMode enums.AIAgentHandoffMode `json:"handoffMode"`
|
2026-04-18 13:36:44 +08:00
|
|
|
FallbackMode enums.AIAgentFallbackMode `json:"fallbackMode"`
|
2026-04-09 10:01:23 +08:00
|
|
|
FallbackMessage string `json:"fallbackMessage"`
|
2026-07-25 12:04:06 +08:00
|
|
|
KnowledgeBaseIDs []int64 `json:"knowledgeBaseIds"`
|
2026-04-09 10:01:23 +08:00
|
|
|
SkillIDs []int64 `json:"skillIds"`
|
2026-07-26 22:38:38 +08:00
|
|
|
MCPTools []AIAgentMCPToolRequest `json:"mcpTools"`
|
2026-07-25 15:24:49 +08:00
|
|
|
WorkflowBindings []AIAgentWorkflowBindingRequest `json:"workflowBindings"`
|
2026-04-09 10:01:23 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type UpdateAIAgentRequest struct {
|
|
|
|
|
ID int64 `json:"id"`
|
|
|
|
|
CreateAIAgentRequest
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type DeleteAIAgentRequest struct {
|
|
|
|
|
ID int64 `json:"id"`
|
|
|
|
|
}
|
|
|
|
|
|
2026-07-25 12:04:06 +08:00
|
|
|
type PublishAIAgentRequest struct {
|
|
|
|
|
ID int64 `json:"id"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type RollbackAIAgentRequest struct {
|
|
|
|
|
ID int64 `json:"id"`
|
|
|
|
|
RevisionID int64 `json:"revisionId"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type RollbackAIAgentRolloutRequest struct {
|
|
|
|
|
ID int64 `json:"id"`
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-09 10:01:23 +08:00
|
|
|
type UpdateAIAgentStatusRequest struct {
|
|
|
|
|
ID int64 `json:"id"`
|
|
|
|
|
Status int `json:"status"`
|
|
|
|
|
}
|