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

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

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