Add NEO4J test

This commit is contained in:
Vasilije 2024-06-12 23:18:06 +02:00
parent 39b346de17
commit b68580c3c2
3 changed files with 24 additions and 1 deletions

View file

@ -74,6 +74,12 @@ or
import cognee
cognee.config.llm_api_key = "YOUR_OPENAI_API_KEY"
```
If you are using Networkx, create an account on Graphistry to vizualize results:
```
cognee.config.set_graphistry_username = "YOUR_USERNAME"
cognee.config.set_graphistry_password = "YOUR_PASSWORD"
```
To run the UI, run:
```

View file

@ -122,4 +122,15 @@ class config():
vector_db_config = get_vectordb_config()
vector_db_config.vector_db_url = db_url
@staticmethod
def set_graphistry_username(graphistry_username: str):
base_config = get_base_config()
base_config.graphistry_username = graphistry_username
@staticmethod
def set_graphistry_password(graphistry_password: str):
base_config = get_base_config()
base_config.graphistry_password = graphistry_password

View file

@ -19,6 +19,12 @@ or
```
cognee.config.llm_api_key = "YOUR_OPENAI_API_KEY"
```
If you are using Networkx, create an account on Graphistry to vizualize results:
```
cognee.config.set_graphistry_username = "YOUR_USERNAME"
cognee.config.set_graphistry_password = "YOUR_PASSWORD"
```
## Run
@ -32,7 +38,7 @@ cognee.add(text) # Add a new piece of information
cognee.cognify() # Use LLMs and cognee to create knowledge
search_results = cognee.search("SIMILARITY", "computer science") # Query cognee for the knowledge
search_results = cognee.search("SIMILARITY", {'query': 'Tell me about NLP'}) # Query cognee for the knowledge
for result_text in search_results[0]:
print(result_text)