fix: Resolve failing test for RAG_COMPLETION, add RAG_COMPLETION to MCP (#706)
<!-- .github/pull_request_template.md --> ## Description Resolve failing test for RAG_COMPLETION, add RAG_COMPLETION to MCP ## DCO Affirmation I affirm that all code in every commit of this pull request conforms to the terms of the Topoteretes Developer Certificate of Origin. Co-authored-by: Boris <boris@topoteretes.com>
This commit is contained in:
parent
c4a6c94675
commit
f5cd39c09d
2 changed files with 2 additions and 2 deletions
|
|
@ -194,7 +194,7 @@ async def search(search_query: str, search_type: str) -> str:
|
||||||
|
|
||||||
if search_type.upper() == "CODE":
|
if search_type.upper() == "CODE":
|
||||||
return json.dumps(search_results, cls=JSONEncoder)
|
return json.dumps(search_results, cls=JSONEncoder)
|
||||||
elif search_type.upper() == "GRAPH_COMPLETION" or search_type.upper() == "COMPLETION":
|
elif search_type.upper() == "GRAPH_COMPLETION" or search_type.upper() == "RAG_COMPLETION":
|
||||||
return search_results[0]
|
return search_results[0]
|
||||||
else:
|
else:
|
||||||
results = retrieved_edges_to_string(search_results)
|
results = retrieved_edges_to_string(search_results)
|
||||||
|
|
|
||||||
|
|
@ -160,7 +160,7 @@
|
||||||
"metadata": {},
|
"metadata": {},
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"source": [
|
"source": [
|
||||||
"search_results = await cognee.search(SearchType.RAG_COMPLETION, \"Tell me who are the people mentioned?\")\n",
|
"search_results = await cognee.search(SearchType.COMPLETION, \"Tell me who are the people mentioned?\")\n",
|
||||||
"\n",
|
"\n",
|
||||||
"print(\"\\n\\nAnswer based on RAG:\\n\")\n",
|
"print(\"\\n\\nAnswer based on RAG:\\n\")\n",
|
||||||
"for result in search_results:\n",
|
"for result in search_results:\n",
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue