New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

rasajs

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rasajs

Node js module for Rasa Chatbot

latest
npmnpm
Version
0.0.4
Version published
Maintainers
1
Created
Source

Creating a Chatbot for Rasa with Node.js

Introduction

Rasa is an open source conversational AI framework that allows developers to build and deploy chatbots and voice assistants. Rasa offers several language-specific APIs to interact with the framework, including a Node.js API.
The Rasa Node.js API allows you to integrate Rasa into your Node.js applications and interact with your Rasa chatbot or voice assistant through HTTP requests. With this API, you can send messages to your chatbot, receive responses, and track conversation history.

Installation

To use the Rasa Node.js API, you'll need to install the rasajs package, which is a rasa api that gives you access rasa server. Install it by running npm by running the following command:

npm i rasajs

Import

Once you have rasajs installed, you can use it to send HTTP requests to your Rasa server.

import rasa from 'rasajs';
or
const rasa= require('rasajs');

Setup

After import you have to initialize the url of rasa

rasa.baseUrl("http://localhost:5005");

Chat With Rasa

rasa.sendMessage("hi",res=>{
   console.log(res);
});

Answer should be in json format

{ text: 'hi', reply: 'Hey! How are you?' }

Functions

rasa.parseModel

rasa.parseModel: (message: string, callback: Function) => void

rasa.sendMessage

rasa.sendMessage(message: string, callback: Function): Promise<void>

rasa.entry

rasa.entry: () => void

rasa.addEvent

rasa.addEvent: (eventname: string, callback: Function) => void

rasa.resetEvent

rasa.resetEvent: (eventname: string, callback: Function) => void

rasa.ConversionTracker

rasa.ConversionTracker: (callback: Function) => void

rasa.chatHistory

rasa.chatHistory: (callback: Function) => void

rasa.replayDomain

rasa.replayDomain: (name: string, callback: Function) => void

rasa.injectIntent

rasa.evaluateStories: (name: string, callback: Function) => void

rasa.evaluateStories

rasa.evaluateStories: (name: string, callback: Function) => void

rasa.replaceModel

rasa.replaceModel: (path: string, callback: Function) => void

rasa.version

rasa.domain: (callback: Function) => void

rasa.domain

rasa.domain: (callback: Function) => void

rasa.status

rasa.status: (callback: Function) => void

rasa.baseUrl

rasa.baseUrl: (url: string) => void

FAQs

Package last updated on 10 Apr 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts