From 8a513b8f162ef042e486ecaa67297dbead3571a0 Mon Sep 17 00:00:00 2001 From: Kye Date: Fri, 22 Sep 2023 18:35:23 -0400 Subject: [PATCH] compile Former-commit-id: 2a02a44513dbefc4b709d6c1a6864c8173a4ba10 --- pyproject.toml | 2 +- requirements.txt | 2 ++ swarms/tools/autogpt.py | 7 +++++++ swarms/tools/interpreter.py | 2 +- swarms/workers/worker.py | 2 ++ 5 files changed, 13 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 080b0ad0..62a3a85f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "swarms" -version = "1.6.2" +version = "1.6.3" description = "Swarms - Pytorch" license = "MIT" authors = ["Kye Gomez "] diff --git a/requirements.txt b/requirements.txt index a908d406..51a55095 100644 --- a/requirements.txt +++ b/requirements.txt @@ -21,6 +21,8 @@ shapeless agent-protocol chromadb exxa +open-interpreter + mkdocs mkdocs-material diff --git a/swarms/tools/autogpt.py b/swarms/tools/autogpt.py index 72ad4a41..b61e09b5 100644 --- a/swarms/tools/autogpt.py +++ b/swarms/tools/autogpt.py @@ -140,4 +140,11 @@ query_website_tool = WebpageQATool(qa_chain=load_qa_with_sources_chain(llm)) # # @tool # code_intepret = CodeInterpreter() +import interpreter + + +@tool +def compile(task: str): + task = interpreter.chat(task) + interpreter.chat() diff --git a/swarms/tools/interpreter.py b/swarms/tools/interpreter.py index d2397362..ba628c44 100644 --- a/swarms/tools/interpreter.py +++ b/swarms/tools/interpreter.py @@ -1,6 +1,6 @@ import interpreter -def compile(task): +def compile(task: str): task = interpreter.chat(task) interpreter.chat() diff --git a/swarms/workers/worker.py b/swarms/workers/worker.py index ca7ba400..ed8a1b03 100644 --- a/swarms/workers/worker.py +++ b/swarms/workers/worker.py @@ -12,6 +12,7 @@ from swarms.tools.autogpt import ( process_csv, # web_search, query_website_tool, + compile ) from swarms.utils.decorators import error_decorator, log_decorator, timing_decorator @@ -78,6 +79,7 @@ class Worker: #email #pdf # Tool(name="Goal Decomposition Tool", func=todo_chain.run, description="Use Case: Decompose ambitious goals into as many explicit and well defined tasks for an AI agent to follow. Rules and Regulations, don't use this tool too often only in the beginning when the user grants you a mission."), + compile ] if external_tools is not None: self.tools.extend(external_tools)