Creates a chatbot backed up by google search engine
This repository contains a Python-based chatbot that utilizes random responses and Google Search to interact with users and provide automated answers. The chatbot aims to engage in conversations and assist users with their queries.
- Random Responses: The chatbot has a list of pre-defined responses and can generate random replies for casual interactions.
- Google Search Integration: When a user input does not match the predefined responses, the chatbot uses the Google Search functionality to find relevant information and provide a response based on the search results.
- Customization: The chatbot can be customized by modifying the list of responses or integrating other search APIs or web scraping techniques.
- Quit Functionality: Users can type "quit" to exit the chatbot conversation.
To run the chatbot, ensure you have the following dependencies installed:
- Python
googlesearch
library (can be installed viapip install google
)
- Clone the repository:
git clone https://github.com/RayMune/chatbot-python.git
- Run the chatbot script:
python chatbot.py
-
Enter your desired conversation topics and interact with the chatbot through the command line interface.
-
To exit the chatbot, simply type "quit".
To customize the chatbot, you can modify the list of responses to tailor them to your specific needs or adjust the conversation style. Additionally, you can explore alternative search APIs or implement web scraping techniques to enhance the chatbot's search capabilities.
Contributions are welcome! If you encounter any issues or have ideas for improvement, please submit a pull request or open an issue on the repository.