bstraehle commited on
Commit
38dfd80
1 Parent(s): 24755bb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
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['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):
 
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):