A bare minimum deployment of guardrails as a service.
For this deployment, we use a config file to define our Guards so we don't need a database.
Copy the .env.example file to .env and fill in the values.
Use https://hub.guardrailsai.com/tokens to get your API key for the GUARDRAILS_TOKEN value.
Use https://platform.openai.com/account/api-keys to get your API key for the OPENAI_API_KEY value.
make dbuild- build the docker image. Needs to be done only once.make dstart- start the server.make dstop- stop the server.
- Clone this repository
make envsource ./.venv/bin/activatemake buildmake start
Once the server is up and running, you can check out the Swagger docs at http://localhost:8000/docs
We include a Dockerfile that shows the basic steps of containerizing this server.
We also include two bash scripts in the buildscripts directory that shows the basics of building the image and running it.