simondby commited on
Commit ·
da20658
1
Parent(s): f6a1b67
update
Browse files
app.py
CHANGED
|
@@ -16,7 +16,8 @@ user_key = "" # 在这里输入你的 API 密钥
|
|
| 16 |
# password = os.environ.get('pass')
|
| 17 |
|
| 18 |
initial_prompt = "你的目的是解答用户问题,并且你会如实回答,对于不知道的问题,你需要回复你不知道。"
|
| 19 |
-
API_URL = "https://api.openai.com/v1/chat/completions"
|
|
|
|
| 20 |
HISTORY_DIR = "history"
|
| 21 |
TEMPLATES_DIR = "templates"
|
| 22 |
|
|
@@ -53,7 +54,7 @@ def fetch_data(query):
|
|
| 53 |
try:
|
| 54 |
user_tuple = fetch_data("SELECT username, password FROM credentials")
|
| 55 |
except:
|
| 56 |
-
user_tuple = os.environ.get('user_tuple')
|
| 57 |
|
| 58 |
print(user_tuple)
|
| 59 |
|
|
|
|
| 16 |
# password = os.environ.get('pass')
|
| 17 |
|
| 18 |
initial_prompt = "你的目的是解答用户问题,并且你会如实回答,对于不知道的问题,你需要回复你不知道。"
|
| 19 |
+
# API_URL = "https://api.openai.com/v1/chat/completions"
|
| 20 |
+
API_URL = "https://openai.hex.im/v1/chat/completions"
|
| 21 |
HISTORY_DIR = "history"
|
| 22 |
TEMPLATES_DIR = "templates"
|
| 23 |
|
|
|
|
| 54 |
try:
|
| 55 |
user_tuple = fetch_data("SELECT username, password FROM credentials")
|
| 56 |
except:
|
| 57 |
+
user_tuple = eval(os.environ.get('user_tuple'))
|
| 58 |
|
| 59 |
print(user_tuple)
|
| 60 |
|