2026-07-25 12:04:06 +08:00
|
|
|
package response
|
|
|
|
|
|
2026-08-21 00:41:07 +08:00
|
|
|
import "code.tczkiot.com/wlw/ai-agent/internal/pkg/enums"
|
2026-07-25 12:04:06 +08:00
|
|
|
|
|
|
|
|
type AgentRunResponse struct {
|
|
|
|
|
ID int64 `json:"id"`
|
2026-08-28 22:23:13 +08:00
|
|
|
ConversationID int64 `json:"conversation_id"`
|
|
|
|
|
AIAgentID int64 `json:"ai_agent_id"`
|
|
|
|
|
AgentRevisionID int64 `json:"agent_revision_id"`
|
|
|
|
|
SourceMessageID int64 `json:"source_message_id"`
|
2026-07-25 12:04:06 +08:00
|
|
|
Status string `json:"status"`
|
2026-08-28 22:23:13 +08:00
|
|
|
PromptTokens int `json:"prompt_tokens"`
|
|
|
|
|
CompletionTokens int `json:"completion_tokens"`
|
|
|
|
|
StartedAt string `json:"started_at"`
|
|
|
|
|
EndedAt string `json:"ended_at"`
|
|
|
|
|
DurationMS int64 `json:"duration_ms"`
|
|
|
|
|
ErrorMessage string `json:"error_message"`
|
|
|
|
|
TraceData string `json:"trace_data"`
|
|
|
|
|
CreatedAt string `json:"created_at"`
|
|
|
|
|
UpdatedAt string `json:"updated_at"`
|
2026-07-25 12:04:06 +08:00
|
|
|
Steps []AgentStepResponse `json:"steps,omitempty"`
|
2026-08-28 22:23:13 +08:00
|
|
|
ToolCalls []AgentToolCallResponse `json:"tool_calls,omitempty"`
|
|
|
|
|
QualityFeedback *AgentRunQualityFeedbackResponse `json:"quality_feedback,omitempty"`
|
2026-07-25 12:04:06 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type AgentRunQualityFeedbackResponse struct {
|
|
|
|
|
ID int64 `json:"id"`
|
2026-08-28 22:23:13 +08:00
|
|
|
AgentRunID int64 `json:"agent_run_id"`
|
|
|
|
|
ResolutionStatus enums.AgentRunResolutionStatus `json:"resolution_status"`
|
|
|
|
|
EvidenceStatus enums.AgentRunEvidenceStatus `json:"evidence_status"`
|
2026-07-25 12:04:06 +08:00
|
|
|
Comment string `json:"comment"`
|
2026-08-28 22:23:13 +08:00
|
|
|
UpdateUserName string `json:"update_user_name"`
|
|
|
|
|
UpdatedAt string `json:"updated_at"`
|
2026-07-25 12:04:06 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type AgentStepResponse struct {
|
|
|
|
|
ID int64 `json:"id"`
|
2026-08-28 22:23:13 +08:00
|
|
|
AgentRunID int64 `json:"agent_run_id"`
|
|
|
|
|
StepType string `json:"step_type"`
|
|
|
|
|
StepCode string `json:"step_code"`
|
2026-07-25 12:04:06 +08:00
|
|
|
Status string `json:"status"`
|
2026-08-28 22:23:13 +08:00
|
|
|
InputPreview string `json:"input_preview"`
|
|
|
|
|
OutputPreview string `json:"output_preview"`
|
|
|
|
|
ErrorMessage string `json:"error_message"`
|
|
|
|
|
StartedAt string `json:"started_at"`
|
|
|
|
|
EndedAt string `json:"ended_at"`
|
|
|
|
|
DurationMS int `json:"duration_ms"`
|
2026-07-25 12:04:06 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type AgentToolCallResponse struct {
|
|
|
|
|
ID int64 `json:"id"`
|
2026-08-28 22:23:13 +08:00
|
|
|
AgentRunID int64 `json:"agent_run_id"`
|
|
|
|
|
AgentStepID int64 `json:"agent_step_id"`
|
|
|
|
|
ToolCode string `json:"tool_code"`
|
|
|
|
|
RiskLevel string `json:"risk_level"`
|
|
|
|
|
RequireConfirm bool `json:"require_confirm"`
|
2026-07-25 12:04:06 +08:00
|
|
|
Status string `json:"status"`
|
2026-08-28 22:23:13 +08:00
|
|
|
ArgumentsPreview string `json:"arguments_preview"`
|
|
|
|
|
ResultPreview string `json:"result_preview"`
|
|
|
|
|
ErrorMessage string `json:"error_message"`
|
|
|
|
|
DurationMS int `json:"duration_ms"`
|
|
|
|
|
CreatedAt string `json:"created_at"`
|
2026-07-25 12:04:06 +08:00
|
|
|
}
|