machinelearningZH / simply-simplify-language

Use machine learning to make your institutional communication more understandable and inclusive.
MIT License
40 stars 6 forks source link

ModuleNotFoundError: No module named 'mistralai.models.chat_completion' #8

Closed Neluser closed 3 months ago

Neluser commented 3 months ago

Hello, I'm a newbie so I may be doing something wrong.

I get this error when I run the script “streamlit run sprache-vereinfachen.py”

I have tried reinstalling, changing the version of the mistralai module. But unfortunately I get this problem every time.

The GPTo version runs without problems. “streamlit run sprache-vereinfachen_openai.py”


Hallo, ich bin ein Neuling, so kann ich etwas falsch machen.

Ich bekomme diesen Fehler, wenn ich das Skript „streamlit run sprache-vereinfachen.py“ ausführe.

Ich habe versucht, neu zu installieren und die Version des Mistralai-Moduls zu ändern. Aber leider bekomme ich dieses Problem jedes Mal.

Die GPTo-Version läuft ohne Probleme. „streamlit run sprache-vereinfachen_openai.py“


System- Debian 12 (Proxmox VM)

ModuleNotFoundError: No module named 'mistralai.models.chat_completion' Traceback: File "/root/miniconda3/envs/simplify/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/exec_code.py", line 85, in exec_func_with_error_handling result = func() File "/root/miniconda3/envs/simplify/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 576, in code_to_exec exec(code, module.dict) File "/root/simply-simplify-language/_streamlit_app/sprache-vereinfachen.py", line 36, in from mistralai.models.chat_completion import ChatMessage

rnckp commented 3 months ago

Good catch. Mistral changed their Python client. I have to adapt the code. Let me look into that.

Neluser commented 3 months ago

Thank you so much for such a quick response. Trying to fix it on my own has led me to complete failure. (I attach a screenshot of the browser error) image

rnckp commented 3 months ago

No worries. I am on it. Should just take a couple of minutes.

rnckp commented 3 months ago

I just committed the fix. Can you pull the changes and try again?

Neluser commented 3 months ago

Thank you very much. Yeah, I'll try that now.

Neluser commented 3 months ago

It's working now! Thank you. The problem can be closed. Have a good weekend.)

rnckp commented 3 months ago

Great! And you're welcome. Thank you for raising this issue. 👍

Have a great weekend too!