let 'Generate' take user's input as parameter (#3086)

### What problem does this PR solve?

#3085

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
Kevin Hu
2024-10-29 17:58:47 +08:00
committed by GitHub
parent 3ed096fd3f
commit f7705d6bc9
2 changed files with 4 additions and 1 deletions

View File

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