Open 912-Cireap-Bogdan opened 5 months ago
I think it's the same as https://github.com/acon96/home-llm/issues/140
So I haven't used this part of the component but based on the code here: https://github.com/acon96/home-llm/blob/90c0edc0907e4567eeca89a6f89b43c0b0b807eb/custom_components/llama_conversation/utils.py#L141
When you add the integration to home-assistant through the UI and select llama.cpp, it verifies (via a Home-Assistant utility) that llama-cpp-python
version 0.2.88 is installed. If it is not, then it attempts to install it. First it examines your system's architecture (is it an arm64, amd64 or x86) and CPU capabilities if its amd64 or x86:
if " avx512f " in cpu_features and " avx512bw " in cpu_features:
instruction_extensions_suffix = "-avx512"
elif " avx2 " in cpu_features and \
" avx " in cpu_features and \
" f16c " in cpu_features and \
" fma " in cpu_features and \
(" sse3 " in cpu_features or " ssse3 " in cpu_features):
instruction_extensions_suffix = ""
It will default to noavx
if there's any issues determining the CPU features.
Then it will look for a suitable whl
file inside the config/custom_components/llama_conversation
directory that meets your architecture and CPU features.
If a file is already found, it will attempt to install it using the home-assistant utility install_package
.
If it is not found locally, it will attempt to retrieve the whl
from the releases section of this repository: https://github.com/acon96/home-llm/releases
and install it via python3 -m pip3 install $url
(Another built-in home-assistant utility).
Finally it attempts to import the llama-cpp-python
package, if it can't - then you get the error message you have posted.
Considering the first error you posted states "requests has no attribute Response" and you appear to be using Nabu remote UI - I'm wondering if it's trying to install the wheel locally or remotely....
So, to debug this issue:
Describe the bug
Installation from HACS worked fine, however when initializing the integration I get a "Failed to set up" error in HA UI
Expected behavior
Integration would install properly and configure properly with the basic default settings
Logs
If applicable, please upload any error or debug logs output by Home Assistant.
Thanks in advance!