An example showing how to use priompt
and priompt-preview
; somewhat useful for testing random prompts.
This example uses fastify
for the server, but any server library or framework should work
First run:
cd .. && ./init.sh
Then configure your OpenAI key in .env
.
In one terminal:
pnpm priompt
In another:
pnpm watch
In a third:
curl 'localhost:8008/message?message=what is the advantage of rust over c&name=a curious explorer'
You should get a response within a few seconds.
Go to localhost:6284 to see the prompt in the priompt preview.