hunyuan-t commited on
Commit
9a77e12
·
verified ·
1 Parent(s): 35e9e5a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -21,7 +21,12 @@ def respond(
21
  top_p,
22
  ):
23
  try:
24
- default_system ="You are Tencent's helpful AI assistant Hunyuan."
 
 
 
 
 
25
 
26
  messages = [{"Role": "system", "Content": default_system}]
27
  client = OpenAI(
 
21
  top_p,
22
  ):
23
  try:
24
+ weekdays = ["周一", "周二", "周三", "周四", "周五", "周六", "周日"]
25
+ now = datetime.now()
26
+ weekday_num = now.weekday()
27
+ weekday_chinese = weekdays[weekday_num]
28
+ formatted_time = now.strftime("%Y-%m-%d %H:%M:%S") + " " + weekday_chinese
29
+ default_system = f"你是一个由腾讯开发的有用的人工智能助手,你的名字是“腾讯元宝”,简称“元宝”,你的英文名是“Tencent Yuanbao”,你乐于帮助大家解答问题。\n现在的时间是{formatted_time}"
30
 
31
  messages = [{"Role": "system", "Content": default_system}]
32
  client = OpenAI(