Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -24,7 +24,7 @@ collection_name = 'embedded_movies'
|
|
24 |
collection = client[db_name][collection_name]
|
25 |
|
26 |
try:
|
27 |
-
vector_store = MongoDBAtlasVectorSearch(embedding=OpenAIEmbeddings(
|
28 |
llm = ChatOpenAI(temperature=0)
|
29 |
prompt = ChatPromptTemplate.from_messages([
|
30 |
("system", "You are a movie recommendation engine which post a concise and short summary on relevant movies."),
|
|
|
24 |
collection = client[db_name][collection_name]
|
25 |
|
26 |
try:
|
27 |
+
vector_store = MongoDBAtlasVectorSearch(embedding=OpenAIEmbeddings(), collection=collection, index_name='vector_index', text_key='plot', embedding_key='plot_embedding')
|
28 |
llm = ChatOpenAI(temperature=0)
|
29 |
prompt = ChatPromptTemplate.from_messages([
|
30 |
("system", "You are a movie recommendation engine which post a concise and short summary on relevant movies."),
|