pull/55/head
Kye 1 year ago
parent c1bed2ade0
commit 4b728e92e3

@ -22,7 +22,7 @@ classifiers = [
] ]
[tool.poetry.dependencies] [tool.poetry.dependencies]
python = "^3.6" python = "^3.8.1"
transformers = "*" transformers = "*"
openai = "*" openai = "*"
langchain = "0.0.240" langchain = "0.0.240"

@ -180,7 +180,7 @@ class Worker:
""" """
try: try:
embeddings_model = OpenAIEmbeddings(openai_api_key=self.openai_api_key) embeddings_model = OpenAIEmbeddings(openai_api_key=self.openai_api_key)
embedding_size = 1892 embedding_size = 1536
index = faiss.IndexFlatL2(embedding_size) index = faiss.IndexFlatL2(embedding_size)
self.vectorstore = FAISS(embeddings_model.embed_query, index, InMemoryDocstore({}), {}) self.vectorstore = FAISS(embeddings_model.embed_query, index, InMemoryDocstore({}), {})

Loading…
Cancel
Save