diff --git a/swarms/swarms.py b/swarms/swarms.py index 1444b23e..174f8a80 100644 --- a/swarms/swarms.py +++ b/swarms/swarms.py @@ -63,7 +63,7 @@ class Swarms: todo_prompt = PromptTemplate.from_template("You are a boss planer in a swarm who is an expert at coming up with a todo list for a given objective and then creating an worker to help you accomplish your task. Come up with a todo list for this objective: {objective} and then spawn a worker agent to complete the task for you. Always spawn an worker agent after creating a plan and pass the objective and plan to the worker agent.") todo_chain = LLMChain(llm=llm, prompt=todo_prompt) tools = [ - Tool(name="TODO", func=todo_chain.run, description="useful for when you need to come up with todo lists. Input: an objective to create a todo list for. Output: a todo list for that objective. Please be very clear what the objective is!"), + # Tool(name="TODO", func=todo_chain.run, description="useful for when you need to come up with todo lists. Input: an objective to create a todo list for. Output: a todo list for that objective. Please be very clear what the objective is!"), worker_node ] suffix = """Question: {task}\n{agent_scratchpad}""" diff --git a/swarms/tools/main.py b/swarms/tools/main.py index 85ee00a8..fb21fabb 100644 --- a/swarms/tools/main.py +++ b/swarms/tools/main.py @@ -17,11 +17,6 @@ import requests from bs4 import BeautifulSoup -# import llama_index -# from llama_index import GPTVectorStoreIndex -# from llama_index.readers.database import DatabaseReader - -# from logger import logger from swarms.utils.logger import logger class ToolScope(Enum): @@ -31,10 +26,6 @@ class ToolScope(Enum): SessionGetter = Callable[[], Tuple[str, AgentExecutor]] -# openai_api_key = os.environ["OPENAI_API_KEY"] -# llm = ChatOpenAI(model_name="gpt-4", temperature=1.0, openai_api_key=openai_api_key) - - def tool( name: str, description: str, @@ -91,13 +82,13 @@ class BaseToolSet: class RequestsGet(BaseToolSet): - @tool( - name="Requests Get", - description="A portal to the internet. " - "Use this when you need to get specific content from a website." - "Input should be a url (i.e. https://www.google.com)." - "The output will be the text response of the GET request.", - ) + # @tool( + # name="Requests Get", + # description="A portal to the internet. " + # "Use this when you need to get specific content from a website." + # "Input should be a url (i.e. https://www.google.com)." + # "The output will be the text response of the GET request.", + # ) def get(self, url: str) -> str: """Run the tool.""" html = requests.get(url).text @@ -1068,7 +1059,7 @@ class CodeEditor(BaseToolSet): "ex. test.py " "Output will be success or error message.", ) - def delete(self, inputs: str) -> str: + def delete(self, inputs: str, filepath: str) -> str: try: with open(filepath, "w") as f: f.write("")