The lil’bots platform comes with OpenAI access built in. You can use the OpenAI API to build bots that can generate text, answer questions, generate images and more.
To use OpenAI, you can make requests to the OpenAI API without including an API key. The requests will be recognized and authroized by the lil’bots platform.The following endpoints are supported (including any nexted routes):
/v1/models - list the models available for use docs
You can use the OpenAI SDK in your bots to make requests to the OpenAI API. The SDK is available in the JavaScript runtime by installing it from deno.land:
Copy
import OpenAI from "https://deno.land/x/openai/mod.ts";
You can then use the SDK to make requests to the OpenAI API. Here’s an example of a simple bot that uses the OpenAI API to answer a question: