refactor(chat_manager.py): remove redundant or condition in line 129
feat(chat_manager.py): add strip() method to intermediate_steps to remove leading/trailing whitespaces
This commit is contained in:
parent
57826f1248
commit
42a17e3aaf
1 changed files with 2 additions and 1 deletions
|
|
@ -126,9 +126,10 @@ class ChatManager:
|
|||
logger.exception(e)
|
||||
raise e
|
||||
# Send a response back to the frontend, if needed
|
||||
intermediate_steps = intermediate_steps or ""
|
||||
response = ChatResponse(
|
||||
message=result or "",
|
||||
intermediate_steps=intermediate_steps or "",
|
||||
intermediate_steps=intermediate_steps.strip(),
|
||||
type="end",
|
||||
)
|
||||
self.chat_history.add_message(client_id, response)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue