hunyuan-t commited on
Commit
ef094af
·
verified ·
1 Parent(s): dbc5ef8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -46,7 +46,10 @@ def respond(
46
  response = ""
47
 
48
  for event in completion:
49
- token = event.choices[0].delta.content
 
 
 
50
  # if message.find('写一篇关于青春的五言绝句') != -1:
51
  # print(11111111111)
52
  # print(event)
 
46
  response = ""
47
 
48
  for event in completion:
49
+ if event.choices[0].delta.reasoning_content:
50
+ token = event.choices[0].delta.reasoning_content
51
+ else:
52
+ token = event.choices[0].delta.content
53
  # if message.find('写一篇关于青春的五言绝句') != -1:
54
  # print(11111111111)
55
  # print(event)