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:
Igor Ilic 2025-04-07 18:13:15 +02:00 committed by GitHub
parent c4a6c94675
commit f5cd39c09d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -194,7 +194,7 @@ async def search(search_query: str, search_type: str) -> str:
if search_type.upper() == "CODE":
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]
else:
results = retrieved_edges_to_string(search_results)

View file

@ -160,7 +160,7 @@
"metadata": {},
"cell_type": "code",
"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",
"print(\"\\n\\nAnswer based on RAG:\\n\")\n",
"for result in search_results:\n",