This commit is contained in:
2026-03-14 10:02:49 +08:00
parent 03b50ef904
commit 830f75a334
75 changed files with 10677 additions and 2 deletions

View File

@@ -0,0 +1,31 @@
// Package controller - RAGFlow配置控制器
// 功能管理ragflow_config表更新对话配置提示词
package controller
import (
"context"
"customer-server/model/dto"
"customer-server/service"
)
var RAGFlowConfig = new(ragflowConfig)
type ragflowConfig struct{}
// Get 获取RAGFlow配置
// 参数: req - 查询请求,包含客服账号名
// 返回: res - RAGFlow配置信息包含提示词、参数等
// 功能: 查询指定客服账号的RAGFlow对话配置
func (c *ragflowConfig) Get(ctx context.Context, req *dto.GetRAGFlowConfigReq) (res *dto.GetRAGFlowConfigRes, err error) {
res, err = service.RAGFlowConfig.Get(ctx, req)
return
}
// UpdatePrompt 更新提示词
// 参数: req - 更新提示词请求,包含客服账号名和新提示词内容
// 返回: res - 更新结果信息
// 功能: 更新RAGFlow对话的系统提示词影响AI回复风格
func (c *ragflowConfig) UpdatePrompt(ctx context.Context, req *dto.UpdatePromptReq) (res *dto.UpdatePromptRes, err error) {
res, err = service.RAGFlowConfig.UpdatePrompt(ctx, req)
return
}