Files
customer-server/model/dto/ragflow_sync_dto.go
2026-03-14 10:02:49 +08:00

30 lines
1.4 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// Package dto - RAGFlow同步相关DTO
// 功能定义RAGFlow同步、重试消息的请求响应结构体
package dto
// SyncToRAGFlowReq 同步到RAGFlow请求
type SyncToRAGFlowReq struct {
SpeechcraftIds []string `json:"speechcraftIds" v:"required#话术ID列表不能为空"` // 话术ID列表
ProductIds []string `json:"productIds"` // 产品ID列表可选
ForceSync bool `json:"forceSync"` // 是否强制重新同步(已同步的也重新上传)
}
// SyncToRAGFlowRes 同步到RAGFlow响应
type SyncToRAGFlowRes struct {
TotalCount int `json:"totalCount"` // 总数
SuccessCount int `json:"successCount"` // 成功数量
FailedCount int `json:"failedCount"` // 失败数量
FailedIds []string `json:"failedIds"` // 失败的ID列表
Message string `json:"message"` // 提示信息
}
// RAGFlowSyncRetryMsg RAGFlow同步重试消息RabbitMQ
// 说明租户级知识库dataset_id从租户配置中获取
type RAGFlowSyncRetryMsg struct {
Type string `json:"type"` // speechcraft or product
Id string `json:"id"` // 话术/产品ID
AccountName string `json:"accountName"` // 客服账号名称
TenantId string `json:"tenantId"` // 租户ID用于查询知识库
RetryCount int `json:"retryCount"` // 当前重试次数
}