Upload app.py
Browse files
app.py
CHANGED
@@ -11,8 +11,8 @@ API_URL = "https://ai.fakeopen.com/v1/chat/completions" # 用户需要提供自
|
|
11 |
def predict(openai_gptapi_key, model, system_msg, inputs, top_p, temperature, max_tokens, presence_penalty, frequency_penalty, chat_counter, chatbot=[], history=[]):
|
12 |
|
13 |
print(f"——————————————————————————————")
|
14 |
-
#
|
15 |
-
current_time = datetime.datetime.
|
16 |
if inputs.strip() == '':
|
17 |
inputs = "你好呀,使用英语与中文简单介绍下你自己吧!"
|
18 |
if openai_gptapi_key.strip() == '':
|
|
|
11 |
def predict(openai_gptapi_key, model, system_msg, inputs, top_p, temperature, max_tokens, presence_penalty, frequency_penalty, chat_counter, chatbot=[], history=[]):
|
12 |
|
13 |
print(f"——————————————————————————————")
|
14 |
+
# 获取当前中国时间
|
15 |
+
current_time = datetime.datetime.utcnow().astimezone(pytz.timezone('Asia/Shanghai')).strftime("%Y年-%m月-%d日 %H时:%M分:%S秒")
|
16 |
if inputs.strip() == '':
|
17 |
inputs = "你好呀,使用英语与中文简单介绍下你自己吧!"
|
18 |
if openai_gptapi_key.strip() == '':
|