genia-dev / GeniA

Your Engineering Gen AI Team member 🧬🤖💻
https://genia-dev.github.io/GeniA/
Apache License 2.0
367 stars 81 forks source link

Keep getting erros when trying to run it, tried Streamline, Docker and Poetry, none worked (Windows) #16

Open pedrocacintra opened 1 year ago

pedrocacintra commented 1 year ago

Got this when trying Streamline:

" (base) PS D:\AI\GeniA> conda activate genia (genia) PS D:\AI\GeniA> genia Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "C:\ProgramData\anaconda3\envs\genia\Scripts\genia.exe__main.py", line 7, in File "C:\ProgramData\anaconda3\envs\genia\Lib\site-packages\genia\entry.py", line 13, in streamlit subprocess.run(["python3", "-m", "streamlit", "run", main]) File "C:\ProgramData\anaconda3\envs\genia\Lib\subprocess.py", line 548, in run with Popen(*popenargs, **kwargs) as process: ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\ProgramData\anaconda3\envs\genia\Lib\subprocess.py", line 1026, in init__ self._execute_child(args, executable, preexec_fn, close_fds, File "C:\ProgramData\anaconda3\envs\genia\Lib\subprocess.py", line 1538, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [WinError 2] The system cannot find the file specified (genia) PS D:\AI\GeniA> "

Got this when trying Docker:

" (genia) PS D:\AI\GeniA>

docker run -p 5001:5001 --env-file ./.env -it geniadev/genia:latest Traceback (most recent call last): File "/app/main.py", line 7, in from genia.agents.chat import OpenAIChat File "/app/genia/agents/chat.py", line 29, in class OpenAIChat(Agent): File "/app/genia/agents/chat.py", line 43, in OpenAIChat llm_functions_repository=LLMFunctionRepository(OpenAIEmbeddings(), FAISS), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/genia/llm_function/llm_function_repository.py", line 60, in init self._init(functions_dict, tools_dict, skills_dict) File "/app/genia/llm_function/llm_function_repository.py", line 130, in _init self._init_vector_store(llm_functions_list) File "/app/genia/llm_function/llm_function_repository.py", line 146, in _init_vector_store self._vector_store = self._vector_store.from_texts( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.cache/pypoetry/virtualenvs/genia-9TtSrW0h-py3.11/lib/python3.11/site-packages/langchain/vectorstores/faiss.py", line 551, in from_texts embeddings = embedding.embed_documents(texts) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.cache/pypoetry/virtualenvs/genia-9TtSrW0h-py3.11/lib/python3.11/site-packages/langchain/embeddings/openai.py", line 452, in embed_documents return self._get_len_safe_embeddings(texts, engine=self.deployment) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.cache/pypoetry/virtualenvs/genia-9TtSrW0h-py3.11/lib/python3.11/site-packages/langchain/embeddings/openai.py", line 302, in _get_len_safe_embeddings response = embed_with_retry( ^^^^^^^^^^^^^^^^^ File "/root/.cache/pypoetry/virtualenvs/genia-9TtSrW0h-py3.11/lib/python3.11/site-packages/langchain/embeddings/openai.py", line 97, in embed_with_retry return _embed_with_retry(kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.cache/pypoetry/virtualenvs/genia-9TtSrW0h-py3.11/lib/python3.11/site-packages/tenacity/init.py", line 289, in wrapped_f return self(f, *args, *kw) ^^^^^^^^^^^^^^^^^^^^ File "/root/.cache/pypoetry/virtualenvs/genia-9TtSrW0h-py3.11/lib/python3.11/site-packages/tenacity/init.py", line 379, in call do = self.iter(retry_state=retry_state) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.cache/pypoetry/virtualenvs/genia-9TtSrW0h-py3.11/lib/python3.11/site-packages/tenacity/init.py", line 314, in iter return fut.result() ^^^^^^^^^^^^ File "/usr/local/lib/python3.11/concurrent/futures/_base.py", line 449, in result return self.get_result() ^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/concurrent/futures/_base.py", line 401, in get_result raise self._exception File "/root/.cache/pypoetry/virtualenvs/genia-9TtSrW0h-py3.11/lib/python3.11/site-packages/tenacity/init.py", line 382, in call result = fn(args, kwargs) ^^^^^^^^^^^^^^^^^^^ File "/root/.cache/pypoetry/virtualenvs/genia-9TtSrW0h-py3.11/lib/python3.11/site-packages/langchain/embeddings/openai.py", line 95, in _embed_with_retry return embeddings.client.create(*kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.cache/pypoetry/virtualenvs/genia-9TtSrW0h-py3.11/lib/python3.11/site-packages/openai/api_resources/embedding.py", line 33, in create response = super().create(args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.cache/pypoetry/virtualenvs/genia-9TtSrW0h-py3.11/lib/python3.11/site-packages/openai/api_resources/abstract/engine_apiresource.py", line 153, in create response, , api_key = requestor.request( ^^^^^^^^^^^^^^^^^^ File "/root/.cache/pypoetry/virtualenvs/genia-9TtSrW0h-py3.11/lib/python3.11/site-packages/openai/api_requestor.py", line 298, in request resp, got_stream = self._interpret_response(result, stream) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/root/.cache/pypoetry/virtualenvs/genia-9TtSrW0h-py3.11/lib/python3.11/site-packages/openai/api_requestor.py", line 700, in _interpret_response self._interpret_response_line( File "/root/.cache/pypoetry/virtualenvs/genia-9TtSrW0h-py3.11/lib/python3.11/site-packages/openai/api_requestor.py", line 763, in _interpret_response_line raise self.handle_error_response( openai.error.InvalidRequestError: Invalid URL (POST /engines/text-embedding-ada-002/embeddings) "

Got this when trying Poetry:

(yes I had the .env file containing the API key) " (base) PS D:\AI\GeniA> conda activate genia (genia) PS D:\AI\GeniA> poetry run local Warning: 'local' is an entry point defined in pyproject.toml, but it's not installed as a script. You may get improper sys.argv[0].

The support to run uninstalled scripts will be removed in a future release.

Run poetry install to resolve and get rid of this message.

Traceback (most recent call last): File "", line 1, in File "C:\ProgramData\anaconda3\envs\genia\Lib\importlib__init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 1204, in _gcd_import File "", line 1176, in _find_and_load File "", line 1147, in _find_and_load_unlocked File "", line 690, in _load_unlocked File "", line 940, in exec_module File "", line 241, in _call_with_frames_removed File "D:\AI\GeniA\genia\main.py", line 6, in from genia.agents.chat import OpenAIChat File "D:\AI\GeniA\genia\agents\chat.py", line 24, in class OpenAIChat(OpenAIToolsEmpoweredAgent): File "D:\AI\GeniA\genia\agents\chat.py", line 38, in OpenAIChat OpenAIEmbeddings( File "pydantic\main.py", line 341, in pydantic.main.BaseModel.init pydantic.error_wrappers.ValidationError: 1 validation error for OpenAIEmbeddings root__ Did not find openai_api_key, please add an environment variable OPENAI_API_KEY which contains it, or pass openai_api_key as a named parameter. (type=value_error) (genia) PS D:\AI\GeniA> "

clussier commented 1 year ago

I've gotten around the issue where poetry cannot locate the .env file by manually setting the key with: $evn:OPENAI_API_KEY =.

After doing so, I encounter this error:

Traceback (most recent call last): File "", line 1, in File "C:\Users\cluss\AppData\Local\Programs\Python\Python311\Lib\importlib__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 1204, in _gcd_import File "", line 1176, in _find_and_load File "", line 1147, in _find_and_load_unlocked File "", line 690, in _load_unlocked File "", line 940, in exec_module File "", line 241, in _call_with_frames_removed File "C:\Users\cluss\GeniA\genia\main.py", line 9, in from gunicorn.app.base import BaseApplication File "C:\Users\cluss\AppData\Local\pypoetry\Cache\virtualenvs\genia-2MH13Qxb-py3.11\Lib\site-packages\gunicorn\app\base.py", line 11, in from gunicorn import util File "C:\Users\cluss\AppData\Local\pypoetry\Cache\virtualenvs\genia-2MH13Qxb-py3.11\Lib\site-packages\gunicorn\util.py", line 8, in import fcntl ModuleNotFoundError: No module named 'fcntl'

I dont believe fcntl is compatible with Windows.

SebastianP23 commented 1 year ago

Same issue and I’m running on Mac.

AuroraIgnitionN8 commented 1 year ago

I'm getting a similar error:
pip3 install streamlit genia
Collecting streamlit Using cached streamlit-1.28.1-py2.py3-none-any.whl (8.4 MB) ERROR: Ignored the following versions that require a different python version: 0.3.0 Requires-Python >=3.11,<4.0; 0.4.0 Requires-Python >=3.11,<4.0; 0.55.2 Requires-Python <3.5 ERROR: Could not find a version that satisfies the requirement genia (from versions: none) ERROR: No matching distribution found for genia

shlomsh commented 1 year ago

Hi Nate, we will look into it next week and get back to you things are a bit hectic for us theses days

thanks, Shlomi

On Thu, Nov 9, 2023 at 9:00 PM Nate Johnson @.***> wrote:

I'm getting a similar error: pip3 install streamlit genia Collecting streamlit Using cached streamlit-1.28.1-py2.py3-none-any.whl (8.4 MB) ERROR: Ignored the following versions that require a different python version: 0.3.0 Requires-Python >=3.11,<4.0; 0.4.0 Requires-Python

=3.11,<4.0; 0.55.2 Requires-Python <3.5 ERROR: Could not find a version that satisfies the requirement genia (from versions: none) ERROR: No matching distribution found for genia

— Reply to this email directly, view it on GitHub https://github.com/genia-dev/GeniA/issues/16#issuecomment-1804416581, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD36M6J27KQ2QTDVRIQRE7TYDUR5HAVCNFSM6AAAAAA6HCF5UGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBUGQYTMNJYGE . You are receiving this because you are subscribed to this thread.Message ID: @.***>

AuroraIgnitionN8 commented 1 year ago

No worries. I can imagine things are a bit busy for you. :)

Good luck.

On Thu, Nov 9, 2023 at 11:42 AM Shlomi Shemesh @.***> wrote:

Hi Nate, we will look into it next week and get back to you things are a bit hectic for us theses days

thanks, Shlomi

On Thu, Nov 9, 2023 at 9:00 PM Nate Johnson @.***> wrote:

I'm getting a similar error: pip3 install streamlit genia Collecting streamlit Using cached streamlit-1.28.1-py2.py3-none-any.whl (8.4 MB) ERROR: Ignored the following versions that require a different python version: 0.3.0 Requires-Python >=3.11,<4.0; 0.4.0 Requires-Python

=3.11,<4.0; 0.55.2 Requires-Python <3.5 ERROR: Could not find a version that satisfies the requirement genia (from versions: none) ERROR: No matching distribution found for genia

— Reply to this email directly, view it on GitHub https://github.com/genia-dev/GeniA/issues/16#issuecomment-1804416581, or unsubscribe < https://github.com/notifications/unsubscribe-auth/AD36M6J27KQ2QTDVRIQRE7TYDUR5HAVCNFSM6AAAAAA6HCF5UGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBUGQYTMNJYGE>

. You are receiving this because you are subscribed to this thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/genia-dev/GeniA/issues/16#issuecomment-1804523055, or unsubscribe https://github.com/notifications/unsubscribe-auth/A5LOV5FF6EVODJ6KS7ZBMITYDUW4FAVCNFSM6AAAAAA6HCF5UGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBUGUZDGMBVGU . You are receiving this because you commented.Message ID: @.***>