Create .env.local in the root folder. Place the following vars.
OPENAI_API_KEY=<>
MODEL=<gpt-3.5-turbo-0613 OR gpt-4-0613>
First, run the development server:
npm run dev
Checkout utils/funcs.ts to see the currently available functions. Here's a hopefully up to date list. See demo above for usage hints.
-
addDecimalValues
: Adds two decimal values. -
addHexadecimalValues
: Adds two hexadecimal values. -
getCurrentWeather
: Given a lat and long, gets the current weather. This uses OpenWeather API. Navigate to OpenWeather to get yourself an account. Grab the API key and paste it in.env.local
. -
generateImage
: Generate an image from a prompt.
OPEN_WEATHER_API_KEY=<>
HF_API_KEY=<>
AWS_ACCESS_KEY_ID=<>
AWS_S3_SECRET_ACCESS_KEY=<>
AWS_REGION=<>
-
Want to write your own? All your need to do is the following...
- Navigate to utils/funcs.ts and write a new function.
- Make sure add
export
keyword to the function. - Define function definition in
functionsForModel
property inside utils/funcs.ts. - Chat away!