Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/askui/models/shared/conversation.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,18 +371,18 @@ def _add_message(self, message: MessageParam) -> None:
Args:
message: Message to add
"""
# Report to reporter
self._reporter.add_message(
self.current_speaker.name, message.model_dump(mode="json")
)

if not self._truncation_strategy:
logger.error("No truncation strategy, cannot add message")
return

# Add to truncation strategy
self._truncation_strategy.append_message(message)

# Report to reporter
self._reporter.add_message(
self.current_speaker.name, message.model_dump(mode="json")
)

@tracer.start_as_current_span("_handle_continue_conversation")
def _handle_continue_conversation(self, result: SpeakerResult) -> bool:
"""Handle speaker result status and determine if loop should continue.
Expand Down
Loading