@inappai/react 1.0.1 → 1.0.2
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 +0 -34
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -282,40 +282,6 @@ interface CustomStyles {
|
|
|
282
282
|
}
|
|
283
283
|
```
|
|
284
284
|
|
|
285
|
-
## Advanced Configuration
|
|
286
|
-
|
|
287
|
-
### Self-Hosted Backend
|
|
288
|
-
|
|
289
|
-
By default, the component uses the hosted InAppAI backend. For self-hosted:
|
|
290
|
-
|
|
291
|
-
```tsx
|
|
292
|
-
<InAppAI
|
|
293
|
-
endpoint="https://your-backend.com/api"
|
|
294
|
-
agentId="your-agent-id"
|
|
295
|
-
messages={messages}
|
|
296
|
-
onMessagesChange={setMessages}
|
|
297
|
-
/>
|
|
298
|
-
```
|
|
299
|
-
|
|
300
|
-
### Authentication
|
|
301
|
-
|
|
302
|
-
Use JWT tokens for authenticated requests:
|
|
303
|
-
|
|
304
|
-
```tsx
|
|
305
|
-
const { token } = useAuth();
|
|
306
|
-
|
|
307
|
-
<InAppAI
|
|
308
|
-
agentId="your-agent-id"
|
|
309
|
-
messages={messages}
|
|
310
|
-
onMessagesChange={setMessages}
|
|
311
|
-
authToken={token}
|
|
312
|
-
context={{
|
|
313
|
-
userId: user.id,
|
|
314
|
-
userName: user.name,
|
|
315
|
-
}}
|
|
316
|
-
/>
|
|
317
|
-
```
|
|
318
|
-
|
|
319
285
|
## Resources
|
|
320
286
|
|
|
321
287
|
- [GitHub Repository](https://github.com/InAppAI/react)
|