-
Notifications
You must be signed in to change notification settings - Fork 0
/
settings.py.example
75 lines (61 loc) · 2.5 KB
/
settings.py.example
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
67
68
69
70
71
72
73
74
75
INGEST_GIT_REPO_URLS = [
# format is (repo_url, branch)
('https://github.com/yourorg/yourrepo.git', 'main'),
('https://github.com/yourorg/yourrepo2.git', 'main'),
('https://github.com/yourorg/yourrepo3.git', 'main'),
('https://github.com/yourorg/yourrepo4.git', 'main'),
]
INGEST_SITEMAP_URLS = [
"https://yourwebsite.dot/sitemap.xml",
]
INGEST_SITEMAP_URLS_FILTERS = [
"https://yourwebsite.dot/pricing",
"https://yourwebsite.dot/static/(.*)",
]
INGEST_GIT_REPOS_DIR=None
FAQBOT_SYSTEM_TEMPLATE='''
- Act as a knowledge base and use the Plivo API, documentation and code resources to answer the question.
- Always include the complete response in the answer.
- If you don't know the answer, just say that "I don't know", don't try to make up an answer.
- 'Webhook' keyword is synonymous to 'callback', 'API' is synonymous to 'Plivo API', 'SDK' is synonymous to 'Plivo SDK', 'XML' is synonymous to 'Plivo XML'.
- For any coding implementation, act as software development engineer and use the Plivo SDKs to solve the problem
- If the programming language is not specified, use Python.
- Format the answer with markdown.
- Analyze the following information to answer the question.
----------------
{summaries}
'''
#############################################
#############################################
####### DO NOT CHANGE BELOW THIS LINE #######
#############################################
#############################################
# import variables from environment
import os
SLACK_TOKEN_ID = os.getenv('SLACK_TOKEN_ID')
if not SLACK_TOKEN_ID:
raise Exception('SLACK_TOKEN_ID not set')
OPENAI_API_KEY = os.getenv('OPENAI_API_KEY')
if not OPENAI_API_KEY:
raise Exception('OPENAI_API_KEY not set')
OPENAI_MODEL = os.getenv('OPENAI_MODEL')
if not OPENAI_MODEL:
raise Exception('OPENAI_MODEL not set')
VECTOR_DATABASE = os.getenv('VECTOR_DATABASE')
if not VECTOR_DATABASE:
raise Exception('VECTOR_DATABASE not set')
ARCH = os.getenv('ARCH')
if not ARCH:
ARCH = os.uname().machine
if ARCH == 'x86_64':
ARCH = 'amd64'
if ARCH not in ['amd64', 'arm64']:
raise Exception('Unsupported architecture: {}'.format(ARCH))
VECTOR_DATABASE = VECTOR_DATABASE.replace('{ARCH}', ARCH)
OPENAI_REQUEST_TIMEOUT = os.getenv('OPENAI_REQUEST_TIMEOUT')
if not OPENAI_REQUEST_TIMEOUT:
OPENAI_REQUEST_TIMEOUT = 120
FAQBOT_OPENAI_REQUEST_TIMEOUT = OPENAI_REQUEST_TIMEOUT
FAQBOT_OPENAI_MODEL = OPENAI_MODEL
FAQBOT_OPENAI_TEMPERATURE=0.0
FAQBOT_OPENAI_MAX_TOKENS=2000