Skip to content

botcircuits-ai/botcircuits-node

Repository files navigation

BotCircuits Node API Library

NPM version

BotCircuits is a No-Code AI platform enables effortless creation of intelligent chatbots with human-like conversational capabilities.

This library provides access to the BotCircuits REST API from TypeScript or JavaScript

To learn how more about BotCircuits, check out our Product Demo

Installation

npm install --save botcircuits
# or
yarn add botcircuits

Usage

The code below shows how to get started using the chat endpoint.

import { BotCircuitsClient } from "botcircuits";

const client = new BotCircuitsClient({
    appId: "my app id",
    apiKey: "my api key"
});

async function main() {
    const sessionId = client.chat.createSessionId(); // unique id
    const subscription = client.chat.subscribe(sessionId, response => {
        console.log(response);
    });

    await client.chat.publish({
        sessionId: sessionId,
        inputText: "hello"
    });
}

main();

About

The official Node.js / Typescript library for the BotCircuits API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published