AI Features
Overview
QuickBloxUIKit comes with a range of AI features that enhance the capabilities of your chat application. These AI features leverage cutting-edge technologies to assist users, translate messages, summarize content, and more.
Feature | Group Dialog | Private Dialog |
---|---|---|
Assist Answer | ✓ | ✓ |
Translate | ✓ | ✓ |
Rephrase | ✓ | ✓ |
Assist Answer
The AI Assist Answer feature in QuickBloxUIKit allows you to generate answers in a chat based on the chat history using the QBAIAnswerAssistant Swift package. This feature leverages the OpenAI API key or proxy server to generate responses more securely and efficiently.

How to use
To use the AI Assist Answer feature in your QuickBloxUIKit project, follow these steps:
- Enable the AI Assist Answer feature:
QuickBloxUIKit.feature.ai.assistAnswer.enable = true
If enabled, a button will appear next to each incoming message in the chat interface.

When the button is clicked, the Assist Answer feature will be launched, and a response will be generated based on the chat history.

-
Set up the AI settings by providing either the OpenAI API key:
QuickBloxUIKit.feature.ai.assistAnswer.openAIAPIKey = "YOUR_OPENAI_API_KEY"
Or set up with a proxy server:
QuickBloxUIKit.feature.ai.assistAnswer.proxyServerURLPath = "https://your-proxy-server-url"
We recommend using a proxy server like the QuickBlox AI Assistant Proxy Server offers significant benefits in terms of security and functionality:
- When making direct requests to the OpenAI API from the client-side, sensitive information like API keys may be exposed. By using a proxy server, the API keys are securely stored on the server-side, reducing the risk of unauthorized access or potential breaches.
- The proxy server can implement access control mechanisms, ensuring that only authenticated and authorized users with valid QuickBlox user tokens can access the OpenAI API. This adds an extra layer of security to the communication.
Translate
The AI Translate feature in QuickBloxUIKit empowers you to seamlessly integrate AI translation capabilities into your chat-based application using the QBAITranslate Swift package. This feature leverages the OpenAI API key or proxy server to generate responses more securely and efficiently.

How to Use
To use the AI Translate feature in your QuickBloxUIKit project, follow these steps:
- Enable the AI Translate feature:
QuickBloxUIKit.feature.ai.translate.enable = true
If this option is enabled, the "Show translation" button will be displayed at the bottom of every incoming message in the chat interface.

When you click on it, this message will be translated into the language set for translation, and the "Show original" button will be displayed, when clicked, the text of the message will immediately take the original version.

-
Set up the AI settings by providing either the OpenAI API key:
QuickBloxUIKit.feature.ai.translate.openAIAPIKey = "YOUR_OPENAI_API_KEY"
Or set up with a proxy server:
QuickBloxUIKit.feature.ai.translate.proxyServerURLPath = "https://your-proxy-server-url"
We recommend using a proxy server like the QuickBlox AI Assistant Proxy Server offers significant benefits in terms of security and functionality:
- When making direct requests to the OpenAI API from the client-side, sensitive information like API keys may be exposed. By using a proxy server, the API keys are securely stored on the server-side, reducing the risk of unauthorized access or potential breaches.
- The proxy server can implement access control mechanisms, ensuring that only authenticated and authorized users with valid QuickBlox user tokens can access the OpenAI API. This adds an extra layer of security to the communication.
- Set the translation language (default is English):
QuickBloxUIKit.feature.ai.translate.setCustom(language: .spanish)
Incorporate AI Translate into your iOS chat application seamlessly using the QBAITranslate Swift package. Unlock the potential of AI-driven interactions and provide your users with real-time translation capabilities, enhancing user communication and experience.
For additional resources, explore the QuickBlox AI Assistant Proxy Server and the QBAITranslate Swift package repositories.
Resources:
Rephrase
The AI Rephrase feature in QuickBloxUIKit empowers you to seamlessly integrate AI Rephrase capabilities into your chat-based application using the QBAIRephrase Swift package. This feature leverages the OpenAI API key or proxy server to generate responses more securely and efficiently.

