diff --git a/requirements.txt b/requirements.txt index 930b92df..0249235d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,114 +1,133 @@ -transformers -openai -langchain==0.0.240 +# transformers +# openai +# langchain==0.0.240 -torch -torchvision -asyncio +# torch +# torchvision +# asyncio -nest_asyncio -bs4 -playwright +# nest_asyncio +# bs4 +# playwright -duckduckgo-search -faiss-cpu -wget==3.2 +# duckduckgo-search +# faiss-cpu +# wget==3.2 -# codeinterpreterapi -accelerate -addict -albumentations +# # codeinterpreterapi +# accelerate +# addict +# albumentations -basicsr -controlnet-aux -diffusers==0.14.0 -langchain-experimental +# basicsr +# controlnet-aux +# diffusers==0.14.0 +# langchain-experimental -einops -imageio +# einops +# imageio -imageio-ffmpeg -kornia -numpy +# imageio-ffmpeg +# kornia +# numpy -omegaconf -open_clip_torch -opencv-python +# omegaconf +# open_clip_torch +# opencv-python -prettytable -safetensors -google-generativeai +# prettytable +# safetensors +# google-generativeai -test-tube -timm -webdataset -yapf +# test-tube +# timm +# webdataset +# yapf -httpx -ggl +# httpx +# ggl -arxiv -google-api-python-client +# arxiv +# google-api-python-client -google-auth-httplib2 -beautifulsoup4==4.11.2 -O365 +# google-auth-httplib2 +# beautifulsoup4==4.11.2 +# O365 -pytube -pydub -llama-index +# pytube +# pydub +# llama-index -fastapi==0.94.1 -pydantic==1.10.6 -tenacity==8.2.2 +# fastapi==0.94.1 +# pydantic==1.10.6 +# tenacity==8.2.2 -python-dotenv -boto3 -uvicorn==0.21.1 +# python-dotenv +# boto3 +# uvicorn==0.21.1 -python-ptrace -jinja2==3.1.2 -python-multipart==0.0.6 +# python-ptrace +# jinja2==3.1.2 +# python-multipart==0.0.6 -celery==5.3.1 -redis==4.6.0 -sentencepiece +# celery==5.3.1 +# redis==4.6.0 +# sentencepiece -bitsandbytes==0.41.0 -psycopg2-binary==2.9.5 -google-search-results==2.4.2 +# bitsandbytes==0.41.0 +# psycopg2-binary==2.9.5 +# google-search-results==2.4.2 -black==23.7.0 -Pillow -selenium +# black==23.7.0 +# Pillow +# selenium -# ONNI AGENT REQUIREMENTS -diffusers -controlnet_aux -tiktoken +# # ONNI AGENT REQUIREMENTS +# diffusers +# controlnet_aux +# tiktoken -espnet==202304 -espnet_model_zoo==0.1.7 -# flask==2.2.3 +# espnet==202304 +# espnet_model_zoo==0.1.7 +# # flask==2.2.3 -# flask_cors==3.0.10 -waitress==2.1.2 -asteroid +# # flask_cors==3.0.10 +# waitress==2.1.2 +# asteroid -speechbrain -timm -typeguard +# speechbrain +# timm +# typeguard -pytesseract -huggingface_hub +# pytesseract +# huggingface_hub -fastapi_cache -fastapi-limiter +# fastapi_cache +# fastapi-limiter -sphinx_rtd_theme -pegasusx +# sphinx_rtd_theme +# pegasusx -oceandb +# oceandb + +# simpleaichat -simpleaichat \ No newline at end of file +transformers +langchain==0.2.1 +nest_asyncio +pegasusx +google-generativeai +oceandb +langchain-experimental +playwright +duckduckgo_search +wget==3.2 +simpleaichat +httpx +ggl +beautifulsoup4 +celery +redis +google-search-results==2.4.2 +Pillow \ No newline at end of file diff --git a/swarms/__init__.py b/swarms/__init__.py index 0af73ec7..d3b413af 100644 --- a/swarms/__init__.py +++ b/swarms/__init__.py @@ -1,10 +1,11 @@ -from swarms.swarms.swarms import HierarchicalSwarm, swarm -from swarms.workers.worker_node import WorkerNodeInitializer, WorkerNode, worker_node -from swarms.boss.boss_node import BossNodeInitializer, BossNode + +#swarms + + + +# worker + + +#boss #models -from swarms.agents.models.anthropic import Anthropic -from swarms.agents.models.huggingface import HuggingFaceLLM -from swarms.agents.models.palm import GooglePalm -from swarms.agents.models.petals import Petals -from swarms.agents.models.openai import OpenAI diff --git a/swarms/agents/tools/developer.py b/swarms/agents/tools/developer.py index 2ec25e21..10c063f4 100644 --- a/swarms/agents/tools/developer.py +++ b/swarms/agents/tools/developer.py @@ -18,9 +18,9 @@ from ptrace.debugger import ( ) from ptrace.func_call import FunctionCallOptions from ptrace.syscall import PtraceSyscall -from ptrace.tools import signal_to_exitcode +from ptrace.Tools import signal_to_exitcode -from swarms.agents.tools.base import BaseToolSet, SessionGetter, ToolScope, tool +from swarms.agents.Tools.base import BaseToolSet, SessionGetter, ToolScope, Tool from swarms.utils.logger import logger from swarms.utils.main import ANSI, Color, Style # test @@ -34,7 +34,7 @@ def verify(func): try: filepath = args[0].filepath except AttributeError: - raise Exception("This tool doesn't have filepath. Please check your code.") + raise Exception("This Tool doesn't have filepath. Please check your code.") if not str(Path(filepath).resolve()).startswith(str(Path().resolve())): return "You can't access file outside of playground." return func(*args, **kwargs) @@ -201,7 +201,7 @@ class Terminal(BaseToolSet): def __init__(self): self.sessions: Dict[str, List[SyscallTracer]] = {} - @tool( + @Tool( name="Terminal", description="Executes commands in a terminal." "If linux errno occurs, we have to solve the problem with the terminal. " @@ -629,7 +629,7 @@ class CodePatcher: class CodeEditor(BaseToolSet): - @tool( + @Tool( name="CodeEditor.READ", description="Read and understand code. " "Input should be filename and line number group. ex. test.py|1-10 " @@ -647,7 +647,7 @@ class CodeEditor(BaseToolSet): ) return output - @tool( + @Tool( name="CodeEditor.SUMMARY", description="Summary code. " "Read the code structured into a tree. " @@ -667,10 +667,10 @@ class CodeEditor(BaseToolSet): ) return output - @tool( + @Tool( name="CodeEditor.APPEND", description="Append code to the existing file. " - "If the code is completed, use the Terminal tool to execute it, if not, append the code through the this tool. " + "If the code is completed, use the Terminal Tool to execute it, if not, append the code through the this Tool. " "Input should be filename and code to append. " "Input code must be the code that should be appended, NOT whole code. " "ex. test.py\nprint('hello world')\n " @@ -689,10 +689,10 @@ class CodeEditor(BaseToolSet): ) return output - @tool( + @Tool( name="CodeEditor.WRITE", - description="Write code to create a new tool. " - "If the code is completed, use the Terminal tool to execute it, if not, append the code through the CodeEditor.APPEND tool. " + description="Write code to create a new Tool. " + "If the code is completed, use the Terminal Tool to execute it, if not, append the code through the CodeEditor.APPEND Tool. " "Input should be formatted like: " "\n\n\n" "Here is an example: " @@ -712,7 +712,7 @@ class CodeEditor(BaseToolSet): ) return output - @tool( + @Tool( name="CodeEditor.PATCH", description="Patch the code to correct the error if an error occurs or to improve it. " "Input is a list of patches. The patch is separated by {seperator}. ".format( @@ -742,7 +742,7 @@ class CodeEditor(BaseToolSet): ) return output - @tool( + @Tool( name="CodeEditor.DELETE", description="Delete code in file for a new start. " "Input should be filename." diff --git a/swarms/agents/tools/exit_conversation.py b/swarms/agents/tools/exit_conversation.py index dcaeeba4..1b366646 100644 --- a/swarms/agents/tools/exit_conversation.py +++ b/swarms/agents/tools/exit_conversation.py @@ -1,9 +1,9 @@ -from swarms.agents.tools.base import BaseToolSet, SessionGetter, ToolScope, tool +from swarms.agents.tools.base import BaseToolSet, SessionGetter, ToolScope, Tool from swarms.utils.logger import logger class ExitConversation(BaseToolSet): - @tool( + @Tool( name="Exit Conversation", description="A tool to exit the conversation. " "Use this when you want to exit the conversation. "