Skip to content

Commit e949795

Browse files
react ui kit demo v1.0.11
1 parent 673905f commit e949795

File tree

10 files changed

+198
-66
lines changed

10 files changed

+198
-66
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
+ [2.1 Get application credentials](#21-get-application-credentials)
1111
+ [2.2 Set application credentials](#22-set-application-credentials)
1212
+ [2.3 Run the application](#23-run-the-application)
13-
- [Documentation](#documentation)
13+
- [Documentation and video guides](#documentation)
1414
- [License](#license)
1515

1616
# About
@@ -110,10 +110,10 @@ Before run a code sample:
110110

111111
Run `npm start` for a dev server. Navigate to `http://localhost:3000/`. The app will automatically reload if you change any of the source files.
112112

113-
# Documentation
113+
# Documentation and video guides
114114
[](#documentation)
115115
Sample documentation is available [here](https://docs.quickblox.com/docs/react-uikit).
116-
116+
Video guide "How to use AI Assistant" is available [here](https://youtu.be/BneMtDagOy4)
117117
# License
118118
[](#license)
119119
MIT License [here](https://github.com/QuickBlox/react-ui-kit/blob/main/LICENSE.md).

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

Lines changed: 14 additions & 14 deletions
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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-chat",
3-
"version": "1.0.10",
3+
"version": "1.0.11",
44
"private": true,
55
"dependencies": {
66
"@emotion/react": "^11.11.0",
@@ -11,9 +11,9 @@
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.4",
14+
"quickblox-react-ui-kit": "^0.2.5",
1515
"node-sass": "^8.0.0",
16-
"quickblox": "^2.16.0",
16+
"quickblox": "^2.16.1",
1717
"react": "^17.0.0 || ^18.0.0",
1818
"react-dom": "^17.0.0 || ^18.0.0",
1919
"react-router-dom": "^6.4.3",

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

Lines changed: 2 additions & 2 deletions
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.10</p>
59+
<p>Sample React Chat UIKit DemoApp v1.0.11</p>
6060
<br />
61-
<p>React Chat UIKit v0.2.4</p>
61+
<p>React Chat UIKit v0.2.5</p>
6262
<br />
6363
<p><Copyright /></p>
6464
</div>

samples/react-chat-ui-kit-init-sample/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
"@types/node": "^16.18.37",
1111
"@types/react": "^18.2.14",
1212
"@types/react-dom": "^18.2.6",
13-
"quickblox-react-ui-kit": "^0.2.3",
14-
"quickblox": "^2.16.0",
13+
"quickblox-react-ui-kit": "^0.2.5",
14+
"quickblox": "^2.16.1",
1515
"react": "^18.2.0",
1616
"react-dom": "^18.2.0",
1717
"react-scripts": "5.0.1",

samples/react-chat-ui-kit-init-with-ai-sample/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
"@types/node": "^16.18.37",
1111
"@types/react": "^18.2.14",
1212
"@types/react-dom": "^18.2.6",
13-
"quickblox-react-ui-kit": "^0.2.3",
14-
"quickblox": "^2.16.0",
13+
"quickblox-react-ui-kit": "^0.2.5",
14+
"quickblox": "^2.16.1",
1515
"react": "^18.2.0",
1616
"react-dom": "^18.2.0",
1717
"react-scripts": "5.0.1",

samples/react-chat-ui-kit-init-with-ai-sample/src/QBconfig.ts

Lines changed: 88 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,43 +8,109 @@ export const 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
},
@@ -59,15 +125,15 @@ export const QBConfig = {
59125
api: 'api.quickblox.com',
60126
chat: 'chat.quickblox.com',
61127
},
62-
on: {
63-
// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/require-await
64-
async sessionExpired(handleResponse: any, retry: any) {
65-
console.log(
66-
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
67-
`QBconfig sessionExpired handle: ${handleResponse} ${retry}`,
68-
);
69-
},
70-
},
128+
// on: {
129+
// // eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/require-await
130+
// async sessionExpired(handleResponse: any, retry: any) {
131+
// console.log(
132+
// // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
133+
// `QBconfig sessionExpired handle: ${handleResponse} ${retry}`,
134+
// );
135+
// },
136+
// },
71137
streamManagement: {
72138
enable: true,
73139
},

samples/react-chat-ui-kit-init-with-token-sample/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"@types/node": "^16.18.37",
1111
"@types/react": "^18.2.14",
1212
"@types/react-dom": "^18.2.6",
13-
"quickblox-react-ui-kit": "^0.2.3",
13+
"quickblox-react-ui-kit": "^0.2.5",
1414
"quickblox": "^2.16.1",
1515
"react": "^18.2.0",
1616
"react-dom": "^18.2.0",

samples/react-chat-ui-kit-init-with-token-sample/src/App.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ import './App.css';
1414
function App() {
1515

1616
const currentUser: LoginData = {
17-
login: 'artik1',
18-
password: 'quickblox',
17+
login: 'USER1',
18+
password: 'YOU_USER1_PASSWORD',
1919
};
2020

2121
const qbUIKitContext: QBDataContextType = useQbUIKitDataContext();
@@ -38,8 +38,8 @@ function App() {
3838

3939

4040
const userRequiredParams = {
41-
'login': 'anruaav2',
42-
'password': 'quickblox'
41+
'login': 'USER2_FOR_WORK',
42+
'password': 'YOU_USER2_PASSWORD'
4343
};
4444

4545
return new Promise(function(resolve, reject) {

0 commit comments

Comments
 (0)