Graphreader Implementation
Project description
Graphreader
Graphreader is a Python library that allows you to read and write data from a Neo4j database. It is built on top of the Langgraph/LangChain library, which provides a framework for building language models. It is based on Medium article Implementing GraphReader with Neo4j and LangGraph
Getting started
-
Install the library using pip:
pip install graphreader_agentic_rag
-
Configure environment variables (.env):
- OPENAI_API_KEY='your-openai-api-key'
- OPENAI_MODEL_NAME='gpt-4o-mini'
- NEO4J_URI="neo4j+s://xxxxxxxx.databases.neo4j.io"
- NEO4J_USERNAME=neo4j
- NEO4J_PASSWORD='your-neo4j-password'
- ITERATION_LIMIT=12
Iteration limit is used to control the number of iterations that the agent will perform. This avoids infinite loops. If not specified, the default value is 10 iterations. Langgraph use 25 iterations. If the value higher than 25, it will cause an error.
- Import data:
To import data, you can use the import.ipynb Jupyter notebook available in the examples folder of the repository. There, three methods for data import are provided:
- Text: Import text.
- A single file: Import a specific file.
- All files in a folder: Import all available files in a folder.
Currently, only files in the txt format are supported. This allows you to reprocess your original files using the tool of your choice.
- Run the agent:
To run the agent, use the agent.ipynb Jupyter notebook available in the examples folder of the repository.
Roadmap
- [] Memgraph integration
- [] Customizable prompting for agents
Add your files
Roadmap
If you have ideas for releases in the future, it is a good idea to list them in the README.
from graphreader.chains.neo4j_utils import result_sources
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file graphreader_agentic_rag-0.1.1.tar.gz.
File metadata
- Download URL: graphreader_agentic_rag-0.1.1.tar.gz
- Upload date:
- Size: 13.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.12.7 Linux/6.8.0-48-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
702df4d31e1d3df6f3211ae5768449a69192f333809a258ffe305a6572a2c176
|
|
| MD5 |
a4ca67da22a56c5a7850c707e9b331d8
|
|
| BLAKE2b-256 |
57e79594a65f4fbc32b7c648f2cfa6b217b2dbca9db40d6456e95d910086fb44
|
File details
Details for the file graphreader_agentic_rag-0.1.1-py3-none-any.whl.
File metadata
- Download URL: graphreader_agentic_rag-0.1.1-py3-none-any.whl
- Upload date:
- Size: 18.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.12.7 Linux/6.8.0-48-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af0472a6bfb0b021fd3cbea877ae694db4d9076bde323330e9a22ba716da5c35
|
|
| MD5 |
a8094338f2782db610b560d4414627b4
|
|
| BLAKE2b-256 |
cfaaa0d7d7f06fb418a5a1b4acb8e569e2bbe405058c76f5eaa279b53a8a3af1
|