Spaces:
Runtime error
Runtime error
Commit History
-
refactor: Complete OMIRL architecture cleanup and modernizationβ
Major Changes: - Removed legacy compat.py (209 lines) - replaced with modern OMIRLAdapter - Refactored valori_stazioni.py to use create_omirl_adapter() - Refactored massimi_precipitazione.py to use create_omirl_adapter() - Fixed URL key bug in omirl_adapter.py (massimi_precipitazioni β massimi_precipitazione) - Removed 24 legacy test files (old architecture tests) - Created test_routing_only.py for LLM routing validation - Created test_task_output.py for full task execution testing - Updated services/web/__init__.py and services/media/__init__.py Architecture Improvements: - Unified caching layer through OMIRLAdapter - Consistent error handling across all OMIRL tasks - Proper separation of concerns (adapter β task modules) - Task attribute correctly used in ToolCall dataclass Testing: - All production code validated working - New routing tests confirm proper task extraction - Legacy test suite cleaned up (24 files removed) - 24 current architecture tests remainb28ba40
-
feat: Add livelli_idrometrici task with unified adapter-level cachingβ
- Implement complete livelli_idrometrici task with threshold analysis * Scrape 57 hydrometric stations across 5 alert zones (A-E) * Real threshold data from Regione Liguria CSV * Geographic filtering (zona, provincia, comune, bacino, corso_acqua) * Smart query detection (generic vs specific queries) * Status-based alerting (red, yellow, near_yellow, normal) - Refactor caching to adapter level for consistency * Move caching from task-level to OMIRLAdapter.fetch_data() * Single source of truth for ALL OMIRL task caching * Consistent cache keys and TTL management across tasks - Add async cache support * New get_cached_async() method in cache service * Properly handles coroutines with inspect.iscoroutine() * Works seamlessly with both sync and async data functions - Comprehensive test coverage * E2E tests with realistic user queries * Caching performance tests (all 3 tasks) * Integration tests for threshold analysis * Output formatting tests - Performance β¦b5bd850
-
Fix task output and test infrastructureβ
- Fixed artifact generation parameter error in tools/omirl/adapter.py - Fixed metadata storage issue in tools/omirl/tables/massimi_precipitazione.py - Added comprehensive full flow test in tests/agent/full/test_full_flow.py - Added configuration viewer and navigator utilities - Added documentation for config-driven architecture - Created test infrastructure for agent refactoring validation - All tests now show formatted task output correctly connecting to LLM processing8bd860c -
feat: remove mode parameter from OMIRL tool - implement direct task-based routingβ
β¨ Major refactoring to simplify OMIRL tool interface: π§ OMIRL Tool Changes: - Remove 'mode' parameter from adapter function signature - Update tool specification to remove mode property - Simplify input contract to use task-only routing - Update documentation and examples π§ Agent Integration: - Update prompts to generate mode-free routing instructions - Clean up LLM router examples and templates - Maintain backward compatibility in agent workflow π οΈ Validation & Config: - Disable mode validation logic in YAML validator - Remove mode-related error messages - Update task validation to work without mode dependency - Fix validation calls in task modules π Task Modules: - Update valori_stazioni and massimi_precipitazione - Remove mode parameter from validation calls - Maintain all existing functionality π Documentation: - Update OMIRL specification to reflect task-based architecture - Remove mode references from all examples - Update input/output format documentation π§ͺ Tests: - β¦009cf19
-
feat: Complete agent architecture refactoring and testing frameworkβ
## Major Architecture Improvements ### ποΈ Enhanced ToolCall Structure - Added explicit 'task' field to ToolCall dataclass - Eliminated confusion between tool selection and task selection - Removed deprecated 'subtask' terminology throughout codebase ### βοΈ Configuration Architecture Refactoring - Created centralized geography.yaml config (provinces, municipalities, alert zones) - Added tool_registry.yaml for tool registration and management - Enhanced llm_router_config.yaml with task-specific prompts - Eliminated legacy services/geographic/ resolver ### π§ Tool Interface Standardization - Updated OMIRL adapter to use 'task' parameter (not 'subtask') - Added default period logic: massimi_precipitazione defaults to '1h' when not specified - Enhanced parameter normalization (15m β 15' mapping) - Improved error handling and validation ### π§ͺ Comprehensive Testing Framework - Added complete end-to-end flow tests (no mocks) - Tests cover: Query β LLM Router β Tool Execution β Response Gβ¦fbd9fda
-
Phase 4: Implement LLM-based summarization nodeβ
π Major Features: - New llm_summarization_node() in agent/nodes.py for intelligent data analysis - Enhanced LLMClient with generate_insights() method for data summarization - Complete Phase 4 architecture: task-specific formatting β LLM insights β response generation π§ͺ Comprehensive Testing: - 5/5 unit tests for LLM summarization node with mock LLM clients - End-to-end integration tests for temperature and precipitation workflows - Enhanced test visibility showing complete workflow phases - Mock testing framework for API-free validation π OMIRL Improvements: - Removed task-agnostic summarization (replaced with task-specific formatting) - Enhanced precipitation data parsing and formatting - Improved station data formatting with scenario-based output - Updated adapter to use direct task formatting (no LLM dependency) π§ Architecture Enhancements: - Clean separation: LLM summarization adds insights, response generation handles formatting - Graceful LLM failure handling - workflow coβ¦bcda1ac