Skip to content

Commit

Permalink
Update message type parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
yankeexe committed Dec 18, 2024
1 parent d876cff commit 6e73abf
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ollama_manager/ui/image_chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@ def run():
st.title("🤖 Ollama Manager: Vision Chat")

for message in st.session_state["messages"]:
match message["role"]:
case "assistant":
st.chat_message("assistant").write(message["content"])
case "user":
st.chat_message("human").write(message["content"])
message_role = message["role"]
if message_role == "assistant":
st.chat_message("assistant").write(message["content"])
if message_role == "user":
st.chat_message("human").write(message["content"])

chat_input = st.chat_input(
placeholder="Write your message...",
Expand Down

0 comments on commit 6e73abf

Please sign in to comment.