Spaces:
Sleeping
Sleeping
Samuel L Meyers
commited on
Commit
·
f0247b1
1
Parent(s):
de64869
Adjust text retrieval
Browse files- code/app.py +2 -2
code/app.py
CHANGED
|
@@ -78,9 +78,9 @@ def talk(txt, jsn):
|
|
| 78 |
for r in result:
|
| 79 |
print("GOT RESULT:", r)
|
| 80 |
txt2 = None
|
| 81 |
-
if "
|
| 82 |
txt2 = r["choices"][0]["text"]
|
| 83 |
-
elif not "text" in r["choices"][0] and not r["choices"][0]
|
| 84 |
running = False
|
| 85 |
yield txt
|
| 86 |
if txt2 is not None:
|
|
|
|
| 78 |
for r in result:
|
| 79 |
print("GOT RESULT:", r)
|
| 80 |
txt2 = None
|
| 81 |
+
if "text" in r["choices"][0]:
|
| 82 |
txt2 = r["choices"][0]["text"]
|
| 83 |
+
elif not "text" in r["choices"][0] and not "role" in r["choices"][0]:
|
| 84 |
running = False
|
| 85 |
yield txt
|
| 86 |
if txt2 is not None:
|