avin-ai 0.1.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 +150 -0
- package/dist/avin-ai.es.js +575 -0
- package/dist/avin-ai.js +337 -0
- package/dist/avin-ai.umd.js +337 -0
- package/dist/index.d.ts +80 -0
- package/package.json +34 -0
package/README.md
ADDED
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
# AvinAI ConvAI Widget Embed
|
|
2
|
+
|
|
3
|
+
Embeddable voice conversation widget for AvinAI agents. Add AI-powered voice conversations to any website with just 2 lines of code.
|
|
4
|
+
|
|
5
|
+
## 🚀 Quick Start
|
|
6
|
+
|
|
7
|
+
Add the widget to your website:
|
|
8
|
+
|
|
9
|
+
```html
|
|
10
|
+
<!-- Step 1: Add the widget element with your agent ID -->
|
|
11
|
+
<avin-convai id="YOUR_AGENT_ID"></avin-convai>
|
|
12
|
+
|
|
13
|
+
<!-- Step 2: Load the widget script -->
|
|
14
|
+
<script src="https://unpkg.com/@avinai/convai-widget-embed" async type="text/javascript"></script>
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
That's it! The voice assistant will appear as a floating button on your website.
|
|
18
|
+
|
|
19
|
+
## 📋 Features
|
|
20
|
+
|
|
21
|
+
- ✅ **Easy Integration** - Just 2 lines of code
|
|
22
|
+
- ✅ **Voice Conversations** - WebRTC-powered real-time voice
|
|
23
|
+
- ✅ **Customizable** - Multiple configuration options
|
|
24
|
+
- ✅ **Responsive** - Works on desktop and mobile
|
|
25
|
+
- ✅ **Zero Dependencies** - Self-contained web component
|
|
26
|
+
|
|
27
|
+
## 🎨 Configuration
|
|
28
|
+
|
|
29
|
+
Customize the widget with attributes:
|
|
30
|
+
|
|
31
|
+
```html
|
|
32
|
+
<avin-convai
|
|
33
|
+
id="YOUR_AGENT_ID"
|
|
34
|
+
position="bottom-right"
|
|
35
|
+
primary-color="#6366f1"
|
|
36
|
+
server-url="https://your-server.com"
|
|
37
|
+
></avin-convai>
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Available Attributes
|
|
41
|
+
|
|
42
|
+
| Attribute | Type | Default | Description |
|
|
43
|
+
|-----------|------|---------|-------------|
|
|
44
|
+
| `id` | string | *required* | Your AvinAI agent ID |
|
|
45
|
+
| `position` | string | `bottom-right` | Widget position: `bottom-right`, `bottom-left`, `top-right`, `top-left` |
|
|
46
|
+
| `primary-color` | string | `#6366f1` | Primary color for the widget (hex format) |
|
|
47
|
+
| `server-url` | string | auto | Custom server URL for API calls |
|
|
48
|
+
|
|
49
|
+
## 📖 Examples
|
|
50
|
+
|
|
51
|
+
### Basic Usage
|
|
52
|
+
```html
|
|
53
|
+
<avin-convai id="63c510f4-b98a-435c-ad22-aa1e042d1d92"></avin-convai>
|
|
54
|
+
<script src="https://unpkg.com/@avinai/convai-widget-embed" async type="text/javascript"></script>
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Custom Position and Color
|
|
58
|
+
```html
|
|
59
|
+
<avin-convai
|
|
60
|
+
id="63c510f4-b98a-435c-ad22-aa1e042d1d92"
|
|
61
|
+
position="bottom-left"
|
|
62
|
+
primary-color="#10b981"
|
|
63
|
+
></avin-convai>
|
|
64
|
+
<script src="https://unpkg.com/@avinai/convai-widget-embed" async type="text/javascript"></script>
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### With Custom Server
|
|
68
|
+
```html
|
|
69
|
+
<avin-convai
|
|
70
|
+
id="63c510f4-b98a-435c-ad22-aa1e042d1d92"
|
|
71
|
+
server-url="https://your-custom-server.com"
|
|
72
|
+
></avin-convai>
|
|
73
|
+
<script src="https://unpkg.com/@avinai/convai-widget-embed" async type="text/javascript"></script>
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## 🔧 Advanced Usage
|
|
77
|
+
|
|
78
|
+
### Using Specific Version
|
|
79
|
+
```html
|
|
80
|
+
<script src="https://unpkg.com/@avinai/convai-widget-embed@1.0.0" async type="text/javascript"></script>
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Self-Hosting
|
|
84
|
+
Download and host the widget yourself:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
npm install @avinai/convai-widget-embed
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Then include from your own server:
|
|
91
|
+
```html
|
|
92
|
+
<script src="/path/to/widget.js" type="module"></script>
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## 🌐 Browser Support
|
|
96
|
+
|
|
97
|
+
- Chrome / Edge (latest)
|
|
98
|
+
- Firefox (latest)
|
|
99
|
+
- Safari (latest)
|
|
100
|
+
- Mobile browsers (iOS Safari, Chrome Android)
|
|
101
|
+
|
|
102
|
+
**Requirements:**
|
|
103
|
+
- WebRTC support
|
|
104
|
+
- Microphone access
|
|
105
|
+
|
|
106
|
+
## 📱 Mobile Support
|
|
107
|
+
|
|
108
|
+
The widget is fully responsive and works on mobile devices. Users will be prompted to grant microphone permission on first use.
|
|
109
|
+
|
|
110
|
+
## 🔒 Security & Privacy
|
|
111
|
+
|
|
112
|
+
- HTTPS required for microphone access
|
|
113
|
+
- User must explicitly grant microphone permission
|
|
114
|
+
- All voice data is transmitted via secure WebRTC
|
|
115
|
+
- No data is stored by the widget
|
|
116
|
+
|
|
117
|
+
## 🛠️ Development
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
# Clone the repository
|
|
121
|
+
git clone https://github.com/Alok7268/hr-dashboard.git
|
|
122
|
+
cd sdk
|
|
123
|
+
|
|
124
|
+
# Install dependencies
|
|
125
|
+
npm install
|
|
126
|
+
|
|
127
|
+
# Start dev server
|
|
128
|
+
npm run dev
|
|
129
|
+
|
|
130
|
+
# Build for production
|
|
131
|
+
npm run build
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## 📄 License
|
|
135
|
+
|
|
136
|
+
MIT
|
|
137
|
+
|
|
138
|
+
## 🤝 Support
|
|
139
|
+
|
|
140
|
+
For support, please visit [AvinAI Dashboard](https://your-dashboard.com) or contact support@avinai.com
|
|
141
|
+
|
|
142
|
+
## 🔗 Links
|
|
143
|
+
|
|
144
|
+
- [Documentation](https://docs.avinai.com)
|
|
145
|
+
- [Dashboard](https://your-dashboard.com)
|
|
146
|
+
- [GitHub](https://github.com/Alok7268/hr-dashboard)
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
Made with ❤️ by AvinAI
|