Fix syntax in simple example (#2)
This commit is contained in:
commit
2331739e07
1 changed files with 4 additions and 2 deletions
|
|
@ -1,5 +1,6 @@
|
||||||
import cognee
|
|
||||||
import asyncio
|
import asyncio
|
||||||
|
|
||||||
|
import cognee
|
||||||
from cognee.api.v1.search import SearchType
|
from cognee.api.v1.search import SearchType
|
||||||
|
|
||||||
# Prerequisites:
|
# 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:
|
# 2. Add your OpenAI API key to the `.env` file in the `LLM_API_KEY` field:
|
||||||
# LLM_API_KEY = "your_key_here"
|
# LLM_API_KEY = "your_key_here"
|
||||||
|
|
||||||
|
|
||||||
async def main():
|
async def main():
|
||||||
# Create a clean slate for cognee -- reset data and system state
|
# Create a clean slate for cognee -- reset data and system state
|
||||||
await cognee.prune.prune_data()
|
await cognee.prune.prune_data()
|
||||||
|
|
@ -26,7 +28,7 @@ async def main():
|
||||||
|
|
||||||
# Query cognee for insights on the added text
|
# Query cognee for insights on the added text
|
||||||
search_results = await cognee.search(
|
search_results = await cognee.search(
|
||||||
SearchType.INSIGHTS, query='Tell me about NLP'
|
SearchType.INSIGHTS, query_text='Tell me about NLP'
|
||||||
)
|
)
|
||||||
|
|
||||||
# Display search results
|
# Display search results
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue