nvdajp-book-qa / config.py
terapyon's picture
dev/modify-embedding-test (#4)
2c70642
raw
history blame
678 Bytes
import os
SAAS = True
def get_db_config(cname="nvdajp-book"):
if cname == "nvdajp-book":
url = os.environ["QDRANT_URL"]
elif cname == "nvdajp-book-e5":
url = os.environ["QDRANT_E5_URL"]
api_key = os.environ["QDRANT_API_KEY"]
collection_name = cname
return url, api_key, collection_name
def get_local_db_congin(cname="nvdajp-book"):
url = "localhost"
# api_key = os.environ["QDRANT_API_KEY"]
collection_name = cname
return url, None, collection_name
DB_CONFIG = get_db_config() if SAAS else get_local_db_congin()
DB_E5_CONFIG = (
get_db_config("nvdajp-book-e5") if SAAS else get_local_db_congin("nvdajp-book-e5")
)