Skip to content

Commit b8b949f

Browse files
authored
Cleanup query api - remove code duplication (#1690)
* consolidate query api functions and remove code duplication * refactor and remove more code duplication * Add semversioner file * fix basic search * fix drift search and update base class function names * update example notebooks
1 parent fe46141 commit b8b949f

File tree

14 files changed

+130
-343
lines changed

14 files changed

+130
-343
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "patch",
3+
"description": "cleanup query code duplication."
4+
}

docs/examples_notebooks/drift_search.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@
327327
},
328328
{
329329
"cell_type": "code",
330-
"execution_count": 6,
330+
"execution_count": null,
331331
"metadata": {},
332332
"outputs": [
333333
{
@@ -388,7 +388,7 @@
388388
}
389389
],
390390
"source": [
391-
"resp = await search.asearch(\"Who is agent Mercer?\")"
391+
"resp = await search.search(\"Who is agent Mercer?\")"
392392
]
393393
},
394394
{

docs/examples_notebooks/global_search.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@
392392
},
393393
{
394394
"cell_type": "code",
395-
"execution_count": 12,
395+
"execution_count": null,
396396
"metadata": {},
397397
"outputs": [
398398
{
@@ -420,7 +420,7 @@
420420
}
421421
],
422422
"source": [
423-
"result = await search_engine.asearch(\n",
423+
"result = await search_engine.search(\n",
424424
" \"What is Cosmic Vocalization and who are involved in it?\"\n",
425425
")\n",
426426
"\n",

docs/examples_notebooks/global_search_with_dynamic_community_selection.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@
394394
},
395395
{
396396
"cell_type": "code",
397-
"execution_count": 9,
397+
"execution_count": null,
398398
"metadata": {},
399399
"outputs": [
400400
{
@@ -420,7 +420,7 @@
420420
}
421421
],
422422
"source": [
423-
"result = await search_engine.asearch(\n",
423+
"result = await search_engine.search(\n",
424424
" \"What is Cosmic Vocalization and who are involved in it?\"\n",
425425
")\n",
426426
"\n",

docs/examples_notebooks/local_search.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -963,7 +963,7 @@
963963
},
964964
{
965965
"cell_type": "code",
966-
"execution_count": 13,
966+
"execution_count": null,
967967
"metadata": {},
968968
"outputs": [
969969
{
@@ -991,13 +991,13 @@
991991
}
992992
],
993993
"source": [
994-
"result = await search_engine.asearch(\"Tell me about Agent Mercer\")\n",
994+
"result = await search_engine.search(\"Tell me about Agent Mercer\")\n",
995995
"print(result.response)"
996996
]
997997
},
998998
{
999999
"cell_type": "code",
1000-
"execution_count": 14,
1000+
"execution_count": null,
10011001
"metadata": {},
10021002
"outputs": [
10031003
{
@@ -1026,7 +1026,7 @@
10261026
],
10271027
"source": [
10281028
"question = \"Tell me about Dr. Jordan Hayes\"\n",
1029-
"result = await search_engine.asearch(question)\n",
1029+
"result = await search_engine.search(question)\n",
10301030
"print(result.response)"
10311031
]
10321032
},

examples_notebooks/community_contrib/yfiles-jupyter-graphs/graph-visualization.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@
384384
"metadata": {},
385385
"outputs": [],
386386
"source": [
387-
"result = await search_engine.asearch(\"Tell me about Agent Mercer\")\n",
387+
"result = await search_engine.search(\"Tell me about Agent Mercer\")\n",
388388
"print(result.response)"
389389
]
390390
},
@@ -395,7 +395,7 @@
395395
"outputs": [],
396396
"source": [
397397
"question = \"Tell me about Dr. Jordan Hayes\"\n",
398-
"result = await search_engine.asearch(question)\n",
398+
"result = await search_engine.search(question)\n",
399399
"print(result.response)"
400400
]
401401
},

0 commit comments

Comments
 (0)