main 0.1.3
Kye 2 years ago
parent 39ffd6acbe
commit 09c7cf1803

@ -2,9 +2,9 @@ transformers
openai
langchain==0.0.101
torch==1.13.1
torchvision==0.14.1
langchain
torch
torchvision
asyncio
nest_asyncio
# faiss

@ -3,7 +3,7 @@ from setuptools import setup, find_packages
setup(
name = 'swarms',
packages = find_packages(exclude=[]),
version = '0.1.1',
version = '0.1.2',
license='MIT',
description = 'Swarms - Pytorch',
author = 'Kye Gomez',

@ -55,9 +55,10 @@ from langchain.text_splitter import RecursiveCharacterTextSplitter
from langchain.chains.qa_with_sources.loading import load_qa_with_sources_chain, BaseCombineDocumentsChain
from langchain.tools.human.tool import HumanInputRun
from swarms.agents.workers.auto_agent import MultiModalVisualAgent
from swarms.tools.main import Terminal, CodeWriter, CodeEditor, process_csv, WebpageQATool
# from swarms.agents.workers.auto_agent import MultiModalVisualAgent
from swarms.agents.workers.auto_agent import multimodal_agent_tool
from swarms.tools.main import Terminal, CodeWriter, CodeEditor, process_csv, WebpageQATool
from swarms.tools.main import math_tool
@ -66,29 +67,11 @@ openai_api_key = os.environ["OPENAI_API_KEY"]
llm = ChatOpenAI(model_name="gpt-4", temperature=1.0, openai_api_key=openai_api_key)
####################### TOOLS
class MultiModalVisualAgentTool(BaseTool):
name = "multi_visual_agent"
description = "Multi-Modal Visual agent tool"
def __init__(self, agent: MultiModalVisualAgent):
self.agent = agent
def _run(self, text: str) -> str:
#run the multi-modal visual agent with the give task
return self.agent.run_text(text)
query_website_tool = WebpageQATool(qa_chain=load_qa_with_sources_chain(llm))
# !pip install duckduckgo_search
web_search = DuckDuckGoSearchRun()
#======>
multimodal_agent_tool = MultiModalVisualAgentTool(MultiModalVisualAgent)
tools = [

Loading…
Cancel
Save