CHATBOT AI
Overview
ChatbotAI is a simple chatbot implemented in Python. It simulates human-like conversation by responding to user inputs based on predefined patterns. The chatbot uses the random and re modules to generate appropriate responses.
Features:-
Pattern Matching: Responds to user inputs using predefined patterns.
Random Responses: Generates random responses when no pattern matches.
Loop Control: Continues the conversation until the user exits with "bye", "goodbye", or "exit".
How It Works:
Importing Modules:
The program begins by importing the random and re modules.
Defining Responses:
Two lists are defined: user_inputs and bot_responses. These contain predefined patterns and their corresponding responses.
Generating Responses:
The generate_response function takes user input, checks for matches in the user_inputs list using re.search, and returns the corresponding response from the bot_responses list. If no match is found, it randomly selects a response from a default list.
Conversation Loop:
The program runs an infinite loop, prompting the user for input. It exits when the user types "bye", "goodbye", or "exit".
Getting Started: :-
Prerequisites:-
Python 3.x
Contributing:-
Contributions are welcome! Please fork this repository and submit a pull request for any improvements or bug fixes.
License:-
This project is licensed under the MIT License. See the LICENSE file for more details.
Contact
For any questions or feedback, feel free to reach out:-
** GitHub: **Ritika800
** Email:** [email protected]