gridex-virtual-assistant
v0.1.0
Published
This folder contains a lightweight Vue component that can be embedded in any web application. It communicates with your backend API using server‑sent events and supports basic localisation.
Readme
Chatbot Package
This folder contains a lightweight Vue component that can be embedded in any web application. It communicates with your backend API using server‑sent events and supports basic localisation.
Installation
npm install gridex-virtualassistantUsage
<script setup lang="ts">
import { Chatbot } from 'gridex-virtualassistant';
</script>
<template>
<Chatbot apiKey="YOUR_API_KEY" locale="en" />
</template>apiKey– required API key used for all requests.locale– optional locale code (defaults toen).apiUrl– optional base API URL (defaults tohttp://localhost:9081).
The library does not automatically register any PrimeVue components. Ensure that
your application registers the components used by the chat widget (such as
Button, Card, ProgressBar and Textarea) before mounting it.
Run npm run build inside this folder to compile the library.
The build outputs both CommonJS and ES modules under dist/. The package can be
installed in any JavaScript based webshop:
Vue
import { Chatbot } from 'gridex-virtualassistant';React
import Chatbot from 'gridex-virtualassistant/dist/index.es.js';Angular
import Chatbot from 'gridex-virtualassistant/dist/index.es.js';Plain JavaScript
Include the compiled script directly:
<script type="module" src="./node_modules/gridex-virtualassistant/dist/index.es.js"></script>