pull/160/head
Kye 2 years ago
parent 75dd860b5c
commit a4a7ec44de

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

@ -36,24 +36,24 @@ from langchain.tools import tool
ROOT_DIR = "./data/"
# ---------- Tools ----------
openai_api_key = os.environ["OPENAI_API_KEY"]
llm = ChatOpenAI(model_name="gpt-4", temperature=1.0, openai_api_key=openai_api_key)
worker_tools = [
DuckDuckGoSearchRun(),
WriteFileTool(root_dir=ROOT_DIR),
ReadFileTool(root_dir=ROOT_DIR),
process_csv,
# openai_api_key = os.environ["OPENAI_API_KEY"]
# llm = ChatOpenAI(model_name="gpt-4", temperature=1.0, openai_api_key=openai_api_key)
# worker_tools = [
# DuckDuckGoSearchRun(),
# WriteFileTool(root_dir=ROOT_DIR),
# ReadFileTool(root_dir=ROOT_DIR),
# process_csv,
WebpageQATool(qa_chain=load_qa_with_sources_chain(llm)),
# Tool(name='terminal', func=Terminal.execute, description='Operates a terminal'),
# Tool(name='code_writer', func=CodeWriter(), description='Writes code'),
# Tool(name='code_editor', func=CodeEditor(), description='Edits code'),#
]
# ---------- Vector Store ----------
embeddings_model = OpenAIEmbeddings()
embedding_size = 1536
index = faiss.IndexFlatL2(embedding_size)
vectorstore = FAISS(embeddings_model.embed_query, index, InMemoryDocstore({}), {})
# WebpageQATool(qa_chain=load_qa_with_sources_chain(llm)),
# # Tool(name='terminal', func=Terminal.execute, description='Operates a terminal'),
# # Tool(name='code_writer', func=CodeWriter(), description='Writes code'),
# # Tool(name='code_editor', func=CodeEditor(), description='Edits code'),#
# ]
# # ---------- Vector Store ----------
# embeddings_model = OpenAIEmbeddings()
# embedding_size = 1536
# index = faiss.IndexFlatL2(embedding_size)
# vectorstore = FAISS(embeddings_model.embed_query, index, InMemoryDocstore({}), {})
Loading…
Cancel
Save