graph LR
Main_Interface_Orchestrator["Main Interface Orchestrator"]
UI_Renderer["UI Renderer"]
Event_Dispatcher["Event Dispatcher"]
Session_Validator["Session Validator"]
Chatbot_UI_Manager["Chatbot UI Manager"]
Dataset_UI_Manager["Dataset UI Manager"]
Model_Selection_UI_Manager["Model Selection UI Manager"]
Main_Interface_Orchestrator -- "initializes and orchestrates" --> UI_Renderer
Main_Interface_Orchestrator -- "initializes and orchestrates" --> Event_Dispatcher
UI_Renderer -- "delegates rendering tasks to" --> Chatbot_UI_Manager
UI_Renderer -- "delegates rendering tasks to" --> Dataset_UI_Manager
UI_Renderer -- "delegates rendering tasks to" --> Model_Selection_UI_Manager
UI_Renderer -- "establishes UI elements processed by" --> Event_Dispatcher
Event_Dispatcher -- "dispatches events to" --> Chatbot_UI_Manager
Event_Dispatcher -- "dispatches events to" --> Dataset_UI_Manager
Event_Dispatcher -- "dispatches events to" --> Model_Selection_UI_Manager
Chatbot_UI_Manager -- "interacts with" --> Session_Validator
Dataset_UI_Manager -- "interacts with" --> Session_Validator
Model_Selection_UI_Manager -- "interacts with" --> Session_Validator
The User Interface (UI) Layer is primarily encapsulated within the user_interface.py file, specifically centered around the MainInterface class. This layer is responsible for all interactive elements, user input, and display of application state.
Serves as the primary entry point for the UI application. It initializes the Gradio interface, sets up the overall layout, and orchestrates the rendering and event handling of all sub-components.
Related Classes/Methods:
Manages the visual composition and updating of all UI elements. It delegates rendering tasks to specialized components for different sections of the application (e.g., chatbot, dataset picker, models).
Related Classes/Methods:
Acts as the central hub for processing all user interactions and system events. It dispatches these events to specialized handlers based on their type (e.g., chatbot events, dataset events, model events).
Related Classes/Methods:
Ensures that all user actions and UI operations are performed within a valid and secure session context. It's frequently called by event handlers to maintain state and security.
Related Classes/Methods:
Manages both the visual presentation and user interactions of the conversational interface, including displaying chat history, handling user input, and processing chatbot-specific actions (e.g., query submission, history manipulation).
Related Classes/Methods:
Handles the display and user interactions for dataset selection and management. This includes presenting data source options and controls for managing the vector index.
Related Classes/Methods:
Responsible for presenting available Large Language Models (LLMs) to the user and processing their selections, ensuring the application updates its internal state to use the chosen model.
Related Classes/Methods: