OVOSHatchery / ovos-solver-plugin-llmcpp

Apache License 2.0
7 stars 1 forks source link

Unable to import ovus_solver_llmcpp #1

Open suncloudsmoon opened 1 year ago

suncloudsmoon commented 1 year ago

Context: I'm running this on Windows 11 (including the model & this plugin)

Problem: When I try to execute the code described below, I get the following error message:

Code:

from ovos_solver_llmcpp import LLMcppSolver

ALPACA_MODEL_FILE = "C:\\Users\\ocean\\dev\\AI\\Models\\LLaMA\\Alpaca\\model #1\\ggml-alpaca-7b-q4.bin"
GPT4ALL_MODEL_FILE = "C:\\Users\\ocean\\dev\\AI\\Models\\LLaMA\\GPT4All\\gpt4all-lora-quantized.bin"

# binpath = "~/alpaca.cpp/chat"
binpath = "C:\\Users\\ocean\\dev\\AI\\Projects\\gpt4all\\chat\\gpt4all-lora-quantized-win64.exe"

bot = LLMcppSolver({"model": GPT4ALL_MODEL_FILE,
                    "executable_path": binpath})

sentence = bot.spoken_answer("Qual é o teu animal favorito?", {"lang": "pt-pt"})
# Meus animais favoritos são cães, gatos e tartarugas!

for q in ["Does god exist?",
          "what is the speed of light?",
          "what is the meaning of life?",
          "What is your favorite color?",
          "What is best in life?"]:
    a = bot.get_spoken_answer(q)
    print(q, a)

Error:

Traceback (most recent call last):
  File "C:\Users\ocean\dev\Python\Sample ChatGPT\main.py", line 1, in <module>
    from ovos_solver_llmcpp import LLMcppSolver
  File "<frozen zipimport>", line 259, in load_module
  File "C:\Users\ocean\AppData\Local\Programs\Python\Python39\lib\site-packages\ovos_solver_llmcpp_plugin-0.0.0a3-py3.9.egg\ovos_solver_llmcpp\__init__.py", line 1, in <module>
  File "C:\Users\ocean\AppData\Local\Programs\Python\Python39\lib\site-packages\neon_solvers-0.0.2a1-py3.9.egg\neon_solvers\__init__.py", line 29, in <module>
    from neon_solvers.solver import AbstractSolver
  File "C:\Users\ocean\AppData\Local\Programs\Python\Python39\lib\site-packages\neon_solvers-0.0.2a1-py3.9.egg\neon_solvers\solver.py", line 30, in <module>
    from ovos_plugin_manager.language import OVOSLangTranslationFactory
  File "C:\Users\ocean\AppData\Local\Programs\Python\Python39\lib\site-packages\ovos_plugin_manager-0.0.23a1-py3.9.egg\ovos_plugin_manager\__init__.py", line 1, in <module>
    from ovos_plugin_manager.utils import load_plugin, find_plugins, PluginTypes
  File "C:\Users\ocean\AppData\Local\Programs\Python\Python39\lib\site-packages\ovos_plugin_manager-0.0.23a1-py3.9.egg\ovos_plugin_manager\utils\__init__.py", line 16, in <module>
    from ovos_utils.log import LOG
  File "C:\Users\ocean\AppData\Local\Programs\Python\Python39\lib\site-packages\ovos_utils\__init__.py", line 25, in <module>
    from ovos_utils.network_utils import get_ip, get_external_ip, is_connected_dns, is_connected_http, is_connected
  File "C:\Users\ocean\AppData\Local\Programs\Python\Python39\lib\site-packages\ovos_utils\network_utils.py", line 7, in <module>
    from ovos_utils.process_utils import RuntimeRequirements as NetworkRequirements
  File "C:\Users\ocean\AppData\Local\Programs\Python\Python39\lib\site-packages\ovos_utils\process_utils.py", line 20, in <module>
    from signal import signal, SIGKILL, SIGINT, SIGTERM, \
ImportError: cannot import name 'SIGKILL' from 'signal' (C:\Users\ocean\AppData\Local\Programs\Python\Python39\lib\signal.py)

Process finished with exit code 1


Speculation: I believe the problems stems from the fact that most of the code in this repository is written in mind for Linux (especially the file paths).

ChanceNCounter commented 1 year ago

I strongly advise you to work with the Assistant under WSL. I’m sure we won’t ignore Windows forever, but past attempts to make various Mycroft derivatives run natively on Windows have driven a number of devs, myself included, to the brink of insanity.

(And then you end up back in WSL)