File size: 1,711 Bytes
0fac726
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
55
56
57
58
59
60
61
62
63
64
65
66
from enum import Enum

KNOWLEDGEBASE_DIR = "knowledgebases"
BS_HTML_PARSER = "html.parser"
OPENAI_COMPLETIONS_MODEL = "gpt-3.5-turbo"
OPENAI_CHAT_COMPLETIONS_MODEL = "gpt-3.5-turbo"
OPENAI_TEST_MODEL = "text-ada-001"
ENV_FILE = ".env"
HF_TEXT_GENERATION_REPO_ID = "google/flan-t5-xxl"
# HF_TEXT_GENERATION_REPO_ID = "OpenAssistant/falcon-40b-sft-mix-1226"
# HF_TEXT_GENERATION_REPO_ID = "OpenAssistant/oasst-sft-4-pythia-12b-epoch-3.5"
TEST_PROMPT = "test"

ASSISTANT_TYPE_KEY = "ASSISTANT_TYPE"
EMBEDDING_TYPE_KEY = "EMBEDDING_TYPE"
OPENAI_API_TOKEN_KEY = "OPENAI_API_KEY"
HUGGINGFACEHUB_API_TOKEN_KEY = "HUGGINGFACEHUB_API_TOKEN"
OPENAI_KNOWLEDGEBASE_KEY = "OPENAI_KNOWLEDGEBASE"
HF_KNOWLEDGEBASE_KEY = "HF_KNOWLEDGEBASE"

TEXT_TAG = "text"
SOURCE_TAG = "source"
SOURCES_TAG = "sources"
ANSWER_TAG = "answer"
QUESTION_TAG = "question"
QUERY_TAG = "query"
NONE_TAG = "None"
EMPTY_TAG = ""
MESSAGE_HISTORY_TAG = "message_history"
USER_TAG = "user"
ASSISTANT_TAG = "assistant"
FROM_TAG = "from"
IN_PROGRESS_TAG = "in_progress"
QUERY_INPUT_TAG = "query_input"
VALID_TOKEN_TAG = "valid_token"
API_KEY_TAG = "api_key"
ASSISTANT_TYPE_TAG = "assistant_type"
TOTAL_TOKENS_TAG = "total_tokens"
PROMPT_TOKENS_TAG = "prompt_tokens"
COMPLETION_TOKENS_TAG = "completion_tokens"
TOTAL_COST_TAG = "total_cost"

USER_AVATAR = "https://i.imgur.com/Rf63hWt.png"
ASSISTANT_AVATAR = "https://i.imgur.com/NQwsRn2.png"


class AssistantType(Enum):
    HUGGINGFACE = "hf"
    OPENAI = "openai"


class APIKeyType(Enum):
    HUGGINGFACE = "hf"
    OPENAI = "openai"


class EmbeddingType(Enum):
    HUGGINGFACE = "hf"
    OPENAI = "openai"


class StNotificationType(Enum):
    INFO = "info"
    WARNING = "warning"
    ERROR = "err"