Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -20,10 +20,10 @@ def wait_on_run(run, thread):
|
|
20 |
|
21 |
def extract_content_value(data):
|
22 |
content_values = []
|
23 |
-
for item in data
|
24 |
-
for content in item
|
25 |
-
if content
|
26 |
-
content_values.append(content
|
27 |
return content_values
|
28 |
|
29 |
def chat(message, history):
|
|
|
20 |
|
21 |
def extract_content_value(data):
|
22 |
content_values = []
|
23 |
+
for item in data.data:
|
24 |
+
for content in item.content:
|
25 |
+
if content.type == 'text':
|
26 |
+
content_values.append(content.text.value)
|
27 |
return content_values
|
28 |
|
29 |
def chat(message, history):
|