Skip to content

Commit 9db9f93

Browse files
v1.0.10
1 parent a45efd1 commit 9db9f93

File tree

6 files changed

+182
-29
lines changed

6 files changed

+182
-29
lines changed

samples/react-chat-ui-kit-demo-app/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ This is a code sample for [QuickBlox](http://quickblox.com/) platform. It is a g
2525
The minimum requirements for QuickBlox UIKit for React sample are:
2626

2727
- JS QuickBlox SDK v2.15.5
28-
- QuickBlox React UIKit library v0.2.3
28+
- QuickBlox React UIKit library v0.2.4
2929
- React JS v.18.0
3030
- TypeScript v.4.9.3
3131

samples/react-chat-ui-kit-demo-app/package-lock.json

+95-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

samples/react-chat-ui-kit-demo-app/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-chat",
3-
"version": "1.0.9",
3+
"version": "1.0.10",
44
"private": true,
55
"dependencies": {
66
"@emotion/react": "^11.11.0",
@@ -11,7 +11,7 @@
1111
"@types/node": "^16.18.28",
1212
"@types/react": "^18.2.6",
1313
"@types/react-dom": "^18.2.4",
14-
"quickblox-react-ui-kit": "^0.2.3",
14+
"quickblox-react-ui-kit": "^0.2.4",
1515
"node-sass": "^8.0.0",
1616
"quickblox": "^2.16.0",
1717
"react": "^17.0.0 || ^18.0.0",

samples/react-chat-ui-kit-demo-app/src/App.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,8 @@ function App() {
109109

110110
const handleError = (error: any): void => {
111111
console.log('error:', JSON.stringify(error));
112-
setErrorMessage(error.message.errors[0]);
112+
const errorToShow = error.message.errors[0] || 'Unexpected error';
113+
setErrorMessage(errorToShow );
113114
setUserAuthorized(false);
114115
navigate('/sign-in');
115116
};

samples/react-chat-ui-kit-demo-app/src/QBconfig.ts

+80-14
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export const QBConfig: QBConfig = {
1+
export const QBConfig = {
22
credentials: {
33
appId: -1,
44
accountKey: '',
@@ -8,43 +8,109 @@ export const QBConfig: QBConfig = {
88
},
99
configAIApi: {
1010
AIAnswerAssistWidgetConfig: {
11+
organizationName: 'Quickblox',
12+
openAIModel: 'gpt-3.5-turbo',
1113
apiKey: '',
14+
maxTokens: 3584,
1215
useDefault: true,
1316
proxyConfig: {
1417
api: 'v1/chat/completions',
1518
servername: 'https://api.openai.com/',
1619
port: '',
17-
sessionToken: '',
1820
},
1921
},
2022
AITranslateWidgetConfig: {
23+
organizationName: 'Quickblox',
24+
openAIModel: 'gpt-3.5-turbo',
2125
apiKey: '',
26+
maxTokens: 3584,
2227
useDefault: true,
23-
defaultLanguage: 'English',
24-
languages: [
25-
'English',
26-
'Spanish',
27-
'French',
28-
'Portuguese',
29-
'German',
30-
'Ukrainian',
31-
],
28+
defaultLanguage: 'Ukrainian',
29+
languages: ['Ukrainian', 'English', 'French', 'Portuguese', 'German'],
3230
proxyConfig: {
3331
api: 'v1/chat/completions',
34-
servername: 'https://api.openai.com/',
32+
servername: '',
3533
port: '',
36-
sessionToken: '',
3734
},
35+
// proxyConfig: {
36+
// api: 'v1/chat/completions',
37+
// servername: 'http://localhost',
38+
// port: '3012',
39+
// },
3840
},
3941
AIRephraseWidgetConfig: {
42+
organizationName: 'Quickblox',
43+
openAIModel: 'gpt-3.5-turbo',
4044
apiKey: '',
45+
maxTokens: 3584,
4146
useDefault: true,
4247
defaultTone: 'Professional',
48+
Tones: [
49+
{
50+
name: 'Professional Tone',
51+
description:
52+
'This would edit messages to sound more formal, using technical vocabulary, clear sentence structures, and maintaining a respectful tone. It would avoid colloquial language and ensure appropriate salutations and sign-offs',
53+
iconEmoji: '👔',
54+
},
55+
{
56+
name: 'Friendly Tone',
57+
description:
58+
'This would adjust messages to reflect a casual, friendly tone. It would incorporate casual language, use emoticons, exclamation points, and other informalities to make the message seem more friendly and approachable.',
59+
iconEmoji: '🤝',
60+
},
61+
{
62+
name: 'Encouraging Tone',
63+
description:
64+
'This tone would be useful for motivation and encouragement. It would include positive words, affirmations, and express support and belief in the recipient.',
65+
iconEmoji: '💪',
66+
},
67+
{
68+
name: 'Empathetic Tone',
69+
description:
70+
'This tone would be utilized to display understanding and empathy. It would involve softer language, acknowledging feelings, and demonstrating compassion and support.',
71+
iconEmoji: '🤲',
72+
},
73+
{
74+
name: 'Neutral Tone',
75+
description:
76+
'For times when you want to maintain an even, unbiased, and objective tone. It would avoid extreme language and emotive words, opting for clear, straightforward communication.',
77+
iconEmoji: '😐',
78+
},
79+
{
80+
name: 'Assertive Tone',
81+
description:
82+
'This tone is beneficial for making clear points, standing ground, or in negotiations. It uses direct language, is confident, and does not mince words.',
83+
iconEmoji: '🔨',
84+
},
85+
{
86+
name: 'Instructive Tone',
87+
description:
88+
'This tone would be useful for tutorials, guides, or other teaching and training materials. It is clear, concise, and walks the reader through steps or processes in a logical manner.',
89+
iconEmoji: '📖',
90+
},
91+
{
92+
name: 'Persuasive Tone',
93+
description:
94+
'This tone can be used when trying to convince someone or argue a point. It uses persuasive language, powerful words, and logical reasoning.',
95+
iconEmoji: '☝️',
96+
},
97+
{
98+
name: 'Sarcastic/Ironic Tone',
99+
description:
100+
'This tone can make the communication more humorous or show an ironic stance. It is harder to implement as it requires the AI to understand nuanced language and may not always be taken as intended by the reader.',
101+
iconEmoji: '😏',
102+
},
103+
{
104+
name: 'Poetic Tone',
105+
description:
106+
'This would add an artistic touch to messages, using figurative language, rhymes, and rhythm to create a more expressive text.',
107+
iconEmoji: '🎭',
108+
},
109+
],
43110
proxyConfig: {
44111
api: 'v1/chat/completions',
45112
servername: 'https://api.openai.com/',
46113
port: '',
47-
sessionToken: '',
48114
},
49115
},
50116
},

samples/react-chat-ui-kit-demo-app/src/layout/Auth/Auth.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ const Auth = ({children} : AuthProps) => {
5656
</div>
5757
<div className="login__footer">
5858
<div className="footer__logo_wrap">
59-
<p>Sample React Chat UIKit DemoApp v1.0.9</p>
59+
<p>Sample React Chat UIKit DemoApp v1.0.10</p>
6060
<br />
61-
<p>React Chat UIKit v0.2.3</p>
61+
<p>React Chat UIKit v0.2.4</p>
6262
<br />
6363
<p><Copyright /></p>
6464
</div>

0 commit comments

Comments
 (0)