IntelligenzaArtificiale / Free-Auto-GPT

Free Auto GPT with NO paids API is a repository that offers a simple version of Auto GPT, an autonomous AI agent capable of performing tasks independently. Unlike other versions, our implementation does not rely on any paid OpenAI API, making it accessible to anyone.
MIT License
2.44k stars 383 forks source link

No module named 'transformers.tools' ------------------------- fixed. #108

Closed sambickeita closed 1 year ago

sambickeita commented 1 year ago
**PS xxx\Free-AUTO-GPT-with-NO-API-main - Copie> python .\TransformersAgent.py Traceback (most recent call last): File "xxx\Free-AUTO-GPT-with-NO-API-main - Copie\TransformersAgent.py", line 1, in from hfAgent import agents File "xxxx\Free-AUTO-GPT-with-NO-API-main - Copie\hfAgent\agents.py", line 28, in from transformers.tools.base import TASK_MAPPING, TOOL_CONFIG_FILE, Tool, load_tool, supports_remote ModuleNotFoundError: No module named 'transformers.tools'** Can anyone know how to solve this. I already try to install transformers.tools, i have this : ERROR: Could not find a version that satisfies the requirement transformers.tools (from versions: none) ERROR: No matching distribution found for transformers.tools
IntelligenzaArtificiale commented 1 year ago

Please, when opening an Issue follow the template, it helps us to understand a lot about your problem.

Try : python3 -m pip install -U langchain should work .

IntelligenzaArtificiale commented 1 year ago

for the moment we are still working on it, you will encounter other library problems, for example you will need pythorch audio and other libraries. We recommend that you use options 5 and 6 which are new as APIs.

sambickeita commented 1 year ago

Thank you all for your efforts and the time you dedicate to this project.

PS I:\GPT\PortableGit\PROJET FONCTIONNEL\Free-AUTO-GPT-with-NO-API-main - Copie> python .\TransformersAgent.py Traceback (most recent call last): File "I:\GPT\PortableGit\PROJET FONCTIONNEL\Free-AUTO-GPT-with-NO-API-main - Copie\TransformersAgent.py", line 1, in from hfAgent import agents File "I:\GPT\PortableGit\PROJET FONCTIONNEL\Free-AUTO-GPT-with-NO-API-main - Copie\hfAgent\agents.py", line 28, in from transformers.tools.base import TASK_MAPPING, TOOL_CONFIG_FILE, Tool, load_tool, supports_remote ModuleNotFoundError: No module named 'transformers.tools'

sambickeita commented 1 year ago

line 28 is :

from transformers.tools.base import TASK_MAPPING, TOOL_CONFIG_FILE, Tool, load_tool, supports_remote


from transformers.utils import logging from transformers.tools.base import TASK_MAPPING, TOOL_CONFIG_FILE, Tool, load_tool, supports_remote from transformers.tools.prompts import CHAT_MESSAGE_PROMPT, CHAT_PROMPT_TEMPLATE, RUN_PROMPT_TEMPLATE from transformers.tools.python_interpreter import evaluate

sambickeita commented 1 year ago

I solved it.

Here is the step i did.

line 28 : in agents.py

from transformers.utils import logging from transformers import tools from transformers.tools.base import TASK_MAPPING, TOOL_CONFIG_FILE, Tool, load_tool, supports_remote from transformers.tools.prompts import CHAT_MESSAGE_PROMPT, CHAT_PROMPT_TEMPLATE, RUN_PROMPT_TEMPLATE from transformers.tools.python_interpreter import evaluate

after

PS I:\GPT\PortableGit\PROJET FONCTIONNEL\Free-AUTO-GPT-with-NO-API-main - Copie\hfAgent> python .\agents.py
Traceback (most recent call last): File "I:\GPT\PortableGit\PROJET FONCTIONNEL\Free-AUTO-GPT-with-NO-API-main - Copie\hfAgent\agents.py", line 28, in from transformers import tools ImportError: cannot import name 'tools' from 'transformers' (I:\programmes\python\Lib\site-packages\transformers__init__.py) PS I:\GPT\PortableGit\PROJET FONCTIONNEL\Free-AUTO-GPT-with-NO-API-main - Copie\hfAgent> pip install transformers --upgrade Requirement already satisfied: transformers in i:\programmes\python\lib\site-packages (4.25.1) Collecting transformers Using cached transformers-4.29.1-py3-none-any.whl (7.1 MB) Requirement already satisfied: filelock in c:\users\msi\appdata\roaming\python\python311\site-packages (from transformers) (3.8.0) Requirement already satisfied: pyyaml>=5.1 in i:\programmes\python\lib\site-packages (from transformers) (6.0) Requirement already satisfied: regex!=2019.12.17 in i:\programmes\python\lib\site-packages (from transformers) (2023.3.23) Requirement already satisfied: requests in i:\programmes\python\lib\site-packages (from transformers) (2.28.2) Requirement already satisfied: tokenizers!=0.11.3,<0.14,>=0.11.1 in i:\programmes\python\lib\site-packages (from transformers) (0.13.3) Requirement already satisfied: tqdm>=4.27 in i:\programmes\python\lib\site-packages (from transformers) (4.64.1) Requirement already satisfied: fsspec in i:\programmes\python\lib\site-packages (from huggingface-hub<1.0,>=0.14.1->transformers) (2023.4.0) Requirement already satisfied: typing-extensions>=3.7.4.3 in i:\programmes\python\lib\site-packages (from huggingface-hub<1.0,>=0.14.1->transformers) (4.5.0)
Requirement already satisfied: colorama in i:\programmes\python\lib\site-packages (from tqdm>=4.27->transformers) (0.4.6) Requirement already satisfied: charset-normalizer<4,>=2 in i:\programmes\python\lib\site-packages (from requests->transformers) (2.1.1) Requirement already satisfied: idna<4,>=2.5 in i:\programmes\python\lib\site-packages (from requests->transformers) (3.4) Requirement already satisfied: urllib3<1.27,>=1.21.1 in i:\programmes\python\lib\site-packages (from requests->transformers) (1.26.13) Requirement already satisfied: certifi>=2017.4.17 in i:\programmes\python\lib\site-packages (from requests->transformers) (2022.12.7) Installing collected packages: transformers Attempting uninstall: transformers Found existing installation: transformers 4.25.1 Uninstalling transformers-4.25.1: Successfully uninstalled transformers-4.25.1 ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. lmql 0.0.6.1 requires transformers==4.25.1, but you have transformers 4.29.1 which is incompatible. Successfully installed transformers-4.29.1 PS I:\GPT\PortableGit\PROJET FONCTIONNEL\Free-AUTO-GPT-with-NO-API-main - Copie\hfAgent> python .\agents.py PS I:\GPT\PortableGit\PROJET FONCTIONNEL\Free-AUTO-GPT-with-NO-API-main - Copie\hfAgent> cd .. PS I:\GPT\PortableGit\PROJET FONCTIONNEL\Free-AUTO-GPT-with-NO-API-main - Copie> python .\TransformersAgent.py
Select the model you want to use (1, 2, 3, 4, 5, 6) 1) ChatGPT 2) HuggingChat (NOT GOOD RESULT) 3) BingChat (NOT GOOD RESULT) 4) BardChat 5) StarCoder 6) OpenAssistant