🐛 fix(chat_manager.py): change filter parameter name to filter_messages for clarity
The filter parameter name was ambiguous and could be interpreted in different ways. Renaming it to filter_messages makes it clear that it is used to filter chat messages.
This commit is contained in:
parent
e0364833a9
commit
41670bc43f
1 changed files with 4 additions and 2 deletions
|
|
@ -54,7 +54,9 @@ class ChatManager:
|
||||||
"""Send the last chat message to the client."""
|
"""Send the last chat message to the client."""
|
||||||
client_id = self.cache_manager.current_client_id
|
client_id = self.cache_manager.current_client_id
|
||||||
if client_id in self.active_connections:
|
if client_id in self.active_connections:
|
||||||
chat_response = self.chat_history.get_history(client_id, filter=False)[-1]
|
chat_response = self.chat_history.get_history(
|
||||||
|
client_id, filter_messages=False
|
||||||
|
)[-1]
|
||||||
if chat_response.is_bot:
|
if chat_response.is_bot:
|
||||||
# Process FileResponse
|
# Process FileResponse
|
||||||
if isinstance(chat_response, FileResponse):
|
if isinstance(chat_response, FileResponse):
|
||||||
|
|
@ -128,7 +130,7 @@ class ChatManager:
|
||||||
raise e
|
raise e
|
||||||
# Send a response back to the frontend, if needed
|
# Send a response back to the frontend, if needed
|
||||||
intermediate_steps = intermediate_steps or ""
|
intermediate_steps = intermediate_steps or ""
|
||||||
history = self.chat_history.get_history(client_id, filter=False)
|
history = self.chat_history.get_history(client_id, filter_messages=False)
|
||||||
file_responses = []
|
file_responses = []
|
||||||
if history:
|
if history:
|
||||||
# Iterate backwards through the history
|
# Iterate backwards through the history
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue