Spaces:
Build error
Build error
Commit
·
2fbdaee
1
Parent(s):
faa37d1
Update weaviate_utils.py
Browse files- weaviate_utils.py +2 -2
weaviate_utils.py
CHANGED
@@ -13,7 +13,6 @@ def hybrid_search_weaviate(client, selected_class, query):
|
|
13 |
"""
|
14 |
# Construct the search query
|
15 |
search_query = {
|
16 |
-
"path": ["*"],
|
17 |
"where": {
|
18 |
"path": ["*"],
|
19 |
"operator": "Like",
|
@@ -22,7 +21,7 @@ def hybrid_search_weaviate(client, selected_class, query):
|
|
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', [])
|
@@ -31,6 +30,7 @@ def hybrid_search_weaviate(client, selected_class, query):
|
|
31 |
|
32 |
|
33 |
|
|
|
34 |
def convert_to_tapas_format(data):
|
35 |
"""
|
36 |
Convert the list of dictionaries (from Weaviate) into the format TAPAS expects.
|
|
|
13 |
"""
|
14 |
# Construct the search query
|
15 |
search_query = {
|
|
|
16 |
"where": {
|
17 |
"path": ["*"],
|
18 |
"operator": "Like",
|
|
|
21 |
}
|
22 |
|
23 |
# Execute the query and retrieve the results
|
24 |
+
results = client.query.get(selected_class, "*").with_where(search_query).do()
|
25 |
|
26 |
# Extract the data objects from the results
|
27 |
data_objects = results.get('data', {}).get('Get', {}).get('Things', [])
|
|
|
30 |
|
31 |
|
32 |
|
33 |
+
|
34 |
def convert_to_tapas_format(data):
|
35 |
"""
|
36 |
Convert the list of dictionaries (from Weaviate) into the format TAPAS expects.
|