Models
ChatBotKit supports a wide range of models to create engaging conversational AI experiences. These include models from OpenAI, Anthropic, Google, Mistral, Perplexity, and other providers, along with ChatBotKit's own in-house models. We regularly add new models as they become available.
For the complete, up-to-date list of supported models - including descriptions, token ratios, and pricing details - visit the platform models page. You can also retrieve model information programmatically via the API.
Understanding Token Costs
Most models have separate input token ratio and output token ratio values that reflect the different costs of processing input versus generating output. The per-model input and output ratios are available on the platform models page and via the API.
The formula for calculating CBK token consumption is:
For example, if a model has an input token ratio of 0.0893 and an output token ratio of 0.5556, and a request consumes 400 input tokens and 600 output tokens:
A few important details about how token usage is recorded:
- Upstream provider usage: ChatBotKit records the actual token counts reported by the upstream provider (e.g. OpenAI, Anthropic). If the provider reports 400 input tokens, that is what gets recorded and billed.
- Cached tokens are not charged: When a provider supports prompt caching, only non-cached input tokens are counted. You are not charged for cached tokens.
- Usage log breakdown: Each usage record contains a detailed line-item breakdown showing input tokens, output tokens, and other components. Adding up all line items will match the total recorded consumption.
The input and output token ratios are derived from the market price of each model relative to one base token. A higher ratio corresponds to a more expensive model. You can retrieve the exact ratios for every model via the API or on the platform models page.
The context size refers to the maximum tokens (words or symbols) the model can consider when generating a response. A larger context size allows for more information to be taken into account, potentially leading to more accurate and relevant responses.
When choosing a model, it's essential to evaluate not just its capabilities, but also its cost and context size. Larger and more expensive models aren't always the best choice for every task. Often, a smaller model can perform equally well or even better for your specific use case. Consider starting with a cost-efficient model and scaling up only if needed.
FAQ
Can I get regional access to some models?
Yes. Some models such as Claude can be accessed within your own designated region. Please contact us for more information.
Can I bring my own model?
Our models are designed to scale no matter the circumstances. However, customers that wish to bring their own model can do so on some of our higher-tier plans such as Pro, Pro Plus and Team.
How is token usage calculated?
Each model has an input token ratio and an output token ratio. When a request completes, ChatBotKit records the actual token counts reported by the upstream provider and applies the formula:
CBK Tokens = (inputTokens x inputTokenRatio) + (outputTokens x outputTokenRatio)
Cached tokens are excluded from the input count, so you are only charged for tokens the provider actually processes. The usage log for each conversation provides a detailed line-item breakdown of all token consumption. You can find the exact input and output ratios for every model on the platform models page or via the API. Other factors such as the number of datasets, skillsets, and their types may also affect overall usage.
Bring Your Own Model
ChatBotKit offers the unique option of bringing your own model and keys to the platform. This feature is designed for those who desire more control over their models and costs. If you have a model that you've trained and perfected over time for your specific use case or requirement, you're free to bring it to our platform. This means you can use your own keys, which allows you to handle the payment for the model usage directly. This could be beneficial, especially if you have particular budget constraints or specific cost strategies. In essence, with ChatBotKit, you're not just limited to using our pre-built models, but you can also introduce your custom-made models, providing you with more flexibility and control to meet your specific needs.
Here is an outline of the steps required to create your own custom model.
- Navigate to the Bot Configuration Screen
- From the main dashboard, click on the "Bots" section in the left-hand menu.
- Select the bot you want to configure or create a new bot.
- Choose the Model
- Under the "Model" section, select "custom" from the dropdown menu.
- Press the "Settings" button.
- Model Configuration Window
- Enter the name of the model in the "Name" field (e.g. the model identifier from the provider).
- Choose the provider from the "Provider" dropdown menu (e.g. OpenAI, Anthropic, etc.).
- Provide the necessary credentials for accessing the custom model. Click on the credentials field and enter the required information.
- Define the maximum number of tokens the chatbot will use for each interaction in the "Max Tokens" field. The default value is 4096.
BYOK Caveats
When you opt to use your own key (BYOK) for model access, you assume full responsibility for the model's availability and operational limits. This shift occurs because you are no longer utilizing the default ChatBotKit service tiers, which may offer different capabilities and restrictions.
Customising Model Settings
To customize a model's settings, click on the settings icon next to the model name.
Temperature: This property determines the level of randomness or creativity in the model's responses. A higher temperature value will result in more diverse and creative responses, while a lower value will result in more conservative and predictable responses.
There are four main properties that can be customized: Max Tokens, Temperature, Interaction Max Messages, Region, Frequency Penalty, Presence Penalty, and Vision.
Max Tokens: This property determines the maximum number of tokens that the model can consume when generating a response. By default, this is set to the maximum context size for the model, but you can reduce it to limit the amount of resources used by the model. This can help save token cost but may also reduce the ability of the chatbot to keep up with the conversation.
Interaction Max Messages: The maximum number of messages to use per model interaction. Setting this value to low will make the model more deterministic. Increasing the value will result in more creativity. For Q&A-style conversation it is recommended to keep the value to 2.
Region: The region property allows you to specify the geographical region for the model. This can be particularly useful for services that have specific regional requirements or restrictions. However, it's important to note that the availability of certain models may vary depending on the region.
Frequency Penalty: This property determines how much the model penalizes the repetition of certain words or phrases in its responses. A higher frequency penalty value will result in responses that are more varied and less repetitive.
Presence Penalty: This property determines how much the model penalizes the use of certain words or phrases in its responses. A higher presence penalty value will result in responses that are less likely to contain specific words or phrases.
Vision: This property applies solely to vision models. It enables bots to utilize native vision capabilities as opposed to Skillset Vision Actions. While we generally recommend Skillset for cost-efficiency and control, there are situations where native vision capabilities may be preferred.
By customizing these properties, you can fine-tune the behavior of the model to better suit your specific use case and requirements. However, it's important to note that changing these properties can have a significant impact on the model's performance and accuracy, so it's recommended to experiment with different settings to find the best balance between performance and creativity.