Merge pull request #234 from topoteretes/fix/rename-remaining-query-to-query-text-kwargs

Rename remaining 'query' keyword args in cognee.search to 'query_text'
This commit is contained in:
0xideas 2024-11-19 11:05:40 +01:00 committed by GitHub
commit 1dd07cdba6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 4 additions and 4 deletions

View file

@ -26,7 +26,7 @@ async def main():
await render_graph(None, include_nodes = True, include_labels = True)
search_results = await cognee.search(SearchType.CHUNKS, query = "Student")
search_results = await cognee.search(SearchType.CHUNKS, query_text = "Student")
assert len(search_results) != 0, "The search results list is empty."
print("\n\nExtracted chunks are:\n")
for result in search_results:

View file

@ -59,7 +59,7 @@ await cognee.add(text) # Add a new piece of information
await cognee.cognify() # Use LLMs and cognee to create knowledge
search_results = await cognee.search("INSIGHTS", {'query': 'Tell me about NLP'}) # Query cognee for the knowledge
search_results = await cognee.search(SearchType.INSIGHTS, query_text='Tell me about NLP') # Query cognee for the knowledge
for result_text in search_results:
print(result_text)

View file

@ -209,7 +209,7 @@ async def main(enable_steps):
if enable_steps.get("search_insights"):
search_results = await cognee.search(
SearchType.INSIGHTS,
{'query': 'Which applicant has the most relevant experience in data science?'}
query_text='Which applicant has the most relevant experience in data science?'
)
print("Search results:")
for result_text in search_results:

View file

@ -26,7 +26,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_text='Tell me about NLP'
)
# Display search results