- 20 Dec 2024
- 3 Minutes to read
- Print
- DarkLight
OpenAI Module
- Updated on 20 Dec 2024
- 3 Minutes to read
- Print
- DarkLight
Overview
The OpenAI module allows using OpenAI's Chat Generative Pre-Trained Transformer (ChatGPT) within the Decisions workflow. With the ability to Fine-Tune language models, users can create, edit, and moderate data to enhance the application's efficiency, accuracy, and productivity.
This document covers the following topics:
- How does OpenAI Module operate?
- Possible Use Case of OpenAI Module
- Generate OpenAI API Keys
- Installing the OpenAI Module
- Setting Up OpenAI Integration
- OpenAI Steps
How does OpenAI Module operate?
To access the features of OpenAI, admin users must first install the OpenAI module. The installation process serves two essential purposes:
- Exposes OpenAI Settings: This allows the Admin users to enter the OpenAI API Key, ensuring seamless integration with the OpenAI platform.
- Exposes OpenAI Flow steps: The OpenAI module provides pre-built Flow Steps that can be used within the workflow to use OpenAI's models.
The OpenAI Module facilitates communication with OpenAI's API. It acts as a bridge between the platform and OpenAI's language models. When users interact with the OpenAI steps within the Flows, it sends requests to the OpenAI API, providing text-based input or prompts for processing.
The OpenAI API then processes these requests using language models, such as GPT-3.5, GPT-4, etc., generating text-based responses based on the input. These responses are then retrieved and made available to users within the Decisions platform.
Use Case
Document Extraction with ChatGPT:
When suppliers send their invoices in an Accounts Payable Process, users manually enter the invoice details into the accounting system. This consumes time and can lead to human errors. With the help of Decisions workflow and OpenAI Module, users can automatically extract important information from the invoices accurately and feed it into the accounting system. This helps save time and reduces errors, making it easier to manage invoices efficiently.
Watch the following YouTube video explaining the above use case in detail:
Generate OpenAI API Keys
Navigate to the OpenAI platform to generate API Keys. Once you have generated the API Key, store it securely for future usage.
Note: Do not use the trial version of OpenAI API on the Production Servers.
Installing the OpenAI Module
Note: OpenAI module is available only for v8.10 and higher versions.
The OpenAI module is available to install under the My Apps folder. For more information on installing a module, refer to Installing Modules.
Setting Up OpenAI Integration
After installing the module, as mentioned earlier, OpenAI settings will be exposed within the platform.
- Navigate to the Decisions Studio > System > Settings > OpenAI Settings.
- Right-click on the settings > Edit Settings.
- Under the API Key field, paste the already generated key from the OpenAI platform.
OpenAI Steps
The OpenAI module provides pre-built Flow steps allowing users to accomplish various AI-driven tasks in the Flow Designer via Toolbox > Integration > OpenAI. Currently, there are 17 OpenAI steps.
Note: Users can override the API key directly at the Step level.
Files | |
Delete File | This step allows you to remove a specific file from the system. This step effectively deletes the designated file by providing the file ID as input. |
Get File By ID | This step retrieves detailed information about a particular file based on its unique ID. |
List Files | This step retrieves detailed information about a list of files available within the system. |
Upload File | This step enables seamless file uploads into the system. Note: Only JSON Lines file formats will be supported. |
Fine-Tune | |
Cancel Fine Tune | This step allows you to cancel a fine-tuning process that is currently in progress. |
Create Fine Tune | Use this step to initiate a new fine-tuning process for an AI model. |
Delete Fine Tune | This step enables you to remove a completed or ongoing fine-tuning job. |
List Fine Tune Events | Retrieve a comprehensive list of fine-tuning events that have occurred in the system. |
List Fine Tune | This step provides a detailed view of all the current fine-tuning jobs within the system. |
Retrieve Fine Tune | Retrieve specific details of a fine-tuning job by providing its fine-tuning ID. |
Create Chat Completion | This step creates a model response for the given chat conversation. |
Create Completion | This step creates a completion for the provided prompt and parameters. |
Create Edit | This step allows you to edit or modify existing text using OpenAI's language models. |
Create Embedding | This step generates embeddings for the given text. Embeddings represent semantic relationships and contextual information about the text, enabling advanced natural language processing. |
Create Moderation | This step checks input text against OpenAI's content moderation rules. Ensuring control of the output generated by the AI model is compliant with guidelines. |
Get Model | Retrieves a model instance, providing basic information about the model, such as the owner and permissions. |
List Models | Lists the currently available models and provides basic information about each, such as the owner and availability. |