mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
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:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user