diff --git a/packages/backend/src/cache/faiss_index_general.dvc b/packages/backend/src/cache/faiss_index_general.dvc index b3b63437..5be6d6c5 100644 --- a/packages/backend/src/cache/faiss_index_general.dvc +++ b/packages/backend/src/cache/faiss_index_general.dvc @@ -1,5 +1,5 @@ outs: -- md5: 1da4b1d88045a2adbc87e5d11c0a6af8.dir +- md5: 0b178596139757a23f4b74274688c17c.dir size: 85685475 nfiles: 2 hash: md5 diff --git a/packages/backend/src/cache/faiss_index_in_depth.dvc b/packages/backend/src/cache/faiss_index_in_depth.dvc index 96aed5ad..74ea8129 100644 --- a/packages/backend/src/cache/faiss_index_in_depth.dvc +++ b/packages/backend/src/cache/faiss_index_in_depth.dvc @@ -1,5 +1,5 @@ outs: -- md5: 038f50d4fd4c158b138d626f0fe19c2e.dir +- md5: 19c005b01a5c795c66428d281fd5222e.dir size: 85685475 nfiles: 2 hash: md5 diff --git a/packages/backend/src/preprocessor.py b/packages/backend/src/preprocessor.py index 0c54d94f..e131f859 100644 --- a/packages/backend/src/preprocessor.py +++ b/packages/backend/src/preprocessor.py @@ -8,7 +8,7 @@ from langchain.chains import LLMChain, HypotheticalDocumentEmbedder from langchain.prompts import PromptTemplate from langchain.vectorstores.faiss import FAISS -from langchain.chat_models import ChatOpenAI +from langchain import OpenAI from pathlib import Path import shutil @@ -17,7 +17,7 @@ def create_embeddings(): - llm = ChatOpenAI(model="gpt-4") + llm = OpenAI(model="gpt-4") base_embeddings = OpenAIEmbeddings() diff --git a/packages/googlecloud/functions/getanswer/cache/faiss_index_general.dvc b/packages/googlecloud/functions/getanswer/cache/faiss_index_general.dvc index b3b63437..5be6d6c5 100644 --- a/packages/googlecloud/functions/getanswer/cache/faiss_index_general.dvc +++ b/packages/googlecloud/functions/getanswer/cache/faiss_index_general.dvc @@ -1,5 +1,5 @@ outs: -- md5: 1da4b1d88045a2adbc87e5d11c0a6af8.dir +- md5: 0b178596139757a23f4b74274688c17c.dir size: 85685475 nfiles: 2 hash: md5 diff --git a/packages/googlecloud/functions/getanswer/cache/faiss_index_in_depth.dvc b/packages/googlecloud/functions/getanswer/cache/faiss_index_in_depth.dvc index 96aed5ad..74ea8129 100644 --- a/packages/googlecloud/functions/getanswer/cache/faiss_index_in_depth.dvc +++ b/packages/googlecloud/functions/getanswer/cache/faiss_index_in_depth.dvc @@ -1,5 +1,5 @@ outs: -- md5: 038f50d4fd4c158b138d626f0fe19c2e.dir +- md5: 19c005b01a5c795c66428d281fd5222e.dir size: 85685475 nfiles: 2 hash: md5 diff --git a/packages/googlecloud/functions/getanswer/helper.py b/packages/googlecloud/functions/getanswer/helper.py index 5f63a6b1..f72598ed 100644 --- a/packages/googlecloud/functions/getanswer/helper.py +++ b/packages/googlecloud/functions/getanswer/helper.py @@ -4,6 +4,7 @@ from langchain.chains import LLMChain, HypotheticalDocumentEmbedder from langchain.prompts import PromptTemplate from langchain.chat_models import ChatOpenAI +from langchain import OpenAI import logging import pandas as pd @@ -37,7 +38,7 @@ def get_dbs(): def create_embeddings(): - llm = ChatOpenAI(model="gpt-4") + llm = OpenAI(model="gpt-4") base_embeddings = OpenAIEmbeddings() diff --git a/packages/googlecloud/functions/getanswer/requirements.txt b/packages/googlecloud/functions/getanswer/requirements.txt index 9bd7bbc1..f1d4fc71 100644 --- a/packages/googlecloud/functions/getanswer/requirements.txt +++ b/packages/googlecloud/functions/getanswer/requirements.txt @@ -3,8 +3,8 @@ functions-framework flask google-cloud-error-reporting python-dotenv -langchain==0.0.330 -openai +langchain +openai==1.1.1 google-api-python-client # Google API google-search-results # SerpAPI youtube-transcript-api