genassist-chat-react 1.0.32-rc.3 → 1.0.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -7
- package/dist/components/GenAgentChat.js +54 -33
- package/dist/hooks/useChat.d.ts +3 -2
- package/dist/hooks/useChat.js +75 -41
- package/dist/services/audioService.d.ts +0 -2
- package/dist/services/audioService.js +3 -10
- package/dist/services/chatService.d.ts +11 -3
- package/dist/services/chatService.js +77 -19
- package/dist/types/index.d.ts +7 -2
- package/dist/types/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -19,8 +19,8 @@ import { GenAgentChat } from 'genassist-chat-react';
|
|
|
19
19
|
function App() {
|
|
20
20
|
return (
|
|
21
21
|
<div style={{ height: '600px', width: '400px' }}>
|
|
22
|
-
<GenAgentChat
|
|
23
|
-
baseUrl="https://your-api-base-url.com"
|
|
22
|
+
<GenAgentChat
|
|
23
|
+
baseUrl="https://your-api-base-url.com"
|
|
24
24
|
apiKey="your-api-key"
|
|
25
25
|
tenant="your-tenant-id"
|
|
26
26
|
/>
|
|
@@ -56,8 +56,8 @@ function App() {
|
|
|
56
56
|
|
|
57
57
|
return (
|
|
58
58
|
<div style={{ height: '600px', width: '400px' }}>
|
|
59
|
-
<GenAgentChat
|
|
60
|
-
baseUrl="https://your-api-base-url.com"
|
|
59
|
+
<GenAgentChat
|
|
60
|
+
baseUrl="https://your-api-base-url.com"
|
|
61
61
|
apiKey="your-api-key"
|
|
62
62
|
tenant="your-tenant-id"
|
|
63
63
|
userData={userData}
|
|
@@ -66,7 +66,6 @@ function App() {
|
|
|
66
66
|
reCaptchaKey={your-recaptcha-site-key}
|
|
67
67
|
headerTitle="Customer Support"
|
|
68
68
|
placeholder="Ask a question..."
|
|
69
|
-
inputDisclaimer="Agent can make mistakes"
|
|
70
69
|
onError={() => {}}
|
|
71
70
|
onTakeover={handleTakeover}
|
|
72
71
|
noColorAnimation={false}
|
|
@@ -97,7 +96,6 @@ export default App;
|
|
|
97
96
|
| serverUnavailableMessage | string | No | 'The agent is currently offline, please check back later. Thank you!' | Custom message for when agent is offline (Agent is off or server is down) |
|
|
98
97
|
| serverUnavailableContactUrl | string | No | - | Url to redirect user for contact support |
|
|
99
98
|
| serverUnavailableContactLabel | string | No | Contact support | Label for contact support |
|
|
100
|
-
| inputDisclaimer | string | No | Agent can make mistakes. Check important info. | Disclaimer for agent information |
|
|
101
99
|
| useWS | boolean | false | true | 'Enable or disable websocket...' |
|
|
102
100
|
| useAudio | boolean | false | false | 'Enable or disable audio on chat input...' |
|
|
103
101
|
| useFile | boolean | false | false | 'Enable or disable file attachments on chat input...' |
|
|
@@ -124,7 +122,7 @@ The component interacts with the following endpoints:
|
|
|
124
122
|
|
|
125
123
|
1. Start Conversation: `POST /api/conversations/in-progress/start`
|
|
126
124
|
2. Update Conversation: `POST /api/conversations/in-progress/update/{conversation_id}`
|
|
127
|
-
3. WebSocket:
|
|
125
|
+
3. WebSocket: `/api/conversations/ws/{conversation_id}?access_token={token}&lang=en&topics=message&topics=takeover`
|
|
128
126
|
|
|
129
127
|
## Run
|
|
130
128
|
./
|