You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[QBAITranslate Swift Package](https://github.com/QuickBlox/QBAITranslate)
496
+
497
+
## Rephrase
498
+
499
+
The AI Rephrase feature in QuickBloxUIKit empowers you to seamlessly integrate AI Rephrase capabilities into your chat-based application using the [QBAIRephrase Swift package](https://github.com/QuickBlox/ios-ai-rephrase). This feature leverages the OpenAI [API key](https://platform.openai.com/account/api-keys) or [proxy server](https://github.com/QuickBlox/qb-ai-assistant-proxy-server) to generate responses more securely and efficiently.
500
+
501
+
[block:image]
502
+
{
503
+
"images": [
504
+
{
505
+
"image": [
506
+
"https://files.readme.io/d40175f-IMG_1221.PNG",
507
+
"",
508
+
""
509
+
],
510
+
"align": "center",
511
+
"sizing": "400px",
512
+
"border": true
513
+
}
514
+
]
515
+
}
516
+
[/block]
517
+
518
+
The AI Rephrase library allows you to rephrase a message using different tones so that the user can communicate effectively in different situations.
519
+
520
+
### How to Use
521
+
522
+
To use the AI Rephrase feature in your QuickBloxUIKit project, follow these steps:
523
+
524
+
1. Enable the AI Rephrase feature:
525
+
526
+
```swift
527
+
QuickBloxUIKit.feature.ai.rephrase.enable=true
528
+
```
529
+
530
+
If this option is enabled, the user interface provides a clear option or menu that allows the user to select the desired tone.
531
+
532
+
[block:image]
533
+
{
534
+
"images": [
535
+
{
536
+
"image": [
537
+
"https://files.readme.io/05dd773-IMG_1221.jpeg",
538
+
"",
539
+
""
540
+
],
541
+
"align": "center",
542
+
"sizing": "400px",
543
+
"border": true
544
+
}
545
+
]
546
+
}
547
+
[/block]
548
+
549
+
Once a tone is selected, the message is rephrased to reflect the characteristics of the selected tone.
550
+
A paraphrased message retains the main purpose of the original message.
551
+
552
+
[block:image]
553
+
{
554
+
"images": [
555
+
{
556
+
"image": [
557
+
"https://files.readme.io/14de923-IMG_1222.jpeg",
558
+
"",
559
+
""
560
+
],
561
+
"align": "center",
562
+
"sizing": "400px",
563
+
"border": true
564
+
}
565
+
]
566
+
}
567
+
[/block]
568
+
569
+
Users have the ability to seamlessly switch between different tones without having to rewrite the original message.
570
+
571
+
[block:image]
572
+
{
573
+
"images": [
574
+
{
575
+
"image": [
576
+
"https://files.readme.io/a48525c-IMG_1223.jpeg",
577
+
"",
578
+
""
579
+
],
580
+
"align": "center",
581
+
"sizing": "400px",
582
+
"border": true
583
+
}
584
+
]
585
+
}
586
+
[/block]
587
+
588
+
After rephrasing a message, the user is given an easily accessible option to return to the original.
589
+
Clicking on this "Back to original" option will instantly restore the message to its original state.
590
+
591
+
[block:image]
592
+
{
593
+
"images": [
594
+
{
595
+
"image": [
596
+
"https://files.readme.io/c254562-IMG_1221.jpeg",
597
+
"",
598
+
""
599
+
],
600
+
"align": "center",
601
+
"sizing": "400px",
602
+
"border": true
603
+
}
604
+
]
605
+
}
606
+
[/block]
607
+
608
+
2. Set up the AI settings by providing either the OpenAI [API key](https://platform.openai.com/account/api-keys):
> 👍 We recommend using a proxy server like the [QuickBlox AI Assistant Proxy Server](https://github.com/QuickBlox/qb-ai-assistant-proxy-server) offers significant benefits in terms of security and functionality:
621
+
>
622
+
> - 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.
623
+
> - 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.
624
+
625
+
3. 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.
Once removed, the default tone will no longer be available to end users.
643
+
644
+
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.
645
+
For additional resources, explore the QuickBlox AI Assistant Proxy Server and the QBAIRephrase Swift package repositories.
-**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.
655
+
-**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.
656
+
-**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.
657
+
-**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.
658
+
-**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.
659
+
-**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.
660
+
-**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.
661
+
-**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.
662
+
-**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.
663
+
-**Poetic Tone:** This will add an artistic touch to messages by using figurative language, rhyme, and rhythm to create more expressive text.
0 commit comments