from pathlib import Path from PIL import Image # from dotenv import load_dotenv, find_dotenv # pip install python-dotenv==1.0.0 from __version__ import __VERSION__ as APP_VERSION _SCRIPT_PATH = Path(__file__).absolute() PARENT_APP_DIR = _SCRIPT_PATH.parent TEMP_DIR = PARENT_APP_DIR / 'tempDir' ROOT_DIR = PARENT_APP_DIR.parent STATIC_DIR = ROOT_DIR / 'static' # _env_file_path = find_dotenv(str(CODE_DIR / '.env')) # Check if this path is correct # if _env_file_path: # load_dotenv(_env_file_path) ST_CONFIG = { "page_title": "NTT Data - Chat Q&A", # "page_icon": Image.open(STATIC_DIR / "mini_nttdata.jpg"), } OPERATING_MODE = "debug" # debug, preproduction, production REUSE_ANSWERS = False LOAD_INDEX_LOCALLY = False SAVE_INDEX_LOCALLY = False # x$ per 1000 tokens PRICES = { 'text-embedding-ada-002': 0.0004, 'text-davinci-003': 0.02, 'gpt-3': 0.002, 'gpt-4': 0.06, # 8K context } SOURCES_IDS = { # "Without source. Only chat": 4, "local files": 1, "urls": 3 } TYPE_IDS = { "MSF Azure OpenAI Service": 1, "OpenAI": 2, } INDEX_IDS = { "FAISS": 1, "Pinecode": 2, }