Gathering detailed insights and metrics for @sista/vuic-react
Gathering detailed insights and metrics for @sista/vuic-react
A Plug & Play AI Voice Assistant Powered By ChatGPT. Intelligent in-App context-aware Assistant with Voice UI Controller. One Voicebot for all your Apps.
npm install @sista/vuic-react
Typescript
Module System
Node Version
NPM Version
55.7
Supply Chain
91.1
Quality
85.5
Maintenance
100
Vulnerability
88
License
TypeScript (100%)
Love this project? Help keep it running — sponsor us today! 🚀
Total Downloads
6,676
Last Day
1
Last Week
8
Last Month
159
Last Year
6,676
NOASSERTION License
17 Stars
147 Commits
4 Forks
2 Watchers
1 Branches
1 Contributors
Updated on Feb 15, 2025
Latest Version
1.1.92
Package Id
@sista/vuic-react@1.1.92
Unpacked Size
82.53 kB
Size
20.67 kB
File Count
14
NPM Version
10.2.4
Node Version
20.11.1
Published on
Apr 03, 2024
Cumulative downloads
Total Downloads
Last Day
0%
1
Compared to previous day
Last Week
-87.1%
8
Compared to previous week
Last Month
-17.2%
159
Compared to previous month
Last Year
0%
6,676
Compared to previous year
3
5
Turn your App into an AI-powered, Voice-controlled interface in less than 10 minutes!
No Code Changes or Intent Definitions! Just add our magic button <AiAssistantButton />
.
Sista AI: 🤖 Your AI Integration Platform. ❤️
Features at a Glance:
Visit our Demo click the button, and start talking... Say "turn the light on"!__
This package integrates with many React projects.
To use @sista/vuic-react, install it in your React App.
1npm install @sista/vuic-react
1yarn add @sista/vuic-react
Import AiAssistantProvider
and wrap your App at the root level.
1// ... 2import { AiAssistantProvider } from "@sista/vuic-react"; 3 4ReactDOM.render( 5 <React.StrictMode> 6 <AiAssistantProvider apiKey="YOUR_API_KEY"> // << Wrap your app with this provider 7 <App /> 8 </AiAssistantProvider> 9 </React.StrictMode>, 10 // ... 11);
Get your free API key
from the Admin Panel and replace "YOUR_API_KEY"
.
Import AiAssistantButton
and add it wherever you want.
1// ... 2import { AiAssistantButton } from "@sista/vuic-react"; 3 4// ... 5function MyComponent() { 6 return ( 7 <div> 8 // ... 9 <AiAssistantButton /> // << Add the magic button anywhere 10 </div> 11 ); 12}
🎉 Congrats! Press the button, start talking, and enjoy!
To make your UI voice-interactive, simply register an array
of function signatures
to the Sista AI model.
1const sayHelloWorld = () => { 2 console.log("Hello, World!"); 3}; 4 5// Define the functions to be voice-controlled 6const interactiveFunctions = [ 7 { 8 function: { 9 handler: sayHelloWorld, // pass a refference to your function 10 description: "Greets the user with Hello World :)", // add function description 11 }, 12 }, 13 // ... register additional functions here 14];
For functions that accepts parameters:
1const sayHello = (name) => { 2 console.log(`Hello ${name}!`); 3}; 4 5// Define the functions to be voice-controlled 6const interactiveFunctions = [ 7 { 8 function: { 9 handler: sayHello, 10 description: "Greets the user with their name.", 11 // In case your function accepts parameters: 12 parameters: { 13 type: "object", 14 properties: { 15 name: { 16 type: "string", // set parameter type 17 description: "User's name." // add parameter description 18 }, 19 }, 20 required: ["name"], // list required parameters 21 }, 22 }, 23 }, 24];
Register the functions with aiAssistant.registerFunctions(..);
inside a useEffect
hook.
1 const aiAssistant = useAiAssistant(); 2 useEffect(() => { 3 if (aiAssistant) { 4 aiAssistant.registerFunctions(interactiveFunctions); 5 } 6 }, [aiAssistant]);
Just like that, your app is voice-interactive. Magic! :sparkles:
To customize the AI assistant's voice or feed information about your product, visit the Admin Panel.
For a voice-interactive todo app to add
or remove
tasks, the setup is:
1import React, { useEffect } from 'react'; 2import { useAiAssistant, AiAssistantButton } from '@sista/vuic-react'; 3 4function TodoApp() { 5 6 const addTask = (task) => { 7 console.log(`Task added: ${task}`); 8 }; 9 10 const removeTask = (task) => { 11 console.log(`Task removed: ${task}`); 12 }; 13 14 // ... 15 16 // Initialize the aiAssistant instance 17 const aiAssistant = useAiAssistant(); 18 19 useEffect(() => { 20 // Define the voice-controlled functions 21 const interactiveFunctions = [ 22 { 23 function: { 24 handler: addTask, 25 description: 'Adds a new task.', 26 parameters: { 27 type: 'object', 28 properties: { 29 task: { 30 type: 'string', 31 description: 'Description of the task.' 32 }, 33 }, 34 required: ['task'], 35 }, 36 }, 37 }, 38 { 39 function: { 40 handler: removeTask, 41 description: 'Removes an existing task.', 42 parameters: { 43 type: 'object', 44 properties: { 45 task: { 46 type: 'string', 47 description: 'Description of the task.' 48 }, 49 }, 50 required: ['task'], 51 }, 52 }, 53 }, 54 ]; 55 56 // Register the AI controlled functions 57 if (aiAssistant) { 58 aiAssistant.registerFunctions(interactiveFunctions); 59 } 60 }, [aiAssistant]); 61 62 // ... 63 64 return ( 65 <div> 66 // ... 67 <AiAssistantButton /> 68 </div> 69 ); 70} 71 72export default TodoApp;
AiAssistantProvider
accepts few props:
1<AiAssistantProvider 2 apiKey="api-key" // (required): Your API key. 3 debug={true} // (optional): Enables debug mode. 4 apiUrl="api-url" // (optional): For custom backend or testing purposes. 5> 6 // ... 7</AiAssistantProvider>
You can modify the colors of the AiAssistantButton
at different states:
1 const colors = { 2 STATE_IDLE: '#4a6cf6', // Default 3 STATE_LISTENING_START: '#F64A7B', // Red 4 STATE_THINKING_START: '#4ac2f6', // Blue 5 STATE_SPEAKING_START: '#4af67f', // Green 6 }; 7 8 <AiAssistantButton buttonColors={colors} />
Customize AI assistant behavior via the Admin Panel by providing your custom prompt
and training data
.
Change AI assistant's voice via the Admin Panel by selecting your preferred voice in the application settings.
Unlock the Future with our advacned Voice UI Assistant: Embrace top-tier components:
Your contributions are warmly welcomed! Let's collaborate 🤝
Licensed under CC BY-NC-ND 3.0.
For issues, raise on Github or contact support@sista.ai.
No vulnerabilities found.
No security vulnerabilities found.