From bce4c0a24a574150bf443702b8cd08b25728e2ba Mon Sep 17 00:00:00 2001 From: Kye Date: Thu, 5 Oct 2023 11:09:02 -0400 Subject: [PATCH] clean up Former-commit-id: 5bf9aafe95875b7a4f02bf1b82dd8e9fe9299972 --- swarms/swarms/multi_agent_debate.py | 6 +++++- swarms/tools/autogpt.py | 3 +-- swarms/tools/developer.py | 4 +--- swarms/tools/stt.py | 6 ++++-- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/swarms/swarms/multi_agent_debate.py b/swarms/swarms/multi_agent_debate.py index 23e34c54..3ce257df 100644 --- a/swarms/swarms/multi_agent_debate.py +++ b/swarms/swarms/multi_agent_debate.py @@ -46,5 +46,9 @@ class MultiAgentDebate: self.task = task def format_results(self, results): - formatted_results = "\n".join([f"Agent {result['agent']} responded: {result['response']}" for result in results]) + + formatted_results = "\n".join( + [f"Agent {result['agent']} responded: {result['response']}" for result in results] + ) + return formatted_results diff --git a/swarms/tools/autogpt.py b/swarms/tools/autogpt.py index 1636f311..611f2a3e 100644 --- a/swarms/tools/autogpt.py +++ b/swarms/tools/autogpt.py @@ -126,8 +126,6 @@ class WebpageQATool(BaseTool): async def _arun(self, url: str, question: str) -> str: raise NotImplementedError -# # @tool -# code_intepret = CodeInterpreter() import interpreter @@ -198,3 +196,4 @@ def VQAinference(self, inputs): return answer + diff --git a/swarms/tools/developer.py b/swarms/tools/developer.py index f373e5f3..5fa9587c 100644 --- a/swarms/tools/developer.py +++ b/swarms/tools/developer.py @@ -8,6 +8,7 @@ from datetime import datetime from pathlib import Path from typing import Callable, Dict, List, Literal, Optional, Tuple, Union +from langchain.tools import tool from ptrace.debugger import ( NewProcessEvent, ProcessExecution, @@ -24,9 +25,6 @@ from swarms.tools.base import BaseToolSet, SessionGetter, ToolScope, tool from swarms.utils.logger import logger from swarms.utils.main import ANSI, Color, Style # test - -from langchain.tools import tool - #helpers PipeType = Union[Literal["stdout"], Literal["stderr"]] diff --git a/swarms/tools/stt.py b/swarms/tools/stt.py index cf260be0..22327115 100644 --- a/swarms/tools/stt.py +++ b/swarms/tools/stt.py @@ -1,10 +1,12 @@ #speech to text tool import os +import subprocess + +import whisperx from pydub import AudioSegment from pytube import YouTube -import whisperx -import subprocess + class SpeechToText: def __init__(