Spaces:
Sleeping
Sleeping
[update] fix empty data detection logic
Browse files
app.py
CHANGED
@@ -56,7 +56,9 @@ def local_RAG(model, message, client, vector_id):
|
|
56 |
"max_num_results": 5
|
57 |
}]
|
58 |
)
|
59 |
-
if response.output
|
|
|
|
|
60 |
return ""
|
61 |
return response.output[1].content[0].text
|
62 |
except Exception as e:
|
|
|
56 |
"max_num_results": 5
|
57 |
}]
|
58 |
)
|
59 |
+
if len(response.output)==0:
|
60 |
+
return ""
|
61 |
+
if not response.output[1].content[0].annotations:
|
62 |
return ""
|
63 |
return response.output[1].content[0].text
|
64 |
except Exception as e:
|