Easily integrate Omnimind widgets into your React app with the omnimind-react
package.
You can install the omnimind-react
package using npm:
npm install omnimind-react
-
First, make sure you have an account with Omnimind and have obtained the necessary credentials.
-
Import the necessary components from the omnimind-react package into your React application:
import { OmnimindWidget } from 'omnimind-react';
- Use the OmnimindWidget component in your JSX to display the desired Omnimind widget. Pass the required props, such as
widgetId
andprojectId
import { OmnindWidget } from "omnimind-react";
function App() {
return (
<div className="App">
<OmnimindWidget
widgetType="chat"
widgetId="your-widget-id"
projectId="your-project-id"
/>
</div>
);
}
export default App;
Prop | Type | Description |
---|---|---|
widgetType | WidgetTypes | The type of the Omnimind widget. |
widgetId | string | The ID of the Omnimind widget to display. |
projectId | string | The ID of the Omnimind project associated. |
The widgetType
prop accepts the following values:
-
'chat'
: Display a chat widget. -
'search'
: Display a search widget. -
'popup-chat'
: Display a popup chat widget. -
'doc-search'
: Display a document search widget. -
'explain'
: Display an explanation widget. -
'summarize'
: Display a summarization widget.