Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 89 additions & 0 deletions ai_connection/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
=============
Ai Connection
=============

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:55879f38672930678ed61631886590084592fb3717aea06b117f3b816e35e826
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fai-lightgray.png?logo=github
:target: https://github.com/OCA/ai/tree/18.0/ai_connection
:alt: OCA/ai
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/ai-18-0/ai-18-0-ai_connection
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/ai&target_branch=18.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This is a module that defines the basic structure of AI Connections.

However, it does not include any extra configurations.

**Table of contents**

.. contents::
:local:

Use Cases / Context
===================

This module allows to create basic configuration of AI connections. It
is left for child modules the specific connection, however, it creates a
basic structure that will be used from it. Check on existent modules to
know how to handle it.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/ai/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/ai/issues/new?body=module:%20ai_connection%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* Dixmit
* SDi

Contributors
------------

- `Dixmit <https://www.dixmit.com>`__

- Enric Tobella

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/ai <https://github.com/OCA/ai/tree/18.0/ai_connection>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
3 changes: 3 additions & 0 deletions ai_connection/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from . import models
from . import wizards
from .client import AiConnectionClient
22 changes: 22 additions & 0 deletions ai_connection/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright 2026 Dixmit
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "Ai Connection",
"summary": """Creates connections to AI systems""",
"version": "18.0.1.0.0",
"license": "AGPL-3",
"author": "Dixmit, SDi, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/ai",
"depends": [
"ai_tool",
],
"data": [
"security/ir.model.access.csv",
"data/cron.xml",
"wizards/ai_connection_run_wizard_views.xml",
"views/ai_connection.xml",
"views/ai_connection_execution.xml",
],
"demo": [],
}
19 changes: 19 additions & 0 deletions ai_connection/client.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright 2026 Dixmit
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).


class AiConnectionClient:
def handle_message(self, messages=None, **kwargs):
"""Handle a message from the AI system.
Will return a dict with the following information:
{
"message": "",
"tool_calls": [
{
"name": "",
"arguments": {},
}
]
}
"""
raise NotImplementedError("Subclasses must implement this method")
23 changes: 23 additions & 0 deletions ai_connection/data/cron.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2026 SDi <amoya@sdi.es>
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<odoo noupdate="1">
<record id="ir_cron_autovacuum_ai_connection_execution_iteration" model="ir.cron">
<field name="name">AI Connection: Autovacuum Iterations</field>
<field name="model_id" ref="model_ai_connection_execution_iteration" />
<field name="state">code</field>
<field name="code">model._autovacuum()</field>
<field name="interval_number">1</field>
<field name="interval_type">days</field>
</record>

<record id="cron_ai_step_processor" model="ir.cron">
<field name="name">AI Connection: Process Step</field>
<field name="model_id" ref="model_ai_connection_execution" />
<field name="state">code</field>
<field name="code">model._cron_process_single_step()</field>
<field name="active" eval="True" />
<field name="interval_number">1</field>
<field name="interval_type">days</field>
</record>
</odoo>
3 changes: 3 additions & 0 deletions ai_connection/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from . import ai_connection
from . import ai_connection_execution
from . import ai_connection_execution_iteration
Loading
Loading