Cabi.Chat Oracles — Website widget

A website widget is an oracle that lives on your own site or in your app: a visitor types a question, and the oracle answers from your project's graph. Cabi.Chat Graph — Oracles™

Two hosting modes

Platform hosted. Cabi.Chat runs the widget for you on Spectral, the platform's plugin system. The platform keeps its token, so you never handle it. Spectral — plugins via the Telegram bot emulator

Self hosted. You run the chat surface yourself: a chat box on your site, a form in your app, a support bot of your own. Your server passes each visitor message to the oracle with one API call and shows the answer.

Either way the oracle runs on Cabi.Chat over the widget's agenda, with the same models as any oracle. Only a widget can be self-hosted; Telegram accounts and bots are always platform hosted.

Set it up

  1. In Cabinet, create an oracle of kind Cabi.Chat widget: pick the project, choose the hosting, pick a firmware agenda. Cabi.Chat Ignite — Agendas
  2. Self hosted: copy the access token. It is shown once. Lost it? Regenerate: the old token stops working at once.
  3. Start the oracle.

Calling it (self hosted). One call per visitor message: POST /v0/call-ai on the API, with the widget's access token as the bearer and a body of:

The reply carries the answer text (empty when nothing should be sent), the model that wrote it and the tokens used. Keep the visitor id stable: the same id continues the same conversation; give each real visitor one id. The token is bound to its widget and does not work for another oracle.

The same token opens the Cabi.Chat API as the widget's agenda: Cabi.Chat API — Apps

Mentioned