@kpoint/video-bot
v0.0.7
Published
KPOINT Smart AI Video Bot for searching videos using natural language queries.
Downloads
521
Readme
KPOINT Video Bot Documentation
KPOINT Video Bot is a smart AI-powered video search and interaction bot designed to provide seamless video search and engagement experiences. It integrates naturally into React applications, allowing users to interact with videos through natural language queries.
Installation
Install the KPOINT Video Bot package via npm:
npm install @kpoint/video-bot
Getting Started
To integrate the KPOINT Video Bot into your React project, follow these steps:
Step 1: Import the Chatbot
Component
Import the Chatbot
component into your React application:
import { Chatbot } from '@kpoint/video-bot';
import '@kpoint/video-bot/dist/video-bot.css';
Step 2: Render the Chatbot
Component
Add the Chatbot
component to your application:
import { StrictMode } from 'react';
import { createRoot } from 'react-dom/client';
createRoot(document.getElementById('root')).render(
<StrictMode>
<Chatbot
domain="<DOMAIN>"
clientId="<CLIENT_ID>"
welcomeMessage="Hello! How may I help you?"
title="KPOINT Video Bot"
defaultPlaceHolder="Type your message here..."
defaultLanguage="en-US"
/>
</StrictMode>
);
Component Props
The Chatbot
component supports several props for customization:
| Prop | Type | Description | Default Value |
|-----------------------|----------|--------------------------------------------------------------|--------------------------------------|
| welcomeMessage
| string
| The initial message displayed by the bot. | "Hello! How may I help you today?"
|
| title
| string
| Title displayed on the chatbot. | "KPOINT Video Bot"
|
| defaultLanguage
| string
| Language for interaction (e.g., en-US
, fr-FR
). | "en-US"
|
| defaultPlaceHolder
| string
| Placeholder text for the input field. | "Type your message"
|
| domain
| string
| Domain for KPOINT API (Required). | - |
| clientId
| string
| Client ID for authenticating with KPOINT API (Required). | - |
Styling
The KPOINT Video Bot can be customized using CSS variables. Below is a list of available variables and their default values:
Chatbot Styles
| Variable Name | Description | Default Value |
|----------------------------------------|--------------------------------------------------|----------------------------------------------------|
| --font-family
| Font family for the chatbot. | 'Roboto', sans-serif
|
| --background-color
| Background color of the chatbot. | #f7f3de
|
| --header-background-gradient
| Background gradient for the header. | linear-gradient(90deg, #fef0a6 0%, #fff5c2 100%)
|
| --header-font-size
| Font size for the header. | 1.3rem
|
| --header-font-color
| Font color for the header. | #30c484
|
| --body-background-color
| Background color for the body. | #fffcee
|
| --footer-background-color
| Background color for the footer. | #fffcee
|
Input & Button Styles
| Variable Name | Description | Default Value |
|----------------------------------------|--------------------------------------------------|----------------------------------------------------|
| --input-border-color
| Border color for the input field. | #eee
|
| --input-box-shadow
| Box shadow for the input field. | rgba(0, 0, 0, 0.05)
|
| --button-background-color
| Background color for the send button. | #30c484
|
| --button-hover-background-color
| Background color for the send button on hover. | #28a374
|
| --button-font-color
| Font color for the send button. | #fff
|
| --button-box-shadow
| Box shadow for the send button. | rgba(0, 0, 0, 0.1)
|
Message Styles
| Variable Name | Description | Default Value |
|----------------------------------------|--------------------------------------------------|----------------------------------------------------|
| --user-message-background-color
| Background color for user messages. | #30c48466
|
| --bot-message-background-color
| Background color for bot messages. | #30c48424
|
| --message-font-color
| Font color for messages. | #333
|
To apply custom styles, override these variables in your CSS file.
Features
Natural Language Processing
Search and interact with videos using conversational language.Interactive Video Embedding
Embed videos within your application and interact with their content.Audio Transcription
Record audio queries and convert them into text for video searches.Multi-language Support
Enhance usability with support for various languages.
Licensing
This project is private and proprietary to KPOINT. For licensing or integration permissions, please contact KPOINT directly.
This documentation should help developers understand, install, and customize the KPOINT Video Bot for their applications.