A directory for all util and service modules for storing, manipulating and retrieving data
InferGPT uses a Neo4j Knowledge Graph exclusively.
- Ensure the
.env
file has been configured as described in the main README.
This README covers instructions on how to run the Neo4j:
- Locally with Neo4j Desktop
- In a Docker Container
For ease of use, we would recommended that you run the entire application using Docker Compose instead. See main README.
If you would prefer not to use Docker Compose, read on...
This can be downloaded here
Once installed follow the steps below:
- Create new project to host your DBMS.
- Create a new database within the project.
- Add the username and password to the root
.env
file. - Add the database uri to the
.env
file. The default value for this isbolt://localhost:7687
- Run the database in Neo4j desktop.
- Test the connection is working by asking InferGPT the keyphrase "healthcheck". It will return with a status update on the state of the backend and database
- Load the data located at data/create_graph.cypher into the database and run it
- Build the Docker image
docker build -t {my-data-image-name} .
- Run the backend within a Docker container
docker run -e NEO4J_AUTH=neo4j/password -p 7474:7474 -p 7687:7687 {my-data-image-name}
Replace
neo4j/password
with your chosen username and password (seperated by a/
).
- Check neo4j is running at http://localhost:7474/
To load initial dummy data into the project, you will need an azure blob storage set up, containing a json
file.
The following environment variables should be set up:
AZURE_STORAGE_CONNECTION_STRING="my-connection-string"
AZURE_STORAGE_CONTAINER_NAME=my-container-name
AZURE_INITIAL_DATA_FILENAME=test-data.json
If there is no blob storage set up, it will default to importing no data.