Files
customer-server/controller/ragflow_config_controller.go
2026-03-14 10:02:49 +08:00

32 lines
1.1 KiB
Go
Raw Permalink 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 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
}