Odoo Chat GPT Integration

ChatGPT Integration for Odoo

This module integrates ChatGPT with Odoo. To use this integration, you need to set up the following parameters in the Odoo system parameters (ir.config_parameter):

These parameters are required for the module to function correctly.

ChatGPT Integration in Odoo

How to Get Your ChatGPT API Key, Organization ID, and Project ID

  1. Go to the OpenAI Platform and log in with your account.
  2. Navigate to the API Keys section in the dashboard.
  3. Click on Create new secret key to generate your API key. Copy and save it securely as you won't be able to view it again.
  4. In the same dashboard, go to the Organization section to find your Organization ID.
  5. For the Project ID, navigate to the Projects section and select the relevant project. The Project ID will be displayed on the project details page.

Installing OpenAI Python Package

To interact with the ChatGPT API in your Odoo module, you need to install the OpenAI Python package. Use the following command:

pip install openai

If you're using Odoo's virtual environment, make sure to activate it first:

                    source path/to/odoo/env/bin/activate
                

Then, install the package:

pip install openai
Note: Make sure to add the OpenAI package to your requirements.txt file if you are deploying your Odoo instance in a production environment.

Example of the Module

Example of ChatGPT Integration Module