Skip to content

Commit

Permalink
fix: Remove dict and use string for search query
Browse files Browse the repository at this point in the history
Remove dictionary and use string for query in notebook and simple example

Fix COG-337
  • Loading branch information
dexters1 committed Nov 14, 2024
1 parent f13146d commit cc53693
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions examples/python/simple_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ async def main():

# Query cognee for insights on the added text
search_results = await cognee.search(
SearchType.INSIGHTS,
{'query': 'Tell me about NLP'}
SearchType.INSIGHTS, query='Tell me about NLP'
)

# Display search results
Expand Down
3 changes: 1 addition & 2 deletions notebooks/cognee_llama_index.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,7 @@
"\n",
"# Query cognee for summaries\n",
"search_results = await cognee.search(\n",
" SearchType.SUMMARIES,\n",
" {'query': \"What are the main news discussed in the document?\"}\n",
" SearchType.SUMMARIES, query=\"What are the main news discussed in the document?\"\n",
")\n",
"# Display search results\n",
"print(\"\\n Summary of main news discussed:\\n\")\n",
Expand Down

0 comments on commit cc53693

Please sign in to comment.