Skip to content
Snippets Groups Projects
Commit b7765f77 authored by Marcus Schiesser's avatar Marcus Schiesser
Browse files

feat(cl): Use condense plus context chat engine for FastAPI as default

parent a630b396
No related branches found
Tags v0.2.8
No related merge requests found
......@@ -20,4 +20,4 @@ def get_chat_engine():
)
index = VectorStoreIndex.from_vector_store(store, service_context)
logger.info("Finished connecting to index from MongoDB.")
return index.as_chat_engine(similarity_top_k=5)
return index.as_chat_engine(similarity_top_k=5, chat_mode="condense_plus_context")
......@@ -22,4 +22,4 @@ def get_chat_engine():
storage_context = StorageContext.from_defaults(persist_dir=STORAGE_DIR)
index = load_index_from_storage(storage_context, service_context=service_context)
logger.info(f"Finished loading index from {STORAGE_DIR}")
return index.as_chat_engine()
return index.as_chat_engine(similarity_top_k=5, chat_mode="condense_plus_context")
......@@ -13,4 +13,4 @@ def get_chat_engine():
store = init_pg_vector_store_from_env()
index = VectorStoreIndex.from_vector_store(store, service_context)
logger.info("Finished connecting to index from PGVector.")
return index.as_chat_engine(similarity_top_k=5)
return index.as_chat_engine(similarity_top_k=5, chat_mode="condense_plus_context")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment