This module adds a connector for OpenAI API and brings the power of ChatGPT and DALL-E into Odoo.
To create a custom OpenAI Completion, Edit or Image, check how to set properly API parameters : API Documentation
Create an account on https://beta.openai.com/
Create your API Key: API keys
In Settings, fill the API Key field:
To create a new OpenAI Completion, go to Settings, Technical, OpenAI Completion and create a new record.
Model: The model on witch the completion will be applied.
Target Field: The field where the generated value will be saved.
Domain: The domain to select the records on witch the completion will be run.
Check the API Documentation to set OpenAI Parameters values.
For Completion results go to Settings, Technical, OpenAI Completion Results
To create a new OpenAI Edit, go to Settings, Technical, OpenAI Edit and create a new record.
For results go to Settings, Technical, OpenAI Edit Results
To create a new OpenAI Image, go to Settings, Technical, OpenAI Image and create a new record.
For results go to Settings, Technical, OpenAI Image Results
Write a prompt template in Qweb:
Test actions use the first record selected by the domain.
Test first your prompt to adjust your template, then test the result of the Completion, Edit or Image to adjust OpenAI parameters.
This module requires the Python client library for OpenAI API
pip install openai