Skip to content

Commit

Permalink
Remove redundant param of rewrite component.
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinHuSh committed Jan 9, 2025
1 parent b6c71c1 commit 811655f
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions agent/component/rewrite.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ def __init__(self):
super().__init__()
self.temperature = 0.9
self.prompt = ""
self.loop = 1

def check(self):
super().check()
Expand Down Expand Up @@ -85,13 +84,6 @@ class RewriteQuestion(Generate, ABC):
component_name = "RewriteQuestion"

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)
conv = []
for m in hist:
Expand Down

0 comments on commit 811655f

Please sign in to comment.