| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
Discuss (mail)
|
| Lines of code | 924 |
| Technical Name |
eb_ai_base |
| License | OPL-1 |
| Website | https://www.echobitzit.com |
Universal AI
Foundation for Odoo
Configure LLM providers once, use everywhere. eb_ai_base is the shared backbone for AI-powered Odoo modules — credentials, model registry, prompt templates, streaming, and token logging with strict server-side security.
How EB AI Base Works
One configuration layer. Every AI module in your Odoo stack calls the same provider service — no duplicate keys, no re-implemented HTTP clients.
Configure Provider
Create an eb.ai.provider
record — API key, endpoint, temperature, models, and system prompt.
Test Connection
Click Test Connection to verify credentials. Azure classic and Foundry v1 endpoints are both supported with clear error messages.
Call from Any Module
Consuming modules
call provider._get_service().call_llm()
— keys never leave the server.
8 Built-in LLM Providers
Switch providers per company. Set one as default. Each ships with a dedicated service class and connection test.
Why EB AI Base?
Everything your AI modules need — provider config, model registry, prompts, streaming, logging, and security — in one lightweight library.
Centralized Credentials
API keys and endpoints stored server-side on provider records. Never exposed to OWL, JS, or RPC responses.
One-Click Connection Test
Validate API keys from the provider form. Azure endpoints use deployment-aware checks with actionable error messages.
LLM Model Registry
Register multiple models per provider with codes, display names, context windows, and a default model flag.
Prompt Templates
Reusable
system-prompt snippets on eb.ai.prompt.template. Apply to any provider
with one click.
Streaming Support
OpenAI-compatible
providers support call_llm_stream() for
chunked responses with automatic fallback to standard calls.
Token Usage Log
Append-only eb.ai.token.log records per LLM call — prompt
tokens, completion tokens, user, company, and model.
Multi-Company
Separate provider records per company with record rules. One default provider per company enforced by constraint.
Tunable Parameters
Temperature, max output tokens, context window, LLM timeout, and custom system prompt per provider.
Tool Call Hook
Consuming modules
inject tool definitions via get_tools() for
function-calling workflows.
Security Groups
eb_ai_base.group_user for AI usage and group_manager for provider configuration and
log visibility.
Extensible Architecture
Add new providers
by inheriting eb.ai.base.provider. Register
the service and selection value — no changes to consuming modules.
Chat Mixin
Reusable eb.ai.chat.mixin for models that need threaded
AI conversation support out of the box.
Core Data Models
Four focused models — no bloat, no budget engine, no onboarding wizard.
AI Provider
Type, API key, base URL, Azure fields, temperature, tokens, system prompt, default flag.
LLM Model
Model code, display name, context window, and default selection per provider.
Prompt Template
Reusable system-prompt library — shared or company-private snippets.
Token Log
Append-only usage records — prompt/completion tokens, user, company, model.
Developer API
Any Odoo module
that depends on eb_ai_base
can call LLMs in three lines — no HTTP client duplication.
# In your consuming module provider = self.env["eb.ai.provider"].search([ ("is_default", "=", True), ("company_id", "=", self.env.company.id), ], limit=1) service = provider._get_service() result = service.call_llm(provider, [ {"role": "system", "content": provider.system_prompt or ""}, {"role": "user", "content": user_prompt}, ]) answer = result["content"] # + prompt_tokens, completion_tokens
Works with Prime Dashboard
eb_dashboard_prime is the flagship consumer — AI dashboard architect, chart insights, dashboard chat, chart recommendations, and executive PDF reports all route through EB AI Base providers.
Ready to add AI to your Odoo modules?
Install EB AI Base alongside Prime Dashboard or your own custom module. Configure once — deploy AI everywhere.
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module