bemade-addons/openwebui_base/models/res_company.py
mathis c5904a51d7 [REF] Replace openwebui_connector with centralized openwebui_base module
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
2025-07-28 13:27:29 -04:00

15 lines
400 B
Python

from odoo import models, fields
class Company(models.Model):
_inherit = "res.company"
openwebui_provider_id = fields.Many2one(
"openwebui.provider",
string="OpenWebUI Provider",
)
openwebui_default_model_id = fields.Many2one(
"openwebui.model",
string="OpenWebUI Default Model",
domain=[("provider_id", "=", "openwebui_provider_id")],
)