1
This commit is contained in:
31
controller/ragflow_config_controller.go
Normal file
31
controller/ragflow_config_controller.go
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user