Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -24,9 +24,9 @@ collection = client[db_name][collection_name]
|
|
24 |
|
25 |
try:
|
26 |
vector_store = MongoDBAtlasVectorSearch(embedding=OpenAIEmbeddings(), collection=collection, index_name='vector_index', text_key='plot', embedding_key='plot_embedding')
|
27 |
-
llm = ChatOpenAI()
|
28 |
prompt = ChatPromptTemplate.from_messages([
|
29 |
-
("system", "You are a movie recommendation engine
|
30 |
("user", "List of movies: {input}")
|
31 |
])
|
32 |
chain = prompt | llm | output_parser
|
|
|
24 |
|
25 |
try:
|
26 |
vector_store = MongoDBAtlasVectorSearch(embedding=OpenAIEmbeddings(), collection=collection, index_name='vector_index', text_key='plot', embedding_key='plot_embedding')
|
27 |
+
llm = ChatOpenAI(temparature=0)
|
28 |
prompt = ChatPromptTemplate.from_messages([
|
29 |
+
("system", "You are a movie recommendation engine which post a concise and short summary on relevant movies."),
|
30 |
("user", "List of movies: {input}")
|
31 |
])
|
32 |
chain = prompt | llm | output_parser
|