GithubHelp home page GithubHelp logo

clyde-chatbot-cli's Introduction

Clyde is a chatbot - CLI build using JavaScript

  • Clone the project: git clone https://github.com/nandhu-44/clyde-chatbot-cli.git

  • Change directory to the project: cd clyde-chatbot-cli

  • Install dependencies: npm install

  • Run the project: npm start

Explanation


index.js

  • Importing all the libraries.

  • Clearing the console and setting up the environment variables.

  • Some animation for the first 4 seconds before starting.

  • Taking the url from env and if for some reason it doesnt exist, read from a text file env.txt .

  • Making an async function to fetch chatbot reponse from the API.



utils/inquirer.js

  • Using the inquirer module to ask the user for the input.

If you dont have an apikey get it from here

Put it in the .env file like

url=YOUR_URL

or in the env.txt file like

YOUR_URL

A sample url would look like this

http://api.brainshop.ai/get?bid={brainid}&key={apikey}&uid={uid}&msg=

You will get the values of brainid , apikey and uid from the above website.

Replace it with the sample url. (Dont use the curly braces).

The url they provide will end with a =[msg] . So make sure to remove it as we are appending it from user input.

๐Ÿ’ก Idea by: Aadhu

clyde-chatbot-cli's People

Contributors

nandhu-44 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.