Skip to content

Commit 7965581

Browse files
v1.0.6
1 parent fa3678a commit 7965581

File tree

14 files changed

+275
-135
lines changed

14 files changed

+275
-135
lines changed

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

Lines changed: 1 addition & 1 deletion
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.1
28+
- QuickBlox React UIKit library v0.2.2
2929
- React JS v.18.0
3030
- TypeScript v.4.9.3
3131

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

Lines changed: 39 additions & 39 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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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.1",
14+
"quickblox-react-ui-kit": "^0.2.2",
1515
"node-sass": "^8.0.0",
1616
"quickblox": "^2.15.5",
1717
"react": "^17.0.0 || ^18.0.0",

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ function App() {
148148
login: currentUser.login,
149149
password: currentUser.password,
150150
}}
151+
qbConfig={{...QBConfig}} // NEW !!!
151152
>
152153
<div className="App">
153154

Lines changed: 70 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,75 @@
11
export const QBConfig = {
2-
credentials: {
3-
appId: -1,
4-
accountKey: '',
5-
authKey: '',
6-
authSecret: '',
7-
sessionToken: '',
8-
},
9-
appConfig: {
10-
maxFileSize: 10 * 1024 * 1024,
11-
sessionTimeOut: 122,
12-
chatProtocol: {
13-
active: 2,
2+
credentials: {
3+
appId: -1,
4+
authKey: '',
5+
authSecret: '',
6+
accountKey: '',
7+
sessionToken: '',
148
},
15-
debug: true,
16-
endpoints: {
17-
api: 'api.quickblox.com',
18-
chat: 'chat.quickblox.com',
9+
configAIApi: {
10+
AIAnswerAssistWidgetConfig: {
11+
apiKey: '',
12+
useDefault: true,
13+
proxyConfig: {
14+
api: 'v1/chat/completions',
15+
servername: 'https://api.openai.com/',
16+
port: '',
17+
sessionToken: '',
18+
},
19+
},
20+
AITranslateWidgetConfig: {
21+
apiKey: '',
22+
useDefault: true,
23+
defaultLanguage: 'English',
24+
languages: [
25+
'English',
26+
'Spanish',
27+
'French',
28+
'Portuguese',
29+
'German',
30+
'Ukrainian',
31+
],
32+
proxyConfig: {
33+
api: 'v1/chat/completions',
34+
servername: 'https://api.openai.com/',
35+
port: '',
36+
sessionToken: '',
37+
},
38+
},
39+
AIRephraseWidgetConfig: {
40+
apiKey: '',
41+
useDefault: true,
42+
defaultTone: 'Professional',
43+
proxyConfig: {
44+
api: 'v1/chat/completions',
45+
servername: 'https://api.openai.com/',
46+
port: '',
47+
sessionToken: '',
48+
},
49+
},
1950
},
20-
on: {
21-
// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/require-await
22-
async sessionExpired(handleResponse: any, retry: any) {
23-
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
24-
console.log(`Test sessionExpired....${handleResponse} ${retry}`);
25-
},
51+
appConfig: {
52+
maxFileSize: 10 * 1024 * 1024,
53+
sessionTimeOut: 122,
54+
chatProtocol: {
55+
active: 2,
56+
},
57+
debug: true,
58+
endpoints: {
59+
api: 'api.quickblox.com',
60+
chat: 'chat.quickblox.com',
61+
},
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+
},
71+
streamManagement: {
72+
enable: true,
73+
},
2674
},
27-
streamManagement: {
28-
enable: true,
29-
},
30-
},
3175
};

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@
2222
},
2323
"include": [
2424
"src",
25-
"node_modules/quickblox-react-ui-kit/global.d.ts",
26-
"node_modules/quickblox-react-ui-kit/global.d.ts",
2725
"node_modules/artan-react-ui-sample/global.d.ts"
2826
]
2927
}

samples/react-chat-ui-kit-init-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.1",
13+
"quickblox-react-ui-kit": "^0.2.2",
1414
"quickblox": "^2.15.5",
1515
"react": "^18.2.0",
1616
"react-dom": "^18.2.0",
Lines changed: 56 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,75 @@
11
export const QBConfig = {
22
credentials: {
33
appId: -1,
4-
accountKey: '',
54
authKey: '',
65
authSecret: '',
6+
accountKey: '',
77
sessionToken: '',
88
},
9+
configAIApi: {
10+
AIAnswerAssistWidgetConfig: {
11+
apiKey: '',
12+
useDefault: true,
13+
proxyConfig: {
14+
api: 'v1/chat/completions',
15+
servername: 'https://api.openai.com/',
16+
port: '',
17+
sessionToken: '',
18+
},
19+
},
20+
AITranslateWidgetConfig: {
21+
apiKey: '',
22+
useDefault: true,
23+
defaultLanguage: 'English',
24+
languages: [
25+
'English',
26+
'Spanish',
27+
'French',
28+
'Portuguese',
29+
'German',
30+
'Ukrainian',
31+
],
32+
proxyConfig: {
33+
api: 'v1/chat/completions',
34+
servername: 'https://api.openai.com/',
35+
port: '',
36+
sessionToken: '',
37+
},
38+
},
39+
AIRephraseWidgetConfig: {
40+
apiKey: '',
41+
useDefault: true,
42+
defaultTone: 'Professional',
43+
proxyConfig: {
44+
api: 'v1/chat/completions',
45+
servername: 'https://api.openai.com/',
46+
port: '',
47+
sessionToken: '',
48+
},
49+
},
50+
},
951
appConfig: {
52+
maxFileSize: 10 * 1024 * 1024,
53+
sessionTimeOut: 122,
1054
chatProtocol: {
11-
Active: 2,
55+
active: 2,
1256
},
13-
debug: false,
57+
debug: true,
1458
endpoints: {
15-
apiEndpoint: 'https://api.quickblox.com',
16-
chatEndpoint: 'chat.quickblox.com',
59+
api: 'api.quickblox.com',
60+
chat: 'chat.quickblox.com',
1761
},
1862
on: {
63+
// eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/require-await
1964
async sessionExpired(handleResponse: any, retry: any) {
20-
console.log(`Test sessionExpired… ${handleResponse} ${retry}`);
21-
}
65+
console.log(
66+
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
67+
`QBconfig sessionExpired handle: ${handleResponse} ${retry}`,
68+
);
69+
},
2270
},
2371
streamManagement: {
24-
Enable: true,
72+
enable: true,
2573
},
2674
},
2775
};

0 commit comments

Comments
 (0)