Skip to content

Commit

Permalink
v1.0.10
Browse files Browse the repository at this point in the history
  • Loading branch information
Artem-K-Koltunov committed Oct 11, 2023
1 parent a45efd1 commit 9db9f93
Show file tree
Hide file tree
Showing 6 changed files with 182 additions and 29 deletions.
2 changes: 1 addition & 1 deletion samples/react-chat-ui-kit-demo-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ This is a code sample for [QuickBlox](http://quickblox.com/) platform. It is a g
The minimum requirements for QuickBlox UIKit for React sample are:

- JS QuickBlox SDK v2.15.5
- QuickBlox React UIKit library v0.2.3
- QuickBlox React UIKit library v0.2.4
- React JS v.18.0
- TypeScript v.4.9.3

Expand Down
104 changes: 95 additions & 9 deletions samples/react-chat-ui-kit-demo-app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions samples/react-chat-ui-kit-demo-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-chat",
"version": "1.0.9",
"version": "1.0.10",
"private": true,
"dependencies": {
"@emotion/react": "^11.11.0",
Expand All @@ -11,7 +11,7 @@
"@types/node": "^16.18.28",
"@types/react": "^18.2.6",
"@types/react-dom": "^18.2.4",
"quickblox-react-ui-kit": "^0.2.3",
"quickblox-react-ui-kit": "^0.2.4",
"node-sass": "^8.0.0",
"quickblox": "^2.16.0",
"react": "^17.0.0 || ^18.0.0",
Expand Down
3 changes: 2 additions & 1 deletion samples/react-chat-ui-kit-demo-app/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ function App() {

const handleError = (error: any): void => {
console.log('error:', JSON.stringify(error));
setErrorMessage(error.message.errors[0]);
const errorToShow = error.message.errors[0] || 'Unexpected error';
setErrorMessage(errorToShow );
setUserAuthorized(false);
navigate('/sign-in');
};
Expand Down
94 changes: 80 additions & 14 deletions samples/react-chat-ui-kit-demo-app/src/QBconfig.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const QBConfig: QBConfig = {
export const QBConfig = {
credentials: {
appId: -1,
accountKey: '',
Expand All @@ -8,43 +8,109 @@ export const QBConfig: QBConfig = {
},
configAIApi: {
AIAnswerAssistWidgetConfig: {
organizationName: 'Quickblox',
openAIModel: 'gpt-3.5-turbo',
apiKey: '',
maxTokens: 3584,
useDefault: true,
proxyConfig: {
api: 'v1/chat/completions',
servername: 'https://api.openai.com/',
port: '',
sessionToken: '',
},
},
AITranslateWidgetConfig: {
organizationName: 'Quickblox',
openAIModel: 'gpt-3.5-turbo',
apiKey: '',
maxTokens: 3584,
useDefault: true,
defaultLanguage: 'English',
languages: [
'English',
'Spanish',
'French',
'Portuguese',
'German',
'Ukrainian',
],
defaultLanguage: 'Ukrainian',
languages: ['Ukrainian', 'English', 'French', 'Portuguese', 'German'],
proxyConfig: {
api: 'v1/chat/completions',
servername: 'https://api.openai.com/',
servername: '',
port: '',
sessionToken: '',
},
// proxyConfig: {
// api: 'v1/chat/completions',
// servername: 'http://localhost',
// port: '3012',
// },
},
AIRephraseWidgetConfig: {
organizationName: 'Quickblox',
openAIModel: 'gpt-3.5-turbo',
apiKey: '',
maxTokens: 3584,
useDefault: true,
defaultTone: 'Professional',
Tones: [
{
name: 'Professional Tone',
description:
'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',
iconEmoji: '👔',
},
{
name: 'Friendly Tone',
description:
'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.',
iconEmoji: '🤝',
},
{
name: 'Encouraging Tone',
description:
'This tone would be useful for motivation and encouragement. It would include positive words, affirmations, and express support and belief in the recipient.',
iconEmoji: '💪',
},
{
name: 'Empathetic Tone',
description:
'This tone would be utilized to display understanding and empathy. It would involve softer language, acknowledging feelings, and demonstrating compassion and support.',
iconEmoji: '🤲',
},
{
name: 'Neutral Tone',
description:
'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.',
iconEmoji: '😐',
},
{
name: 'Assertive Tone',
description:
'This tone is beneficial for making clear points, standing ground, or in negotiations. It uses direct language, is confident, and does not mince words.',
iconEmoji: '🔨',
},
{
name: 'Instructive Tone',
description:
'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.',
iconEmoji: '📖',
},
{
name: 'Persuasive Tone',
description:
'This tone can be used when trying to convince someone or argue a point. It uses persuasive language, powerful words, and logical reasoning.',
iconEmoji: '☝️',
},
{
name: 'Sarcastic/Ironic Tone',
description:
'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.',
iconEmoji: '😏',
},
{
name: 'Poetic Tone',
description:
'This would add an artistic touch to messages, using figurative language, rhymes, and rhythm to create a more expressive text.',
iconEmoji: '🎭',
},
],
proxyConfig: {
api: 'v1/chat/completions',
servername: 'https://api.openai.com/',
port: '',
sessionToken: '',
},
},
},
Expand Down
4 changes: 2 additions & 2 deletions samples/react-chat-ui-kit-demo-app/src/layout/Auth/Auth.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ const Auth = ({children} : AuthProps) => {
</div>
<div className="login__footer">
<div className="footer__logo_wrap">
<p>Sample React Chat UIKit DemoApp v1.0.9</p>
<p>Sample React Chat UIKit DemoApp v1.0.10</p>
<br />
<p>React Chat UIKit v0.2.3</p>
<p>React Chat UIKit v0.2.4</p>
<br />
<p><Copyright /></p>
</div>
Expand Down

0 comments on commit 9db9f93

Please sign in to comment.