Fix syntax in simple example (#2)

This commit is contained in:
Vasilije 2024-11-19 10:44:36 +01:00 committed by GitHub
commit 2331739e07
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,5 +1,6 @@
import cognee
import asyncio
import cognee
from cognee.api.v1.search import SearchType
# Prerequisites:
@ -7,6 +8,7 @@ from cognee.api.v1.search import SearchType
# 2. Add your OpenAI API key to the `.env` file in the `LLM_API_KEY` field:
# LLM_API_KEY = "your_key_here"
async def main():
# Create a clean slate for cognee -- reset data and system state
await cognee.prune.prune_data()
@ -26,7 +28,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