feat: Adds OS information to README

This commit is contained in:
hajdul88 2025-01-17 11:22:34 +01:00
parent 22ea4f0675
commit 0b56e4b688

View file

@ -85,7 +85,7 @@ import os
os.environ["LLM_API_KEY"] = "YOUR OPENAI_API_KEY" os.environ["LLM_API_KEY"] = "YOUR OPENAI_API_KEY"
``` ```
or or
``` ```
import cognee import cognee
cognee.config.set_llm_api_key("YOUR_OPENAI_API_KEY") cognee.config.set_llm_api_key("YOUR_OPENAI_API_KEY")
@ -115,7 +115,7 @@ DB_PORT=5432
DB_NAME=cognee_db DB_NAME=cognee_db
DB_USERNAME=cognee DB_USERNAME=cognee
DB_PASSWORD=cognee DB_PASSWORD=cognee
``` ```
### Simple example ### Simple example
@ -140,14 +140,14 @@ async def main():
Natural language processing (NLP) is an interdisciplinary Natural language processing (NLP) is an interdisciplinary
subfield of computer science and information retrieval. subfield of computer science and information retrieval.
""" """
print("Adding text to cognee:") print("Adding text to cognee:")
print(text.strip()) print(text.strip())
# Add the text, and make it available for cognify # Add the text, and make it available for cognify
await cognee.add(text) await cognee.add(text)
print("Text added successfully.\n") print("Text added successfully.\n")
print("Running cognify to create knowledge graph...\n") print("Running cognify to create knowledge graph...\n")
print("Cognify process steps:") print("Cognify process steps:")
print("1. Classifying the document: Determining the type and category of the input text.") print("1. Classifying the document: Determining the type and category of the input text.")
@ -156,19 +156,19 @@ async def main():
print("4. Adding data points: Storing the extracted chunks for processing.") print("4. Adding data points: Storing the extracted chunks for processing.")
print("5. Generating knowledge graph: Extracting entities and relationships to form a knowledge graph.") print("5. Generating knowledge graph: Extracting entities and relationships to form a knowledge graph.")
print("6. Summarizing text: Creating concise summaries of the content for quick insights.\n") print("6. Summarizing text: Creating concise summaries of the content for quick insights.\n")
# Use LLMs and cognee to create knowledge graph # Use LLMs and cognee to create knowledge graph
await cognee.cognify() await cognee.cognify()
print("Cognify process complete.\n") print("Cognify process complete.\n")
query_text = 'Tell me about NLP' query_text = 'Tell me about NLP'
print(f"Searching cognee for insights with query: '{query_text}'") print(f"Searching cognee for insights with query: '{query_text}'")
# 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_text=query_text SearchType.INSIGHTS, query_text=query_text
) )
print("Search results:") print("Search results:")
# Display results # Display results
for result_text in search_results: for result_text in search_results:
@ -212,7 +212,7 @@ Cognee supports a variety of tools and services for different operations:
- **Language Models (LLMs)**: You can use either Anyscale or Ollama as your LLM provider. - **Language Models (LLMs)**: You can use either Anyscale or Ollama as your LLM provider.
- **Graph Stores**: In addition to NetworkX, Neo4j is also supported for graph storage. - **Graph Stores**: In addition to NetworkX, Neo4j is also supported for graph storage.
- **User management**: Create individual user graphs and manage permissions - **User management**: Create individual user graphs and manage permissions
## Demo ## Demo
@ -258,13 +258,13 @@ pip install cognee
| Name | Type | Current state | Known Issues | | Name | Type | Current state (Mac/Linux) | Known Issues | Current state (Win) | Known Issues |
|----------|--------------------|-------------------|--------------| |----------|--------------------|---------------------------|--------------|---------------------|--------------|
| Qdrant | Vector | Stable ✅ | | | Qdrant | Vector | Stable ✅ | | Untested ⏳ | |
| Weaviate | Vector | Stable ✅ | | | Weaviate | Vector | Stable ✅ | | Untested ⏳ | |
| LanceDB | Vector | Stable ✅ | | | LanceDB | Vector | Stable ✅ | | Stable ✅ | |
| Neo4j | Graph | Stable ✅ | | | Neo4j | Graph | Stable ✅ | | Stable ✅ | |
| NetworkX | Graph | Stable ✅ | | | NetworkX | Graph | Stable ✅ | | Stable ✅ | |
| FalkorDB | Vector/Graph | Unstable ❌ | | | FalkorDB | Vector/Graph | Unstable ❌ | | Unstable ❌ | |
| PGVector | Vector | Stable ✅ | | | PGVector | Vector | Stable ✅ | | Unstable ❌ | |
| Milvus | Vector | Stable ✅ | | | Milvus | Vector | Stable ✅ | | Untested ⏳ | |