Model
The Model page chooses the model that answers the chatbot’s visitors. Its
list holds the models of every provider with a stored
API key, and your
custom models, with a search field. The
editor proposes OpenAI’s gpt-4o-mini for a new chatbot; save the page to keep
the model you choose.
Choose with the chatbot’s job in mind. A small, fast model answers simple questions about your content well and cheaply, since every visitor message is billed by the provider along with the chatbot’s whole instruction. A larger model is worth it for questions that need reasoning across a lot of content. File search needs an OpenAI model.
A chatbot that uses a custom model reaches it as the chatbot’s author, so the model and its API key have to belong to the user who created the chatbot.
Limits on visitor requests
Visitors’ requests are checked before they reach the provider. A request must
come from a chatbot rendered on the site, and a conversation larger than
256 KiB, as JSON, is refused as too large. The sleekAi/chatbot/maxRequestBytes
filter changes that limit; see the hooks reference.
A visitor can send one chatbot 30 messages in five minutes; further messages
are refused until the five minutes are over, and the chatbot shows the
reason. Visitors are told apart by their IP address, so on a site behind a
proxy that does not pass the visitor’s address on, all visitors share one
limit. The sleekAi/chatbot/rateLimit filter changes the number, per
chatbot, and 0 removes the limit. Administrators are not limited.
All of a chatbot’s visitors together can send it 200 messages an hour and
1,000 a day, which caps what a public chatbot can cost however many visitors,
or addresses, its messages come from. The hour starts on the hour and the day
at midnight UTC; once either budget is used up, the chatbot tells every visitor
to try again later until that window ends. A message the budget refuses does
not count against it. The sleekAi/chatbot/budget filter changes either
number, per chatbot, and 0 removes that budget; administrators’ messages are
not counted. With a persistent object cache the budget is counted atomically;
without one, messages that arrive at the same moment can pass it by a few.