Skip to content

sanjaybora04/CustomAiAssistant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CustomAi Assistant

This is a customizable Ai Assistant which uses Artificial Neural Networks(ANN) based Intent recognition to recognize the intent of user input. You can customize its responses and you can defines modules to automate tasks for your personal use.

  • How to use :-

    • Clone the repository
    git clone https://github.com/sanjaybora04/CustomAiAssistant
    • Build virtual environment (Optional)
    python -m venv env
    now activate the environment
    source env/bin/activate         //for Linux
    source env/scripts/activate     //for Windows (using git bash)
    • Install required modules using "requirements.txt"
    pip install -r requirements.txt
    • Now your Ai Assistant is ready to use
    • Now run "app.py" to start the server
      • To use web client just hit http://120.0.0.1:5000/ in your browser
      • To use command line client just run "client/cliClient.py"
      • If you want to use voice client use "client/voiceClient.py", you have to install pyaudio,pyttsx and voiceRecognition for that

      If you are not running the server in localhost the change the url in client file


  • Configuration (if you want to customize the Assistant) :-

    • For customising responses :-

      • To customise responses for assistant "assistant/intent.json" has to be modified.
        image

      • Tag :- Please use a different tag for each of your intents

      • Pattern :- You can enter multiple patterns and the model will be trained based on that.

      • Responses :- You can enter multiple responses and responses will be chosen randomely from the list.

      • After you have configured intents.json just run train.py from chatbot folder and the training process will start

      • After training is finished your assistant is all set to rock!!

    • For customising modules :-

      • For adding custom modules first you have to configure intents.json as mentioned(but inside responses you have to enter "module" to use the command to fire a module) as shown in image below
        image
      • Now make a python file inside "assistant/modules" named same as the tag you entered in the intent. For Example :- In the above image for DateAndTime intent you have to make a file named "DateAndTime.py" inside the module folder
      • Now as shown in image below make function reply() in your module and return the string you want the AI to give as response.
        image
      • The returned string will be returned by the chatbot as a response and you can also perform other tasks in the function such as playing music, opening apps ,etc as well
        image
        As you can see in this module a song is being played and "Playing song.mp3" is returned as a string
      • Lets take one more example of a module that repeats what you said:-
        image

      Note: Don't forget to run train.py each time you make any change to "intents.json"


Todos:-

  • use transformers to train the model

About

Make your own AI Assistant and use it for automating any tasks

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published