Cricbot is a chatbot application designed to provide live cricket scores and handle various user intents. It leverages OpenAI's language models to understand user queries and generate appropriate responses. The application is structured to ensure modularity and ease of maintenance.
Cricbot/
├── app/
│ ├── src/
│ │ ├── constants/
│ │ │ ├── __init__.py
│ │ │ └── constants.py
│ │ ├── models/
│ │ │ ├── __init__.py
│ │ │ └── match_details.py
│ │ ├── prompts/
│ │ │ ├── all_live_matches_response_prompt.txt
│ │ │ ├── fallback_response_prompt.txt
│ │ │ ├── intent_identifier_prompt.txt
│ │ │ └── live_score_response_prompt.txt
│ │ ├── services/
│ │ │ ├── __init__.py
│ │ │ ├── intent_identifier_service.py
│ │ │ ├── intent_handler_service.py
│ │ │ ├── live_score_service.py
│ │ │ └── response_generator_service.py
│ │ ├── utils/
│ │ │ ├── __init__.py
│ │ │ └── common_util.py
│ │ ├── chains/
│ │ │ ├── __init__.py
│ │ │ └── cricbot_chain.py
│ │ ├── enums/
│ │ │ ├── __init__.py
│ │ │ └── intents.py
│ ├── main.py
│ └── cricbot_app.py
├── .env
├── .gitignore
├── README.md
└── requirements.txt
Clone the Repository
git clone https://github.com/mohitbansal964/Cricbot.git
cd Cricbot
Create a Virtual Environment
python -m venv .venv
source .venv/bin/activate # On Windows use `.venvScriptsactivate`
Install Dependencies
pip install -r requirements.txt
Set Up Environment Variables
Create a .env
file in the root directory and add your OpenAI API key:
OPENAI_API_KEY=your_openai_api_key_here
Run the application using the following command:
python app/main.py
Interact with the bot by typing your queries. Type "exit" to terminate the session.
MatchDetails
.Contributions are welcome! Please fork the repository and submit a pull request for any enhancements or bug fixes.
This project is licensed under the MIT License.
This README provides a comprehensive overview of the Cricbot application, including setup instructions, usage, and future enhancements. Feel free to modify the content to better suit your project's needs.