Merge branch 'main' into feat/COG-544-eval-on-swe-bench

This commit is contained in:
Rita Aleksziev 2024-11-19 13:57:35 +01:00
commit d38f7c294e

View file

@ -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