Skip to main content

Overview

Starting from version 2.17.0 of JavaScript SDK, the AI functionality is enabled and based on AI Agents. The QuickBlox JavaScript SDK provides a range of features to enhance the chat experience. With essential messaging functionalities such as answer assistant, users can engage in more interactive conversations. Supported features

Requirements

The minimum requirements for using AI features are:
  • JS QuickBlox SDK v2.17.0 (for AI Answer Assist and AI Translate)
  • JS QuickBlox SDK v2.21.5 (for AI Gateway and AI Summarize)
  • QuickBlox account with activated AI Agents
Visit Key Concepts page to learn the most important QuickBlox concepts. Visit AI Agent overview page to learn the most important AI Agents concepts.

Before you begin

  1. Register a QuickBlox account. This is a matter of a few minutes and you will be able to use this account to build your apps.
  2. Configure QuickBlox SDK for your app. Check out Setup page for more details.
  3. Create a user session to be able to use QuickBlox functionality. See Authentication page to learn how to do it.
  4. Create or update your AI Agent. See AI Agent documentation to learn how to do it.

Enable AI Extensions

  1. Navigate to the Dashboard => YOUR_APP => AI Extensions page.
  2. Select the checkboxes for the features you want to enable.
  3. Click the Save button to save changes.
Enable AI Extensions

Get AI Agent ID

To get the AI Agent ID, navigate to the Dashboard => YOUR_APP => AI Agent page. The ID is displayed in the list of assistants.
AI Agent list with IDs

AI Answer Assist

QuickBlox AI Answer Assist generates a contextually relevant draft response based on the chat history. Use it to suggest replies that match the conversation context.
JavaScript

AI Translate

QuickBlox offers translation functionality that helps users easily translate text messages in chat, taking into account the context of the chat history.
TypeScript

AI Gateway

Available starting from SDK version 2.21.5
QuickBlox AI Gateway provides multimodal AI capabilities with support for text and images using OpenAI-compatible message format. This feature allows you to send complex requests including image recognition, multi-turn conversations, and system prompts. Basic text message:
JavaScript
Image recognition:
JavaScript
Multi-turn conversation with system prompt:
JavaScript
Arguments Message structure Each message in the messages array should have the following structure: Content item types: Text content:
Image content:
Images can be provided as URLs or base64 data URIs (e.g., data:image/jpeg;base64,...).

AI Summarize

Available starting from SDK version 2.21.5
QuickBlox AI Summarize generates a summary of dialog messages. This feature is useful for quickly understanding the context of a conversation without reading all messages.
JavaScript
Arguments Response The response object contains a summary field with the generated summary text:
  • AI Summarize processes up to 1,000 most recent messages in the dialog.
  • For empty dialogs, the response will be { summary: "Chat is empty." }.
  • The user must have access to the dialog to summarize it.