From 4e4179b1323e64efa182a4bdcc53b3ca1fbc7588 Mon Sep 17 00:00:00 2001 From: aserrador Date: Mon, 16 Feb 2026 10:44:34 -0500 Subject: [PATCH] chore: Implemented markdown format in UI response --- src/ui/src/ui/app.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ui/src/ui/app.py b/src/ui/src/ui/app.py index 279de0f..28798aa 100644 --- a/src/ui/src/ui/app.py +++ b/src/ui/src/ui/app.py @@ -14,6 +14,7 @@ def response_generator(response: str = ""): time.sleep(0.05) async def main(): + st.image("src/ui/assets/logo-naliia.png", width=100, caption="NaliiaBot") if "messages" not in st.session_state: @@ -31,10 +32,10 @@ async def main(): agent_client = AgentClient() response = await agent_client.send_message(prompt) - formated_response = response.json()['response']['messages'][-1]['content'] + raw_response = response.json()['response']['messages'][-1]['content'] with st.chat_message("assistant"): - response = st.write_stream(response_generator(formated_response)) + formated_response = st.markdown(raw_response) st.session_state.messages.append({"role": "assistant", "content": formated_response}) if __name__ == "__main__": import asyncio; asyncio.run(main())