The AI Rephrase library allows you to rephrase a message using different tones so that the user can communicate effectively in different situations.
How to Use
To use the AI Rephrase feature in your QuickBloxUIKit project, follow these steps:
- Enable the AI Rephrase feature:
QuickBloxUIKit.feature.ai.rephrase.enable = true
If this option is enabled, the user interface provides a clear option or menu that allows the user to select the desired tone.

Once a tone is selected, the message is rephrased to reflect the characteristics of the selected tone.
A paraphrased message retains the main purpose of the original message.

Users have the ability to seamlessly switch between different tones without having to rewrite the original message.

After rephrasing a message, the user is given an easily accessible option to return to the original.
Clicking on this "Back to original" option will instantly restore the message to its original state.

-
Set up the AI settings by providing either the OpenAI API key:
QuickBloxUIKit.feature.ai.translate.openAIAPIKey = "YOUR_OPENAI_API_KEY"
Or set up with a proxy server:
QuickBloxUIKit.feature.ai.translate.proxyServerURLPath = "https://your-proxy-server-url"
We recommend using a proxy server like the QuickBlox AI Assistant Proxy Server offers significant benefits in terms of security and functionality:
- When making direct requests to the OpenAI API from the client-side, sensitive information like API keys may be exposed. By using a proxy server, the API keys are securely stored on the server-side, reducing the risk of unauthorized access or potential breaches.
- The proxy server can implement access control mechanisms, ensuring that only authenticated and authorized users with valid QuickBlox user tokens can access the OpenAI API. This adds an extra layer of security to the communication.
- A developer using the AI Rephrase library has the ability to add custom ringtones to provide a more personalized experience for users. The developer will be able to define the name and behavior of a custom tone.
let customTone = QBAIRephrase.ToneInfo(name: "Custom Tone", behavior: "Custom behavior", icon: "🦊")
QuickBloxUIKit.feature.ai.rephrase.append(tone: customTone)
Custom tone, if selected, rephrases messages according to the specified behavior.
- A developer using the AI Rephrase library has the ability to remove tones to tailor the user interface for their application.
QuickBloxUIKit.feature.ai.rephrase.remove(tone: QBAIRephrase.ToneInfo.sarcastic)
Once removed, the default tone will no longer be available to end users.
Incorporate AI Rephrase into your iOS chat application seamlessly using the QBAIRephrase Swift package. Unlock the potential of AI-driven interactions and provide your users with real-time translation capabilities, enhancing user communication and experience.
For additional resources, explore the QuickBlox AI Assistant Proxy Server and the QBAIRephrase Swift package repositories.
Resources:
Default tones
- Professional tone: This will allow you to edit messages to sound more formal, using technical language, clear sentence structures, and maintaining a respectful tone. This would avoid colloquial language and ensure appropriate greetings and signatures.
- Friendly Tone: This will allow you to tailor your messages to reflect a casual, friendly tone. It will include casual language, use emoticons, exclamation points and other informal elements to make the message seem more friendly and approachable.
- Encouraging tone: This tone will be useful for motivation and encouragement. It will include positive words, affirmations and express support and faith in the recipient.
- Empathic Tone: This tone will be used to show understanding and empathy. This will require softer language, acknowledgment of feelings, and demonstrations of compassion and support.
- Neutral Tone: For when you want to maintain an even, impartial and objective tone. He will avoid harsh statements and emotional words, preferring clear and direct communication.
- Assertive Tone: This tone is useful for making a clear statement, asserting a position, or in negotiations. He uses direct speech, is confident and does not soften his words.
- Instructive Tone: This tone would be useful for tutorials, guides, or other teaching and learning materials. It is clear, concise and logically guides the reader through the steps or processes.
- Persuasive Tone: This tone can be used when trying to convince someone or to argue your point. He uses persuasive language, strong words and logical reasoning.
- Sarcastic/Ironic Tone: This tone can make the communication more humorous or convey an ironic attitude. It is more difficult to implement because it requires the AI to understand the nuances of the language and may not always be perceived by the reader as intended.
- Poetic Tone: This will add an artistic touch to messages by using figurative language, rhyme, and rhythm to create more expressive text.
Updated 10 days ago