Metadata-Version: 2.1
Name: odoo-addon-ai_oca_bridge_document_page
Version: 17.0.2.0.0
Requires-Python: >=3.10
Requires-Dist: odoo-addon-ai_oca_bridge>=17.0dev,<17.1dev
Requires-Dist: odoo-addon-document_page>=17.0dev,<17.1dev
Requires-Dist: odoo>=17.0a,<17.1dev
Summary: Adds Documents synchronization using AI Bridges
Home-page: https://github.com/OCA/ai
License: AGPL-3
Author: Binhex,Odoo Community Association (OCA)
Author-email: support@odoo-community.org
Classifier: Programming Language :: Python
Classifier: Framework :: Odoo
Classifier: Framework :: Odoo :: 17.0
Classifier: License :: OSI Approved :: GNU Affero General Public License v3
Description-Content-Type: text/x-rst

.. image:: https://odoo-community.org/readme-banner-image
   :target: https://odoo-community.org/get-involved?utm_source=readme
   :alt: Odoo Community Association

===========================
Ai Oca Bridge Document Page
===========================

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

.. |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/license-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/17.0/ai_oca_bridge_document_page
    :alt: OCA/ai
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
    :target: https://translation.odoo-community.org/projects/ai-17-0/ai-17-0-ai_oca_bridge_document_page
    :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=17.0
    :alt: Try me on Runboat

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

This module is intended for allowing users to use OCA's Knowledge app
for as a source of knowledge for AI Agents, although this is not the
only usage this module could have

**Table of contents**

.. contents::
   :local:

Configuration
=============

Configuration Guide
-------------------

To use this module as intended, two components must be configured:

1. **Bridge configuration on the Odoo side**
2. **An endpoint capable of handling bridge requests**

For an agent to have updated RAG (Retrieval-Augmented Generation)
capabilities, you must create at least **three bridges** for each active
knowledge database:

- | **Bridge with ``Usage = "AI Thread Create"``**
  | Adds document pages to the external database used by agents.

- | **Bridge with ``Usage = "AI Thread Write"``**
  | Updates document pages already on the external database used by
    agents.

- | **Bridge with ``Usage = "AI Thread Unlink"``**
  | Removes document pages from the external database when those pages
    are deleted from Odoo.

For creating those bridges, apart from the usage of the bridge, the user
must define:

- Payload Type: it depends on the endpoint configuration, normally
  "Record" would work.
- Result Type: for this case "No processing" is OK.
- Model: select the "Document Page" model
- Field: add at least the fields the endpoint is expecting on the other
  side.
- Filter: add a domain for using the bridge only with the documents
  intended to trigger bridge

For context, you can download an `example n8n workflow JSON
file <../static/description/RagCapabilitiesWithOdooKnowledge.json>`__
capable of handling the bridge with ``Usage = "AI Thread Create"``. This
workflow includes a manual trigger for testing purposes. Remember to
update the models and database knowledge as needed.

Usage
=====

Depending on the bridges you have created, create, update or delete a
Document Page mathing the bridge domain. You should see the execution on
the AI Bridge Execution menu.

For testing the endpoint side, you can download `this n8n workflow
JSON <../static/description/RagCapabilitiesWithOdooKnowledge.json>`__,
capable of inserting information on the database. Keep in mind that for
this to work at least ``content``, ``display_name`` and ``draft_name``
fields should be included on the list of fields

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_oca_bridge_document_page%0Aversion:%2017.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
-------

* Binhex

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

- `Binhex <https://www.binhex.cloud/>`__

  - Ariel Barreiros

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/17.0/ai_oca_bridge_document_page>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
