Skip to content

Commit

Permalink
added AgentStreamMessage to report
Browse files Browse the repository at this point in the history
  • Loading branch information
mcavdar committed Oct 31, 2024
1 parent 167a47d commit 84ebce4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/jupyter-ai/jupyter_ai/chat_handlers/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from datetime import datetime
from typing import List

from jupyter_ai.models import AgentChatMessage, HumanChatMessage
from jupyter_ai.models import AgentChatMessage, AgentStreamMessage, HumanChatMessage

from .base import BaseChatHandler, SlashCommandRoutingType

Expand All @@ -22,7 +22,7 @@ def __init__(self, *args, **kwargs):
self.parser.add_argument("path", nargs=argparse.REMAINDER)

def chat_message_to_markdown(self, message):
if isinstance(message, AgentChatMessage):
if isinstance(message, (AgentChatMessage, AgentStreamMessage)):
agent = self.config_manager.persona.name
return f"**{agent}**: {message.body}"
elif isinstance(message, HumanChatMessage):
Expand Down

0 comments on commit 84ebce4

Please sign in to comment.