This commit represents a significant architectural improvement:
- Completely replaced openwebui_connector with a more robust openwebui_base module
- Centralized OpenWebUI API integration for better maintainability
- Redesigned helpdesk_sale_order_ai to use the new openwebui_base module
- Added support for multiple OpenWebUI providers and models
- Improved error handling and response parsing
- Added proper template management with openwebui_prompt_template
- Fixed KeyError issues with safe template substitution
- Streamlined API client initialization and usage
This commit introduces AI integration for helpdesk tickets to automatically generate sales orders:
- openwebui_connector: New module providing integration with OpenWebUI AI service
* Configurable API connection (key, base URL, model)
* AI prompt template system for reusable prompts
* Uses Claude 3 Sonnet model by default
- helpdesk_sale_order_ai: Extends helpdesk_sale_order with AI capabilities
* AI-powered analysis of ticket content to suggest products
* Smart product quantity parsing from various formats
* Dedicated UI tab for AI suggestions in helpdesk tickets
* Auto-creation of sales orders with matched products
The integration streamlines the process of converting customer support requests into sales opportunities.