Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -49,13 +49,14 @@ def respond(
|
|
49 |
print(222222222222)
|
50 |
print(event)
|
51 |
print(type(event))
|
|
|
52 |
print(222222222222)
|
53 |
-
|
54 |
if message.find('写一篇关于青春的五言绝句') != -1:
|
55 |
print(11111111111)
|
56 |
-
print(
|
57 |
-
token = data['Choices'][0]['Delta']['Content']
|
58 |
|
|
|
59 |
response += token
|
60 |
yield response
|
61 |
except Exception as e:
|
|
|
49 |
print(222222222222)
|
50 |
print(event)
|
51 |
print(type(event))
|
52 |
+
print(event.choices)
|
53 |
print(222222222222)
|
54 |
+
token = event.choices[0]['Delta']['Content']
|
55 |
if message.find('写一篇关于青春的五言绝句') != -1:
|
56 |
print(11111111111)
|
57 |
+
print(token)
|
|
|
58 |
|
59 |
+
|
60 |
response += token
|
61 |
yield response
|
62 |
except Exception as e:
|