| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
AI (ai_app)
• Discuss (mail) |
| Lines of code | 993 |
| Technical Name |
ai_providers_extended |
| License | LGPL-3 |
中国主流AI大模型支持扩展
中国主流AI大模型支持扩展 extends Odoo's native AI functionality to support multiple AI model providers, including popular Chinese AI models. This module seamlessly integrates with Odoo's existing AI features, allowing you to use various AI providers for chat, embeddings, and other AI-powered tasks without modifying core Odoo code.
Supported AI Providers
This module adds support for the following AI providers:
- DeepSeek - Advanced AI models for chat and coding tasks with high performance and cost-effectiveness
- Qwen (通义千问) - Alibaba Cloud's powerful AI model with excellent Chinese language support
- ERNIE (文心一言) - Baidu's comprehensive AI model with strong natural language understanding
- GLM (智谱AI) - Zhipu AI's intelligent models with multi-modal capabilities
- Moonshot (月之暗面) - Moonshot AI's advanced models with long context support
- Doubao (豆包) - ByteDance's versatile AI model with fast response times
Key Features
- Unified Configuration Interface - Manage all AI provider settings from a single location in Odoo Settings
- Custom API Base URLs - Support for custom API endpoints and proxy configurations
- Seamless Integration - Works with all existing Odoo AI features including chat, embeddings, and RAG
- Provider-Specific Optimizations - Automatic handling of different authentication methods and API formats
- Embedding Support - Full support for document embedding and RAG (Retrieval-Augmented Generation)
- DeepSeek Compatibility - Special handling for DeepSeek with OpenAI embedding fallback for file processing
Installation
- Install the module from Odoo Apps
- Go to Settings > AI > Providers
- Enable and configure your desired AI providers with API keys
- Select your preferred LLM model in AI Agent settings
Configuration
After installation, configure your AI providers:
- Navigate to Settings > AI > Providers
- For each provider you want to use:
- Enable the provider toggle
- Enter your API key
- (Optional) Set a custom API base URL if needed
- Save the settings
Provider-Specific Notes
DeepSeek
- Supports chat and coding tasks
- For file uploads and embeddings, requires OpenAI API key configuration (uses OpenAI embedding API as fallback)
- Pure chat scenarios work without OpenAI configuration
Qwen (通义千问)
- Supports both native DashScope API and OpenAI-compatible API
- Automatically detects API type based on base URL configuration
- Full embedding support
ERNIE (文心一言)
- Uses Baidu's access token authentication
- Full embedding support
GLM, Moonshot, Doubao
- OpenAI-compatible API format
- Full embedding support
- Standard Bearer token authentication
Usage
Once configured, you can use any of the supported providers in:
- AI Chat conversations
- AI Agent configurations
- Document embedding and RAG
- All other Odoo AI features
Troubleshooting
DeepSeek file upload issues: If you're using DeepSeek and need to upload files, make sure to configure OpenAI API key in Settings > AI > Providers. DeepSeek uses OpenAI's embedding API for file processing.
API connection errors: Check your network configuration, DNS settings, and firewall rules. Some providers may require specific network configurations.
Technical Details
This module extends Odoo's AI functionality through:
- Monkey patching of LLM API service classes
- Model inheritance for configuration management
- Provider-specific authentication and request handling
- Compatible with Odoo 19.0
Security
All API keys are stored securely in Odoo's ir.config_parameter and are only accessible to system administrators.
Support
For issues, questions, or feature requests, please contact the module author or refer to the module documentation.
Version History
- Version 1.0 - Initial release with support for DeepSeek, Qwen, ERNIE, GLM, Moonshot, and Doubao
AI Providers Extended
Overview
AI Providers Extended is a powerful module that extends Odoo's built-in AI functionality to support multiple AI model providers, including popular Chinese AI services. This module seamlessly integrates with Odoo's existing AI features, allowing you to use various AI providers for LLM (Large Language Model) and embedding generation.
Features
- Multiple Provider Support: Support for 8 AI providers including:
- OpenAI (GPT-4, GPT-3.5, etc.)
- Google (Gemini models)
- Qwen (通义千问) - Alibaba Cloud
- ERNIE (文心一言) - Baidu
- GLM (智谱AI) - Zhipu AI
- Moonshot (月之暗面) - Moonshot AI
- Doubao (豆包) - ByteDance
- DeepSeek - DeepSeek AI
- Dynamic Configuration Interface: Easy-to-use settings page for configuring API keys and custom base URLs for each provider
- Custom Base URLs: Support for custom API endpoints, allowing you to use proxy servers or self-hosted API services
- Automatic Provider Detection: Automatically detects and configures providers based on API keys
- Embedding Support: Full support for embedding generation with all providers (except DeepSeek, which uses OpenAI embeddings as fallback)
- Seamless Integration: Works seamlessly with existing Odoo AI features including AI Agents, AI Topics, and AI Composer
Installation
- Install the module through Odoo Apps menu
- The module requires the following dependencies:
- ai - Odoo's base AI module
- ai_app - Odoo's AI application module
- After installation, go to Settings > AI > Providers to configure your API keys
Configuration
Configuring AI Providers
- Navigate to Settings > AI > Providers
- For each provider you want to use:
- Toggle the Enable switch to activate the provider
- Enter your API Key in the corresponding field
- (Optional) Enter a Custom Base URL if you're using a proxy or custom endpoint
- Click Save to apply your changes
- The module will automatically:
- Validate your API keys
- Make the provider available in AI Agent configuration
- Enable embedding generation for supported providers
Provider-Specific Configuration
- Qwen (通义千问)
- Default API endpoint: https://dashscope.aliyuncs.com/compatible-mode/v1
- Supports custom base URLs for OpenAI-compatible APIs
- Uses Authorization: Bearer for compatible mode, X-DashScope-APIKey for native API
- ERNIE (文心一言)
- Requires both API Key and Secret Key
- Secret Key can be configured separately or combined with API Key using format: API_KEY:SECRET_KEY
- Uses access token authentication
- GLM (智谱AI)
- Default API endpoint: https://open.bigmodel.cn/api/paas/v4
- Standard OpenAI-compatible API
- Moonshot (月之暗面)
- Default API endpoint: https://api.moonshot.cn/v1
- Standard OpenAI-compatible API
- Doubao (豆包)
- Default API endpoint: https://ark.cn-beijing.volces.com/api/v3
- Standard OpenAI-compatible API
- DeepSeek
- Default API endpoint: https://api.deepseek.com/v1
- Note: DeepSeek does not support native embedding API
- Embedding generation will automatically use OpenAI's embedding model (requires OpenAI API key)
Using AI Providers
After configuration, you can use the extended providers in:
- AI Agents: Select any of the supported models in the LLM Model dropdown
- Embedding Generation: Automatic embedding generation using the configured provider's embedding model
- AI Composer: Use extended providers for AI-powered content generation
- The module automatically handles:
- API authentication
- Request formatting
- Response parsing
- Error handling
- Tool calling (for supported providers)
Troubleshooting
- Provider not appearing in dropdown
- Ensure the module is properly installed and upgraded
- Check that the API key is correctly configured
- Clear browser cache and refresh the page
- Authentication errors
- Verify your API key is correct and has not expired
- Check that the API key has the necessary permissions
- For custom base URLs, ensure the endpoint is correct and accessible
- Embedding generation fails
- Ensure the provider supports embedding generation
- For DeepSeek, configure OpenAI API key for embedding fallback
- Check network connectivity and firewall settings
- Module state inconsistencies
- This is a harmless warning that can be ignored
- If persistent, try upgrading the ai_app module manually
Technical Details
Architecture
The module extends Odoo's AI functionality through:
- Model Inheritance: Extends ai.agent and ai.embedding models
- View Inheritance: Extends settings views to add provider configuration
- Monkey Patching: Extends LLMApiService to support new providers
- Provider Registry: Dynamic provider list that can be extended
API Compatibility
- Most providers use OpenAI-compatible APIs, making integration straightforward:
- Standard Authorization: Bearer authentication
- Compatible request/response formats
- Tool calling support
- Special cases:
- Qwen: Supports both native and compatible mode APIs
- ERNIE: Uses access token-based authentication
- DeepSeek: Requires OpenAI for embedding generation
Security
- API keys are stored securely in ir.config_parameter
- Password fields are masked in the UI
- Only system administrators can configure providers
- API keys are never exposed in logs or error messages
Support
For issues, questions, or feature requests, please contact the module author.
Version History
- Version 1.0
- Initial release
- Support for 8 AI providers
- Dynamic configuration interface
- Full embedding support
- Custom base URL support
License
This module is licensed under LGPL-3.
Please log in to comment on this module