@salita-ai/widget
v0.1.0
Published
Embeddable Filipino AI chat widget for any website
Downloads
55
Readme
@salita-ai/widget
Embeddable Filipino AI chat widget for any website. Add a Filipino-speaking AI assistant to your site with one script tag.
Quick Setup
<script src="https://cdn.salita.ai/widget/v1/salita-widget.min.js"></script>
<script>
SalitaWidget.init({ apiKey: 'sk-sal_your_key' });
</script>Full Configuration
<script>
SalitaWidget.init({
apiKey: 'sk-sal_your_key',
position: 'bottom-right', // bottom-right | bottom-left
primaryColor: '#C17F24', // brand color
title: 'SalitaAI Assistant',
greeting: 'Kumusta! Paano kita matutulungan?',
placeholder: 'I-type ang iyong tanong...',
dialect: 'auto', // auto | tagalog | cebuano | ilocano
persona: 'friendly_professional',
systemContext: 'You are a helpful assistant.',
persistHistory: true,
onMessage: (msg) => console.log(msg),
});
</script>Programmatic Control
SalitaWidget.open();
SalitaWidget.close();
SalitaWidget.toggle();
SalitaWidget.setContext('New system context');
SalitaWidget.destroy();