How bdeekshith066/chatbot_hub works
Main Components
• Frontend/UI: Since the project runs using Streamlit (via main.py and home.py), think of the UI layer as the entry point where users select and interact with different chatbot demos.
• Chatbot Modules: Each chatbot type is implemented as its own Python script (e.g., api_based_chatbot.py, rule_based_chatbot.py, keyword_based_chatbot.py, etc.). They are individual components responsible for their distinct conversational logic.
• Assets/Data: The assets directory holds various JSON files (like api_animation.json, multilingual.json, etc.) that contain configuration data, training data, or other resources required by the chatbots.
• Supporting Components: The requirements.txt indicates dependencies and perhaps third-party libraries that glue everything together.
Relationships and Interactions
• The Streamlit front end (main.py/home.py) acts as the user interface, where user interactions (text, voice commands, file uploads) are received.
• Each chatbot module performs its required processing by loading specific asset files from the assets directory. For example, keyword_based_chatbot.py likely accesses keyword.json files, while data_analysis_chatbot.py may work with a set of dataanalysis*.json files.
• The results from each chatbot module are then returned to the UI, which renders responses or visualizations back to the user.
Architectural Patterns and Design Principles
• Modular Design: With separate scripts for each chatbot, the design follows a modular approach where each module is isolated. This increases maintainability and scalability.
• Single Responsibility: Each chatbot script is focused on a specific approach or type of conversation logic.
• Separation of Concerns: The UI layer (managed by Streamlit) is decoupled from the business logic (chatbot modules) and resource management (assets).
• Integration via configuration: The assets folder acts as a repository for resources that the individual modules use without hard-coding data into the logic.