Spaces:
Build error
Build error
Commit
·
faa37d1
1
Parent(s):
475a4a4
Update weaviate_utils.py
Browse files- weaviate_utils.py +7 -3
weaviate_utils.py
CHANGED
|
@@ -21,10 +21,14 @@ def hybrid_search_weaviate(client, selected_class, query):
|
|
| 21 |
}
|
| 22 |
}
|
| 23 |
|
| 24 |
-
#
|
| 25 |
-
results = client.query.get(selected_class,
|
| 26 |
|
| 27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
|
| 29 |
|
| 30 |
def convert_to_tapas_format(data):
|
|
|
|
| 21 |
}
|
| 22 |
}
|
| 23 |
|
| 24 |
+
# Execute the query and retrieve the results
|
| 25 |
+
results = client.query.get(selected_class, search_query).do()
|
| 26 |
|
| 27 |
+
# Extract the data objects from the results
|
| 28 |
+
data_objects = results.get('data', {}).get('Get', {}).get('Things', [])
|
| 29 |
+
|
| 30 |
+
return data_objects
|
| 31 |
+
|
| 32 |
|
| 33 |
|
| 34 |
def convert_to_tapas_format(data):
|