refine token similarity (#2824)

### What problem does this PR solve?


### Type of change

- [x] Performance Improvement
This commit is contained in:
Kevin Hu
2024-10-14 13:33:18 +08:00
committed by GitHub
parent 8e5efcc47f
commit b164116277
2 changed files with 3 additions and 6 deletions

View File

@ -262,7 +262,7 @@ class Canvas(ABC):
convs = []
for role, obj in self.history[(window_size + 1) * -1:]:
convs.append({"role": role, "content": (obj if role == "user" else
'\n'.join(pd.DataFrame(obj)['content']))})
'\n'.join([str(s) for s in pd.DataFrame(obj)['content']]))})
return convs
def add_user_input(self, question):