chore: Update service readme (#93)

* chore: Update service readme

* Update README.md

* point to the image in server readme

* chore: Update readme + rename image to graphiti
This commit is contained in:
Pavlo Paliychuk 2024-09-06 16:11:04 -04:00 committed by GitHub
parent 39ad28d6db
commit 66111a66db
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 45 additions and 13 deletions

View File

@ -16,7 +16,7 @@ on:
env:
REGISTRY: docker.io
IMAGE_NAME: zepai/graph-service
IMAGE_NAME: zepai/graphiti
jobs:
docker-image:

View File

@ -149,6 +149,12 @@ await graphiti.search('Who was the California Attorney General?', center_node_uu
graphiti.close()
```
## Graph Service
The `server` directory contains an API service for interacting with the Graphiti API. It is built using FastAPI.
Please see the [server README](./server/README.md) for more information.
## Documentation
- [Guides and API documentation](https://help.getzep.com/graphiti).

View File

@ -1,32 +1,58 @@
# graph-service
Graph service is a fast api server implementing the Graphiti package.
Graph service is a fast api server implementing the [graphiti](https://github.com/getzep/graphiti) package.
## Running Instructions
1. Ensure you have Docker and Docker Compose installed on your system.
2. Clone the repository and navigate to the `graph-service` directory.
2. Add `zepai/graphiti:latest` to your service setup
3. Create a `.env` file in the `graph-service` directory with the following content:
3. Make sure to pass the following environment variables to the service
```
OPENAI_API_KEY=your_openai_api_key
NEO4J_USER=neo4j
NEO4J_USER=your_neo4j_user
NEO4J_PASSWORD=your_neo4j_password
NEO4J_PORT=7687
NEO4J_PORT=your_neo4j_port
```
Replace `your_openai_api_key` and `your_neo4j_password` with your actual OpenAI API key and desired Neo4j password.
4. This service depends on having access to a neo4j instance, you may wish to add a neo4j image to your service setup as well. Or you may wish to use neo4j cloud or a desktop version if running this locally.
4. Run the following command to start the services:
An example of docker compose setup may look like this:
```
docker-compose up --build
```yml
version: '3.8'
services:
graph:
image: zepai/graphiti:latest
ports:
- "8000:8000"
environment:
- OPENAI_API_KEY=${OPENAI_API_KEY}
- NEO4J_URI=bolt://neo4j:${NEO4J_PORT}
- NEO4J_USER=${NEO4J_USER}
- NEO4J_PASSWORD=${NEO4J_PASSWORD}
neo4j:
image: neo4j:5.22.0
ports:
- "7474:7474" # HTTP
- "${NEO4J_PORT}:${NEO4J_PORT}" # Bolt
volumes:
- neo4j_data:/data
environment:
- NEO4J_AUTH=${NEO4J_USER}/${NEO4J_PASSWORD}
volumes:
neo4j_data:
```
5. The graph service will be available at `http://localhost:8000`.
5. Once you start the service, it will be available at `http://localhost:8000` (or the port you have specified in the docker compose file).
6. You may access the swagger docs at `http://localhost:8000/docs`.
6. You may access the swagger docs at `http://localhost:8000/docs`. You may also access redocs at `http://localhost:8000/redoc`.
7. You may also access the neo4j browser at `http://localhost:7474`.
7. You may also access the neo4j browser at `http://localhost:7474` (the port depends on the neo4j instance you are using).