1.0.2 • Published 12 months ago

infer-bot-ui v1.0.2

Weekly downloads
-
License
-
Repository
-
Last release
12 months ago

InferBot UI Component

A React component that provides an interactive 3D sphere UI for voice interactions with customizable positioning and visual feedback.

Installation

npm install infer-bot-ui

Usage

In order to use the InferBotComponent it requires an InferBot instance. Once an InferBot instance is created, it should be passed as one of the props to InferBotComponent

import { InferBotComponent } from 'infer-bot-ui';

function App() {
  // Create an InferBot instance
  const instance = new InferBot({
    agentId:
    "<AGENT_ID>",
  })

  const startCallBack = async () => {
    await instance.startConversation()
  };

  const stopCallBack = async () => {
    await instance.startConversation()
  };

  return (
    <InferBotComponent
      inferBotInstance={instance}
      startCallBack={startCallBack} 
      stopCallBack={stopCallBack}
      style={{ /* Optional custom styles */ }}
    />
  );
}

Default styling

If no styling prop is provided the component will use the default styling

const defaultStyle = {
  position: 'fixed',
  bottom: '10px', 
  right: '10px',
  zIndex: 9999,
  width: '120px',
  height: '120px'
};
1.0.2

12 months ago

1.0.1

12 months ago

1.0.0

12 months ago