@guideai/react-native 0.8.0 → 0.9.0
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 +19 -0
- package/dist/GuideAIChat-BFu10t6D.cjs +2794 -0
- package/dist/GuideAIChat-BFu10t6D.cjs.map +1 -0
- package/dist/GuideAIChat-BQQ8lUKs.js +2795 -0
- package/dist/GuideAIChat-BQQ8lUKs.js.map +1 -0
- package/dist/GuideAIChat-CNmEo5bZ.cjs +2794 -0
- package/dist/GuideAIChat-CNmEo5bZ.cjs.map +1 -0
- package/dist/GuideAIChat-SU0CVNby.js +2795 -0
- package/dist/GuideAIChat-SU0CVNby.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +61 -6
- package/dist/index.mjs +2 -2
- package/dist/ui.cjs +2 -2
- package/dist/ui.d.ts +11 -5
- package/dist/ui.mjs +3 -3
- package/dist/useConversations-C-OmzdeA.js +4300 -0
- package/dist/useConversations-C-OmzdeA.js.map +1 -0
- package/dist/useConversations-Chn_GKOz.cjs +4299 -0
- package/dist/useConversations-Chn_GKOz.cjs.map +1 -0
- package/dist/useConversations-Ckyqbxqi.cjs +4299 -0
- package/dist/useConversations-Ckyqbxqi.cjs.map +1 -0
- package/dist/useConversations-DzhYCIiY.js +4300 -0
- package/dist/useConversations-DzhYCIiY.js.map +1 -0
- package/dist/voice.cjs +2835 -19
- package/dist/voice.cjs.map +1 -1
- package/dist/voice.d.ts +12 -6
- package/dist/voice.mjs +2836 -20
- package/dist/voice.mjs.map +1 -1
- package/package.json +6 -2
package/README.md
CHANGED
|
@@ -8,10 +8,29 @@ npm install @guideai/react-native
|
|
|
8
8
|
npx expo install expo-audio expo-file-system
|
|
9
9
|
# pictures on the whiteboard:
|
|
10
10
|
npx expo install react-native-svg
|
|
11
|
+
# live voice that flows like a phone call (recommended):
|
|
12
|
+
npx expo install react-native-audio-api
|
|
11
13
|
```
|
|
12
14
|
|
|
13
15
|
React ≥ 18 and React Native ≥ 0.73. No native module of its own: voice uses expo-audio and expo-file-system, which Expo apps already ship, so it works in a dev build and over OTA updates.
|
|
14
16
|
|
|
17
|
+
**Live voice that flows.** Pass react-native-audio-api in and live voice streams both ways, as on the web: it hears you finish in a fraction of a second, starts speaking while the answer is still being written, says something while it thinks, you can talk over it, and "yes" or "no" answers an action waiting for approval. Without it, each turn is recorded, uploaded once you go quiet, and the finished answer read aloud.
|
|
18
|
+
|
|
19
|
+
```tsx
|
|
20
|
+
import * as AudioAPI from 'react-native-audio-api';
|
|
21
|
+
|
|
22
|
+
GuideAI.configure({ apiKey: 'pk_live_…', origin: 'https://app.example.com', storage: AsyncStorage, audio: AudioAPI });
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
It is a native module: add its config plugin to app.json, then make a new development build (not Expo Go; an OTA update cannot add it).
|
|
26
|
+
|
|
27
|
+
```json
|
|
28
|
+
["react-native-audio-api", {
|
|
29
|
+
"iosMicrophonePermission": "Talk to the assistant.",
|
|
30
|
+
"androidPermissions": ["android.permission.RECORD_AUDIO", "android.permission.MODIFY_AUDIO_SETTINGS"]
|
|
31
|
+
}]
|
|
32
|
+
```
|
|
33
|
+
|
|
15
34
|
## The quickest way: our chat, with voice
|
|
16
35
|
|
|
17
36
|
```tsx
|