chainlit icon indicating copy to clipboard operation
chainlit copied to clipboard

Unicode Characters Break ChatProfile

Open CallumCM opened this issue 3 months ago • 0 comments

When I use this code for ChatProfiles and select the "Sprachprüfung" tab, it says "Could not reach the server" on the client, and spams the error ERROR: Exception in ASGI application Traceback (most recent call last): File "/home/runner/TutoringBot/.pythonlibs/lib/python3.10/site-packages/uvicorn/protocols/http/httptools_impl.py", line 426, in run_asgi [...] UnicodeDecodeError: 'utf-8' codec can't decode byte 0xfc in position 8: invalid start byte

@cl.set_chat_profiles
def chat_profile(
    user):  # We're not using Chainlit authentication at the moment
  return [
      cl.ChatProfile(
          name=get_language_entry('webapp_conversation_essay_writing',
                                  LANGUAGE),
          markdown_description="Chatte über den Aufsatz 📝",
          icon=None,
      ),
      cl.ChatProfile(
          name=get_language_entry('webapp_text_comprehension', LANGUAGE),
          markdown_description="Chatte über die Sprachprüfung 📚",
          icon=None,
      ),
      cl.ChatProfile(
          name=get_language_entry('webapp_conversation_math', LANGUAGE),
          markdown_description="Chatte über die Matheprüfung 🧮",
          icon=None,
      ),
  ]

CallumCM avatar Mar 23 '24 16:03 CallumCM