How besser-pearl/databot works
Main Components
a) Frontend Layer:
• Streamlit UI components (found in src/ui/)
• Key components: playground, admin, settings, sidebar, bot container
• User interaction points (chat and voice interfaces)
b) Core Application Layer:
• Bot Framework Integration
• Data Processing Components
• Schema Management
c) Bot Engine Layer:
• Workflow Management
• Query Processing
• Chart Generation
• Table Generation
d) External Services:
• OpenAI API Integration
• Speech-to-Text Service
• Open Data Portal API Connection
[User Interface Layer]
• ↑↓
[Application Layer]
• ↑↓
[Service Layer]
Component Relationships
• User → UI Layer (chat/voice input)
• UI Layer → Bot Engine (intent recognition)
• Bot Engine → Query Processors (data retrieval)
• Query Processors → Chart/Table Generators
• Application Layer ↔ External Services
Specific Implementation Details
a) Bot Framework Components:
• Intent Recognition (src/app/bot/library/databot_intents.py)
• Entity Extraction (src/app/bot/library/databot_entities.py)
• Workflow Management (src/app/bot/workflows/)
b) Query Types:
• Chart Generators (src/app/bot/workflows/queries/charts/)
• Table Generators (src/app/bot/workflows/queries/tables/)
c) Schema Management:
• Data Schema (src/schema/data_schema.py)
• Field Schema (src/schema/field_schema.py)
• Category Management (src/schema/category.py)