You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+27-4Lines changed: 27 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,13 +31,36 @@ To integrate Sendbird AI Agent into your application, follow these steps:
31
31
32
32
## Repository Structure
33
33
34
-
This repository contains platform-specific implementations of the Sendbird AI Agent:
34
+
This repository contains platform-specific implementations and customer guides for the Sendbird AI Agent:
35
35
36
-
-**iOS**: Located in the `ios` directory, this includes the Swift Package Manager (SPM) compatible SDK for integrating the AI agent into iOS applications.
36
+
-**JavaScript**: Located in the `js` directory, includes:
37
+
- Documentation guides for React and CDN integration
38
+
- Interactive live examples
39
+
- Downloadable sample projects for local development
37
40
38
-
-**Android**: Located in the `android` directory, this includes the necessary components for Android integration.
41
+
-**iOS**: Located in the `ios` directory, includes Swift integration guides and sample applications.
39
42
40
-
-**Web**: Located in the `js` directory, this includes JavaScript components for web integration.
43
+
-**Android**: Located in the `android` directory, includes Android integration documentation.
44
+
45
+
### JavaScript Sample Projects
46
+
47
+
Each JavaScript platform directory contains a ready-to-run sample project:
48
+
49
+
-**`js/react/sample/`**: Vite + TypeScript + React sample with full AI Agent integration
50
+
-**`js/cdn/sample/`**: Vite + Vanilla JavaScript sample using CDN integration
51
+
52
+
Both samples demonstrate:
53
+
- Basic AI Agent Messenger integration
54
+
- User authentication and session handling
55
+
- Context configuration
56
+
- Manual messenger controls
57
+
58
+
To run the samples locally:
59
+
```bash
60
+
cd js/react/sample # or js/cdn/sample
61
+
npm install
62
+
npm run dev
63
+
```
41
64
42
65
Each platform-specific directory contains its own README with detailed integration instructions.
CONVERSATION_LIST__HEADER_TITLE: 'Lista de conversaciones anteriores'
269
-
}
268
+
CONVERSATION_LIST__HEADER_TITLE: 'Lista de conversaciones anteriores',
269
+
},
270
270
});
271
271
};
272
272
273
273
// Add buttons to let users switch languages
274
274
<div>
275
275
<button onClick={switchToChinese}>Switch to Chinese</button>
276
276
<button onClick={switchToSpanish}>Switch back to Spanish</button>
277
-
</div>
277
+
</div>;
278
278
```
279
279
280
-
281
280
**Dynamically Loading Language Files:**
282
281
283
282
For better performance, we recommend dynamically loading only the language string set files that your users actually need. This approach reduces the initial bundle size and improves load times:
@@ -307,10 +306,9 @@ async function loadLanguageStrings(language) {
307
306
// Update the messenger configuration with the loaded strings
308
307
messenger.updateConfig({
309
308
language,
310
-
stringSet
309
+
stringSet,
311
310
});
312
311
}
313
312
```
314
313
315
314
This approach ensures that only the language resources needed for the current user are loaded, which is particularly important when supporting multiple languages with large string sets.
-[Running your application](#running-your-application)
14
14
-[Manage user sessions](#manage-user-sessions)
15
+
-[Session types](#session-types)
15
16
-[Launch the messenger](#launch-the-messenger)
16
17
-[Advanced Features](#advanced-features)
17
18
-[Display messenger without launcher button](#display-messenger-without-launcher-button)
@@ -156,7 +157,7 @@ Once the authentication information has been successfully registered, you can la
156
157
157
158
To launch and display the messenger, implement the code below:
158
159
159
-
>__Note__: Replace `YOUR_APP_ID` AND `YOUR_AI_AGENT_ID` with your Application ID and AI agent ID which you can obtain from the Sendbird Dashboard. To learn how do to so, refer to the [prerequisites](#prerequisites) section.
160
+
>**Note**: Replace `YOUR_APP_ID` AND `YOUR_AI_AGENT_ID` with your Application ID and AI agent ID which you can obtain from the Sendbird Dashboard. To learn how do to so, refer to the [prerequisites](#prerequisites) section.
0 commit comments