A super simple deno server wrapper for OpenAI's ChatGPT and Anthropic's Claude APIs for Fun™
By Default ChatGPT is used.
- Clone the repository.
- Run
deno install
. - Create a
.env
file by copying the.env.example
file and updating the values. - Run
deno task start
- ChatGPT API key
- Anthropic API key (if using the Anthropic client)
- Weather.com API key (if using the /what-to-wear route)
To use Anthropic's Claude, add a query param ?client=anthropic
To see if the server is running as expected:
Send a GET request to /health
To write open-ended prompts:
Send a POST request to /chat
with a JSON body:
{"message": "Tell me a funny joke."}
To get advice on what to wear today:
Send a GET request to /what-to-wear?zip=YOUR-ZIP-CODE
To get a zen koan:
Send a GET request to /koan
To read a short piece of sort of ok magical realism:
Send a GET request to /magic