organized tools

main
Kye 2 years ago
parent 6439cf5aaf
commit 678416aa84

@ -68,7 +68,7 @@ from langchain.tools.human.tool import HumanInputRun
from swarms.agents.workers.auto_agent import MultiModalVisualAgent from swarms.agents.workers.auto_agent import MultiModalVisualAgent
from swarms.tools.main import Terminal, CodeWriter, CodeEditor, process_csv, WebpageQATool from swarms.tools.main import Terminal, CodeWriter, CodeEditor, process_csv, WebpageQATool
from swarms.tools.main import math_tool
llm = ChatOpenAI(model_name="gpt-4", temperature=1.0, openai_api_key="") llm = ChatOpenAI(model_name="gpt-4", temperature=1.0, openai_api_key="")
@ -97,17 +97,6 @@ web_search = DuckDuckGoSearchRun()
multimodal_agent_tool = MultiModalVisualAgentTool(MultiModalVisualAgent) multimodal_agent_tool = MultiModalVisualAgentTool(MultiModalVisualAgent)
#======> Calculator
from langchain import LLMMathChain
llm_math_chain = LLMMathChain.from_llm(llm=llm, verbose=True)
math_tool = Tool(
name="Calculator",
func=llm_math_chain.run,
description="useful for when you need to answer questions about math"
),
tools = [ tools = [

@ -2260,3 +2260,19 @@ class TranscribeAudioTool(BaseTool):
) -> str: ) -> str:
"""Use the tool asynchronously.""" """Use the tool asynchronously."""
raise NotImplementedError("transcribe_audio does not support async") raise NotImplementedError("transcribe_audio does not support async")
###########=========================>
#======> Calculator
from langchain import LLMMathChain
llm_math_chain = LLMMathChain.from_llm(llm=llm, verbose=True)
math_tool = Tool(
name="Calculator",
func=llm_math_chain.run,
description="useful for when you need to answer questions about math"
),

Loading…
Cancel
Save