Summary
st.chat_input shows awkward behavior with korean input, especially when the last character of input is korean.
Steps to reproduce
Code snippet:
import streamlit as st
prompt = st.chat_input("Say something")
if prompt:
st.write(f"User has sent the following prompt: {prompt}")
Input the Korean in the chat input box. (e.g., μλ νμΈμ)
You can use here to reproduce the bug.
Expected behavior:
The following should be printed on the page.
User has sent the following prompt: μλ νμΈμ
Actual behavior:
Only the last character is displayed on the page.
It means that only the last character is returned from the st.chat_input function when I input the Korean.
User has sent the following prompt: μ
I found that this error occurs only when the last character of input is Korean.
Example)
βμλ
νμΈμβ β wrong behavior
βμλ
νμΈμ.β β right behavior
βμλ
νμΈμ helloβ β right behavior
Debug info
- Streamlit version: 1.24.0
- Python version: 3.11.4
- Using Pyenv
- OS version: Linux
- Browser version: Chrome