Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -54,11 +54,9 @@ def ask_openai(question):
|
|
54 |
thread_id=thread.id,
|
55 |
message_id=message_id
|
56 |
)
|
57 |
-
|
58 |
-
|
59 |
return "No response."
|
60 |
-
except Exception as e:
|
61 |
-
return f"An error occurred: {str(e)}"
|
62 |
|
63 |
examples = [
|
64 |
["My Eucalyptus tree is struggling outside in the cold weather in europe"],
|
|
|
54 |
thread_id=thread.id,
|
55 |
message_id=message_id
|
56 |
)
|
57 |
+
if message.content and message.content[0].type == 'text':
|
58 |
+
return message.content[0].text.value # Accessing the 'value' field correctly
|
59 |
return "No response."
|
|
|
|
|
60 |
|
61 |
examples = [
|
62 |
["My Eucalyptus tree is struggling outside in the cold weather in europe"],
|