npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

kore-web-sdk

v11.8.1

Published

Kore.ai offers Bots SDKs as a set of platform-specific client libraries that provide a quick and convenient way to integrate Kore.ai Bots chat capability into custom applications

Downloads

452

Readme

Kore.ai SDK

Kore.ai offers Bots SDKs as a set of platform-specific client libraries that provide a quick and convenient way to integrate Kore.ai Bots chat capability into custom applications.

With just few lines of code, you can embed our Kore.ai chat widget into your applications to enable end-users to interact with your applications using Natural Language. For more information, refer to

Bot SDKs

Web Socket Endpoints and Events

SDK Security

SDK App Registration

Message Templates

API Referernce

FAQ's

💡 Getting Started

First, install kore web SDK via the npm package manager:

npm install --save kore-web-sdk

Get chatWindow and chatConfig

import { chatConfig, chatWindow } from 'kore-web-sdk';

Configure ChatConfig


let botOptions=chatConfig.botOptions;
	
 botOptions.JWTUrl = "PLEASE_ENTER_JWTURL_HERE";
 botOptions.userIdentity = 'PLEASE_ENTER_USER_EMAIL_ID';// Provide users email id here
 botOptions.botInfo = { name: "PLEASE_ENTER_BOT_NAME", "_id": "PLEASE_ENTER_BOT_ID" }; // bot name is case sensitive
 botOptions.clientId = "PLEASE_ENTER_CLIENT_ID";
 botOptions.clientSecret = "PLEASE_ENTER_CLIENT_SECRET";
 /* 
 Important Note: These keys are provided here for quick demos to generate JWT token at client side but not for Production environment.
 Refer below document for JWT token generation at server side. Client Id and Client secret should maintained at server end.
 https://developer.kore.ai/docs/bots/sdks/user-authorization-and-assertion/
 **/

Create chat window instance and trigger show method

var chatWindowInstance = new chatWindow(chatConfig);
chatWindowInstance.show(chatConfig);

Examples

Click here to explore different variations how SDK can be consumed

Other options

include the following script in your html file and configure bot configurations


<script  src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/kore-web-sdk-umd-chat.min.js"></script>
<script>
        //chat window declaration
        var chatConfig=KoreChatSDK.chatConfig;
        var chatWindow=KoreChatSDK.chatWindow;
        
        //create chat window instance
        var chatWindowInstance = new chatWindow();

        //configure bot configurations
        var botOptions=chatConfig.botOptions;
        botOptions.JWTUrl = "PLEASE_ENTER_JWTURL_HERE";
        botOptions.userIdentity = 'PLEASE_ENTER_USER_EMAIL_ID';
        botOptions.botInfo = { name: "PLEASE_ENTER_BOT_NAME", "_id": "PLEASE_ENTER_BOT_ID" }; // bot name is case sensitive
        botOptions.clientId = "PLEASE_ENTER_CLIENT_ID";
        botOptions.clientSecret = "PLEASE_ENTER_CLIENT_SECRET";
	/* 
	Important Note: These keys are provided here for quick demos to generate JWT token at client side but not for Production environment.
	Refer below document for JWT token generation at server side. Client Id and Client secret should maintained at server end.
	https://developer.kore.ai/docs/bots/sdks/user-authorization-and-assertion/
	**/

        //show chatwindow
        chatWindowInstance.show(chatConfig);

</script>

Instructions

1.Open examples/umd/chat-with-plugins/index.html  
2.configure bot configurations   
3.Open same file in any browser 

💡 Custom Templates

In addition to the kore message templates, new custom templates can be intstalled into kore chat window with installTemplate method

class customTemplateComponent{
  renderMessage(msgData){
      if(msgData?.message[0]?.component?.payload?.template_type==='custom_stock_template'){
          return '<h2>My Template HTML</h2>';      
      }else{
          return false;
      }
  } 
}

chatWindowInstance.templateManager.installTemplate(new customTemplateComponent());

Other framework UI components like angular and react can also be injected with this

💡 Plugins

Kore's chatwindow functionlity can be extended with the help of plugins.Newly created plugins can be installed with installPlugin method

class KoreCustomPlugin{
  
}

chatWindowInstance.installPlugin(new KoreCustomPlugin());

Kore offered plugins are listed here