Kevin Hu
commited on
Commit
·
8848b25
1
Parent(s):
1f36a03
fix categorize error (#2348)
Browse files### What problem does this PR solve?
### Type of change
- [x] Bug Fix (non-breaking change which fixes an issue)
- agent/canvas.py +1 -1
- agent/component/categorize.py +1 -1
agent/canvas.py
CHANGED
@@ -299,7 +299,7 @@ class Canvas(ABC):
|
|
299 |
pat = " => ".join([p.split(":")[0] for p in path[0:l]])
|
300 |
return pat + " => " + pat
|
301 |
|
302 |
-
return
|
303 |
|
304 |
def get_prologue(self):
|
305 |
return self.components["begin"]["obj"]._param.prologue
|
|
|
299 |
pat = " => ".join([p.split(":")[0] for p in path[0:l]])
|
300 |
return pat + " => " + pat
|
301 |
|
302 |
+
return False
|
303 |
|
304 |
def get_prologue(self):
|
305 |
return self.components["begin"]["obj"]._param.prologue
|
agent/component/categorize.py
CHANGED
@@ -82,6 +82,6 @@ class Categorize(Generate, ABC):
|
|
82 |
if ans.lower().find(c.lower()) >= 0:
|
83 |
return Categorize.be_output(self._param.category_description[c]["to"])
|
84 |
|
85 |
-
return Categorize.be_output(self._param.category_description.items()[-1][1]["to"])
|
86 |
|
87 |
|
|
|
82 |
if ans.lower().find(c.lower()) >= 0:
|
83 |
return Categorize.be_output(self._param.category_description[c]["to"])
|
84 |
|
85 |
+
return Categorize.be_output(list(self._param.category_description.items())[-1][1]["to"])
|
86 |
|
87 |
|