OpenAI
Use OpenAI’s chat completion API with std/openai
. This integration enables access to OpenAI’s language models without needing to acquire API keys.
For free Val Town users, all calls are sent to gpt-4o-mini
.
Basic Usage
Images
To send an image to ChatGPT, the easiest way is by converting it to a data URL, which is easiest to do with @stevekrouse/fileToDataURL.
Limits
While our wrapper simplifies the integration of OpenAI, there are a few limitations to keep in mind:
- Usage Quota: We limit each user to 10 requests per minute.
- Features: Chat completions is the only endpoint available.
If these limits are too low, let us know! You can also get around the limitation by using your own keys:
- Create your own API key on OpenAI’s website
- Create an environment variable named
OPENAI_API_KEY
- Use the
OpenAI
client fromnpm:openai
: