Closed usaraj closed 1 day ago
python ollama module is updated and it broke things. Will update the fix tomorrow. Thanks for trying it out.
ollama Python package was updated from 0.3.3 to 0.4.2 which changed how model information is returned from the API. The old code tried to access models using dict syntax model["name"] but the new version returns Model objects that need to be accessed using model.model attribute. Now a pinned version of requirements_pinned.txt
is supplied with
the versions of the modules known to work
Cloned your repo and followed the instructions
Virtual environment: Python 3.12 on ubuntu 20
Ollama running on port 11434 and is operational with various
Ran Streamlit in server mode
When calling your frontend ui, it is resulting in error: Here is the traceback: File "/home/mgptvenv/lib/python3.12/site-packages/streamlit/runtime/scriptrunner/exec_code.py", line 88, in exec_func_with_error_handling result = func() ^^^^^^ File "/home/mgptvenv/lib/python3.12/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 579, in code_to_exec exec(code, module.dict) File "/home/m_privategpt/assistant/assistant_ui.py", line 325, in
doit()
File "/home/m_privategpt/assistant/assistant_ui.py", line 142, in doit
all_models = [model["name"] for model in ollama_client.list()["models"]]
Your help in resolving this, will be greatly appreciated. Thanks