@constructor-io/constructorio-ui-pia
v1.2.1
Published
Constructor.io AI Product Insights Agent UI library for web applications
Keywords
Readme
Constructor AI Product Insights Agent UI library
Introduction
AI Product Insights Agent is an NLP chatbot embedded in product detail pages, designed to answer key technical product questions essential for final purchase decisions.
Our Storybook Docs are the best place to explore the behavior and the available configuration options for this UI library.
Installation
npm i @constructor-io/constructorio-ui-piaUsage
Using the JavaScript Bundle
This is a framework agnostic method that can be used in any JavaScript project. The CioPia function provides a simple interface to inject the PIA component into the provided selector.
In addition to PIA component props, this function also accepts selector and includeCSS.
import CioPia from '@constructor-io/constructorio-ui-pia/constructorio-ui-pia-bundled';
CioPia({
selector: '#pia-container',
includeCSS: true, // Include the default CSS styles - defaults to true
apiKey: 'key_M57QS8SMPdLdLx4x',
itemId: '12345',
variationId: 'variation-abc',
// Optional: provide a thread ID to preserve conversation context (must be a valid UUID)
threadId: '550e8400-e29b-41d4-a716-446655440000',
});Requirements
- Node.js v18.20.3 (LTS Hydrogen)
- React >=16.12.0
- React DOM >=16.12.0
License
MIT © Constructor.io
