Spaces:
Runtime error
Runtime error
File size: 1,141 Bytes
1ce95c4 018bf25 d84df54 1ce95c4 bb4294c 1ce95c4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
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 = {
"OpenAI": 2,
"MSF Azure OpenAI Service": 1,
}
INDEX_IDS = {
"FAISS": 1,
"Pinecone": 2,
}
|