Files
customer-server/model/dto/ragflow_config_dto.go

42 lines
1.8 KiB
Go
Raw Normal View History

2026-03-14 10:02:49 +08:00
package dto
import "github.com/gogf/gf/v2/frame/g"
// GetRAGFlowConfigReq 获取RAGFlow配置请求
type GetRAGFlowConfigReq struct {
g.Meta `path:"/get" method:"get" tags:"RAGFlow配置" summary:"获取RAGFlow配置"`
AccountName string `json:"accountName" v:"required" dc:"客服账号名称"`
}
// GetRAGFlowConfigRes 获取RAGFlow配置响应
type GetRAGFlowConfigRes struct {
AccountName string `json:"accountName"`
Platform string `json:"platform"`
DatasetId string `json:"datasetId"`
DatasetName string `json:"datasetName"`
ChatId string `json:"chatId"`
Prompt string `json:"prompt"`
DocumentIds []string `json:"documentIds"`
SimilarityThreshold float64 `json:"similarityThreshold"`
KeywordsSimilarityWeight float64 `json:"keywordsSimilarityWeight"`
TopN int `json:"topN"`
EmptyResponse string `json:"emptyResponse"`
}
// UpdatePromptReq 更新提示词请求
type UpdatePromptReq struct {
g.Meta `path:"/updatePrompt" method:"post" tags:"RAGFlow配置" summary:"更新提示词"`
AccountName string `json:"accountName" v:"required" dc:"客服账号名称"`
Prompt string `json:"prompt" v:"required" dc:"提示词内容"`
SimilarityThreshold *float64 `json:"similarityThreshold" dc:"相似度阈值"`
KeywordsSimilarityWeight *float64 `json:"keywordsSimilarityWeight" dc:"关键词权重"`
TopN *int `json:"topN" dc:"返回chunk数量"`
EmptyResponse *string `json:"emptyResponse" dc:"无匹配时回复"`
}
// UpdatePromptRes 更新提示词响应
type UpdatePromptRes struct {
Success bool `json:"success"`
Message string `json:"message"`
}