Create html prompt with streamlit

Well, I’m guessing by the lack of updated response that what I’m asking for is not possible with this library. I’ve been beating my head against the wall with this library for 2 days now trying to get even the most simplest of interactions to work well.

I did find the chatbot component but like even the most basic apps the UI is pretty much non usable for anything other than the most simplest of use cases.

I finally got that the lib revolves around state. Fine. I tried to roll my own chat functionality using state instead and I get “bad format” errors :man_facepalming:

This code seems to just do nothing at all:

import streamlit as st
from streamlit_chat import message

st.title("ChatGPT-like Web App")

top = st.empty()
bottom = st.empty()

def text_changed():
    input = st.session_state["input"]
    st.session_state["input"] = ""
    bottom.write(input)
    bottom.info(input)

user_input = top.text_input("You:",key='input',on_change=text_changed)

And if you change the “empty” calls to “container” you get the “bad format” bug.

Ug, I’ve wasted enough time with this lib, moving on to something else.