Skip to content

This project uses AI (Artificial Intelligence ) API to get possible intents which user might have while talking to a bot. It also provides us confidence ( which is the intent which AI feels the user is having ; most probably ) based on which we connect to our mongodb and check the suitable reply we have to give back to the user.

Notifications You must be signed in to change notification settings

akshatBais/ultimate_chat_bot

Repository files navigation

ultimate_chat_bot

Hello , this is a web server which exposes an AI API , which helps us for our bot chat application.

Based on the message put by the user . The API gets all intents which might be possible the user is havning to talk to. Based on the relevant intent and maximum confidence we send a reply to the user.

This project is built using nodejs , Typescript For DB : Mongoose for MongoDB.

To start project on your machine . I have provided the .env file which will be chosen by defult and help you with all configurations.

Install nodejs on your machine and navigate to the folder and run : npm start . This will start the server at port : 3000 and your API is ready to take the messages.

npm start

This will run your application on port 3000. Once the application starts on your local machine use : localhost:3000/intents/ . An example of what the api accepts as a request body :

{
	"botId" : "5f74865056d7bb000fcd39ff",
	"message" : "hey"
}

npm test

This project uses jest as a testing library and running this command runs two test cases which checks if the user entered a chat message based on that what reply user should get. One is the default message "I could not give the correct answer" and other with the reply message using our db records.

About

This project uses AI (Artificial Intelligence ) API to get possible intents which user might have while talking to a bot. It also provides us confidence ( which is the intent which AI feels the user is having ; most probably ) based on which we connect to our mongodb and check the suitable reply we have to give back to the user.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published