Revert the chat history for rewrite. (#4579)

### What problem does this PR solve?


### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Kevin Hu
2025-01-22 16:55:11 +08:00
committed by GitHub
parent 4b82275ae5
commit cbc3c5297e
4 changed files with 5 additions and 5 deletions

View File

@ -84,7 +84,7 @@ class RewriteQuestion(Generate, ABC):
component_name = "RewriteQuestion"
def _run(self, history, **kwargs):
hist = self._canvas.get_history(4)
hist = self._canvas.get_history(self._param.message_history_window_size)
conv = []
for m in hist:
if m["role"] not in ["user", "assistant"]: