浏览代码

Remove redundant param of rewrite component. (#4422)

### What problem does this PR solve?

### Type of change

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

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

super().__init__() super().__init__()
self.temperature = 0.9 self.temperature = 0.9
self.prompt = "" self.prompt = ""
self.loop = 1


def check(self): def check(self):
super().check() super().check()
component_name = "RewriteQuestion" component_name = "RewriteQuestion"


def _run(self, history, **kwargs): def _run(self, history, **kwargs):
if not hasattr(self, "_loop"):
setattr(self, "_loop", 0)
if self._loop >= self._param.loop:
self._loop = 0
raise Exception("Sorry! Nothing relevant found.")
self._loop += 1

hist = self._canvas.get_history(4) hist = self._canvas.get_history(4)
conv = [] conv = []
for m in hist: for m in hist:

正在加载...
取消
保存