refactor: 重构提示词构建逻辑并移除不再使用的文件处理服务
This commit is contained in:
@@ -34,7 +34,6 @@ func buildInferenceRequest(ctx context.Context, req *dto.ComposeMessagesReq, cha
|
||||
"role": "system",
|
||||
"content": promptBuild(ctx, req, model),
|
||||
})
|
||||
|
||||
// 2. 构建历史会话提示词
|
||||
for _, msg := range history {
|
||||
role := gconv.String(msg["role"])
|
||||
@@ -114,7 +114,9 @@ func (s *promptService) ComposeMessages(ctx context.Context, req *dto.ComposeMes
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
fmt.Println("构建节点前", taskRecord)
|
||||
message = s.parseNodeBuild(taskRecord)
|
||||
fmt.Println("构建节点后", message)
|
||||
default:
|
||||
epicycleId, err = dao.ComposeSession.Insert(ctx, &entity.ComposeSession{
|
||||
SessionId: req.SessionId,
|
||||
|
||||
Reference in New Issue
Block a user