Spaces:
Sleeping
Sleeping
angelesteban00
commited on
Commit
•
e379c49
1
Parent(s):
af98e35
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
from pymongo import MongoClient
|
2 |
# error since Jan 2024, from langchain.embeddings.openai import OpenAIEmbeddings
|
3 |
-
from
|
4 |
# error since Jan 2024, from langchain.vectorstores import MongoDBAtlasVectorSearch
|
5 |
from langchain_community.vectorstores import MongoDBAtlasVectorSearch
|
6 |
# error since Jan 2024, from langchain.document_loaders import DirectoryLoader
|
@@ -41,7 +41,7 @@ def query_data(query,openai_api_key,mongo_uri):
|
|
41 |
# If it's not specified (for example like in the code below),
|
42 |
# then the default OpenAI model used in LangChain is OpenAI GPT-3.5-turbo, as of August 30, 2023
|
43 |
|
44 |
-
llm = OpenAI(openai_api_key=openai_api_key, temperature=0)
|
45 |
|
46 |
|
47 |
# Get VectorStoreRetriever: Specifically, Retriever for MongoDB VectorStore.
|
|
|
1 |
from pymongo import MongoClient
|
2 |
# error since Jan 2024, from langchain.embeddings.openai import OpenAIEmbeddings
|
3 |
+
from langchain.embeddings import OpenAIEmbeddings
|
4 |
# error since Jan 2024, from langchain.vectorstores import MongoDBAtlasVectorSearch
|
5 |
from langchain_community.vectorstores import MongoDBAtlasVectorSearch
|
6 |
# error since Jan 2024, from langchain.document_loaders import DirectoryLoader
|
|
|
41 |
# If it's not specified (for example like in the code below),
|
42 |
# then the default OpenAI model used in LangChain is OpenAI GPT-3.5-turbo, as of August 30, 2023
|
43 |
|
44 |
+
llm = OpenAI(openai_api_key=openai_api_key, temperature=0, model_name='gpt-4-1106-preview')
|
45 |
|
46 |
|
47 |
# Get VectorStoreRetriever: Specifically, Retriever for MongoDB VectorStore.
|