Have an existing DDN project?
In this tutorial we’ll see how to add PromptQL to an existing DDN project.
Go to your DDN project directory
cd mysupergraph
Run codemod command using DDN
sudo ddn update-cli
From the latest cli, run the following command from your project directory:
ddn codemod enable-promptql
This will make the following changes to your project:
-
Changes to
context.yaml
:- Update the
context.yaml
file’sdefinition
, to add apromptQL: true
entry. - Add a new
docker-start-promptql
script to thecontext.yaml
.
- Update the
-
Changes to docker compose file used to run Hasura engine:
- Add a new service called
promptql-playground
. - Optionally add
ENABLE_SQL_INTERFACE
environment variable inengine
service (if not present) - Optionally add
io.hasura.ddn.service-name
label inengine
service (if not present)
- Add a new service called
-
Enable promptQL for the DDN project, and generate a PromptQL API key.
-
Enable promptQL playground for the DDN cloud project, using the LLM api key added in step 1.
Start your assistant
Open a new terminal window, and run the following command from the project directory:
ddn run docker-start-promptql
This command will execute the script found in your .hasura/context.yaml
file.
When you run this command, Docker will start the engine
, promptql-playground
, and any other services present in the
docker compose file.
Then run the following command to open the DDN console:
ddn console --local
Browser support: PromptQL playground is supported on all browsers except Firefox and Safari. Support for these browsers should be available shortly.
This should open up your browser (or print a browser URL) for opening up your console. It’ll typically be something
like: https://console.hasura.io/local?engine=localhost:3280&promptql=localhost:3282
.