AI platforms use models that are trained on specific types of data to make relevant decisions and perform tasks. For example, you would interact with one type of model to generate chat responses and a different model to generate images. AI models are also known as LLMs (large language models).
Retool supports a number of AI platforms and their models:
Retool interacts with an AI platform using its API. You provide an API key for your AI platform account so that Retool can perform AI queries. You can get started with Retool AI without needing any API credentials using the Retool-managed OpenAI connection. This enables you to evaluate and test AI queries before using them in production.
You configure AI platform API keys in the Resources tab of your organization settings.
The Retool-managed OpenAI connection provides a limited number of tokens to each organization per day. If you use Vectors in Retool AI, you can reach this limit very quickly. You can configure AI platforms in Retool AI to use your own API credentials for production use.
Retool provides two options for interacting with OpenAI:
|Retool-managed||Getting started with Retool AI.||Use a Retool-managed OpenAI key when performing requests.|
|Using your API keys||Using Retool AI in production.||Use your own OpenAI key when performing requests.|
The following OpenAI models are supported by Retool AI:
|gpt-4||Text, Chat||More capable than GPT-3.5 models, able to do more complex tasks, and optimized for chat.|
|gpt-3.5-turbo||Text, Chat||Most capable GPT-3.5 model and optimized for chat.|
|gpt-3.5-turbo-16k||Text, Chat||Same capabilities as |
|dall-e-2||Images||Generate images from natural language descriptions.|
Retool supports Azure OpenAI models. Rather than a predefined set of models from which you select, you create and deploy an Azure OpenAI service with a specific model. You then provide the endpoint and model name when configuring the API credentials.
The following Anthropic models are supported by Retool AI:
|Claude||Text||Supports sophisticated dialogue and creative content generation to detailed instruction.|
The following Cohere models are supported by Retool AI:
|command||Text||An instruction-following conversational model that performs language tasks with high quality and more reliability.|
|command-light||Text||A smaller, faster version of |
Use OpenAI's tokenizer tool to calculate how many tokens would result from a passage of text.
AI models use tokens, rather than characters or bytes, to represent the commonality of sequences and usage. In general, a single token can equate to approximately four characters.
The text you provide in an AI query is converted by the model into tokens, after which it can generate the necessary response.
Billing and usage
AI platforms calculate billing costs based on token usage. Refer to each AI platform to find out pricing information and how to monitor usage.