Friday, April 25, 2025
1 change · master
New functionality added to Odoo
Adds a new AI module that lets businesses create assistants able to answer questions using uploaded documents and web pages. The first supported action lets these assistants schedule calendar events, helping users move from information retrieval to simple task completion inside Odoo.
Original PR description
This commit introduces a new ai module as well as a bridge module ai_calendar. This module allows for the creation of AI agents designed for retrieval-augmented generation (RAG), using context…
This commit introduces a new ai module as well as a bridge module ai_calendar. This module allows for the creation of AI agents designed for retrieval-augmented generation (RAG), using context extracted from uploaded documents and web pages. Aside from answering questions, the agents can also perform actions on the database. Currently, they can create calendar events with users through integration with the calendar module. This module also introduces one new dependency: `markdown2`. - `markdown2` is used for converting the response of the LLM APIs from markdown to html for rendering in the chat messages. As for the technical features of the module: - Creation of AI agents that use models from various providers. The agents can be fine-tuned for specific tasks by specifying system prompts, and providing relevant documents. - Indexation and chunking of documents (e.g. PDF, ppt, docs, etc.) and web pages for easy retrieval when creating the RAG. - Integration with server actions to allow agents to perform operations directly within Odoo database. Choices: - Markdown library: two libraries were considered during development for the conversion of markdown to html: `markdown`, and `markdown2`. For this choice, we considered the performances and the features proposed by the two libraries. In terms of performance, `markdown` we conducted a benchmark that consisted in the conversion of a big markdown file (~2.3MB) from which `markdown` came out on top. However, when considering the features, `markdown2` proposes more features "out-of-the-box" and is also more robust for standard markdown, specifically for the use case of nested lists. Which is why we decided to work with `markdown2` Limitations: - The agents' backend currently only support two OpenAI models (GPT 3.5, and GPT 4). - The AI actions are limited to scheduling of calendar events. - Embedding generation is currently fixed to use the OpenAI API, requiring an OpenAI key, and the database column size for storing embeddings is predefined. task-4526285 Co-authored-by: deimort <dpro@odoo.com> Co-authored-by: abdelrahmanfawzy <abdh@odoo.com> Co-authored-by: abdelrahmankhaledg <akha@odoo.com> Co-authored-by: lobaudoux <lba@odoo.com>