浏览代码

fix component rewrite bug (#2549)

### What problem does this PR solve?

#2545

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
tags/v0.12.0
Kevin Hu 1年前
父节点
当前提交
100c60017f
没有帐户链接到提交者的电子邮件
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2
    0
      agent/component/rewrite.py

+ 2
- 0
agent/component/rewrite.py 查看文件

@@ -65,6 +65,8 @@ class RewriteQuestion(Generate, ABC):
chat_mdl = LLMBundle(self._canvas.get_tenant_id(), LLMType.CHAT, self._param.llm_id)
ans = chat_mdl.chat(self._param.get_prompt(), [{"role": "user", "content": q}],
self._param.gen_conf())
self._canvas.history.pop()
self._canvas.history.append(("user", ans))

print(ans, ":::::::::::::::::::::::::::::::::")
return RewriteQuestion.be_output(ans)

正在加载...
取消
保存