Skip to content

Commit 58f0d2c

Browse files
fix: add missing flag reset in async achat method for consistent display behavior
- Added _final_display_shown = False reset in achat() method to match chat() method - Ensures proper display flag management for both sync and async agent interactions - Maintains consistency across all agent conversation entry points 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Mervin Praison <MervinPraison@users.noreply.github.com>
1 parent 1ae6748 commit 58f0d2c

File tree

1 file changed

+3
-0
lines changed
  • src/praisonai-agents/praisonaiagents/agent

1 file changed

+3
-0
lines changed

src/praisonai-agents/praisonaiagents/agent/agent.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1545,6 +1545,9 @@ def clean_json_output(self, output: str) -> str:
15451545

15461546
async def achat(self, prompt: str, temperature=0.2, tools=None, output_json=None, output_pydantic=None, reasoning_steps=False):
15471547
"""Async version of chat method with self-reflection support."""
1548+
# Reset the final display flag for each new conversation
1549+
self._final_display_shown = False
1550+
15481551
# Log all parameter values when in debug mode
15491552
if logging.getLogger().getEffectiveLevel() == logging.DEBUG:
15501553
param_info = {

0 commit comments

Comments
 (0)