fix: 拆分系统判断与问题分类判断
This commit is contained in:
parent
c9c9bca9ce
commit
cfeaa6e201
|
|
@ -292,7 +292,7 @@ func (d *DingTalkBotBiz) resolveSystemAndIssueType(ctx context.Context, requireD
|
|||
return nil, err
|
||||
}
|
||||
// 问题类型
|
||||
classificationIssueType, err := d.handle.ClassifyIssueType(ctx, issueTypeNames, requireData.Req.Text.Content, userHist)
|
||||
classificationIssueType, err := d.handle.ClassifyIssueType(ctx, issueTypeNames, sysNames, requireData.Req.Text.Content, userHist)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -188,7 +188,7 @@ func (r *Handle) ClassifyIssueSystem(ctx context.Context, systems []string, user
|
|||
}
|
||||
|
||||
// ClassifyIssueType 问题分类分析
|
||||
func (r *Handle) ClassifyIssueType(ctx context.Context, issueTypes []string, userInput string, userHist []model.AiBotChatHi) (*IssueClassification, error) {
|
||||
func (r *Handle) ClassifyIssueType(ctx context.Context, issueTypes []string, systems []string, userInput string, userHist []model.AiBotChatHi) (*IssueClassification, error) {
|
||||
systemPrompt := fmt.Sprintf(`## 角色
|
||||
你是一个业务问题类型分析专家。你的任务是基于多轮对话识别用户讨论的**问题类型(issue_type_name)**,问题类型必须严格来自可用问题类型列表 [%s]。
|
||||
|
||||
|
|
@ -213,13 +213,14 @@ func (r *Handle) ClassifyIssueType(ctx context.Context, issueTypes []string, use
|
|||
|
||||
## 背景数据
|
||||
可用问题类型列表:[%s]
|
||||
系统名称列表参考:[%s]
|
||||
|
||||
## 输出格式
|
||||
{
|
||||
"issue_type_name": "问题类型名称",
|
||||
"summary": "15字内问题标题",
|
||||
"reason": "说明问题类型是基于哪句话判断,或说明继承自历史,继承自哪条历史"
|
||||
}`, strings.Join(issueTypes, ", "), strings.Join(issueTypes, ", "))
|
||||
}`, strings.Join(issueTypes, ", "), strings.Join(issueTypes, ", "), strings.Join(systems, ", "))
|
||||
|
||||
historyStr := strings.Builder{}
|
||||
historyStr.WriteString("### 历史对话:\n")
|
||||
|
|
|
|||
Loading…
Reference in New Issue