humaarif155 / Geminitextbot

This is a Gemini chat bot clone made by streamlit and langchain
0 stars 1 forks source link

persian typed prompt/s is on problem #1

Open bugbounted opened 6 months ago

bugbounted commented 6 months ago

hi humaarif155, persian typed prompt/s is on problem:

test prompt : شیراز کجاست ؟

response :

google.generativeai.types.generation_types.StopCandidateException: This app has encountered an error. The original error message is redacted to prevent data leaks. Full error details have been recorded in the logs (if you're on Streamlit Cloud, click on 'Manage app' in the lower right of your app).
Traceback:
File "/home/adminuser/venv/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 535, in _run_script
    exec(code, module.__dict__)
File "/mount/src/geminitextbot/main.py", line 63, in <module>
    gemini_response = st.session_state.chat_session.send_message(user_prompt)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/adminuser/venv/lib/python3.11/site-packages/google/generativeai/generative_models.py", line 384, in send_message
    raise generation_types.StopCandidateException(response.candidates[0])

waiting for your fix commit , regards

humaarif155 commented 6 months ago

for this issue, you should always say hello first for the chatbot to start