Sent messages are rendered as markdown
The-Compiler opened this issue · comments
It seems simple to fix this. If you change the part of the chatbox.py file as below
...
from rich.text import Text
...
@property
def markdown(self) -> Markdown:
return Markdown(self.message.content or "")
@property
def text(self) -> Text:
return Text(self.message.content or "")
def render(self) -> RenderableType:
if self.message.type == "human":
return self.text
else:
return self.markdown
...
There are three types of messages: human, ai, and system.
I confirmed that the input was rendered as text and the output was rendered as markdown.
However, I cannot judge whether it makes sense. The code may become complicated, but it will also be possible to choose whether to render the user's input as markdown or text.
This has been fixed in 1.0.0