OpenAI action
  • 03 Jan 2024
  • 1 Minute to read
  • Contributors
  • Dark
    Light
  • PDF

OpenAI action

  • Dark
    Light
  • PDF

Article Summary

The Capture from OpenAI action is an advanced feature. It involves sending the specified input text to the OpenAI service and saving the response into specified fields. It is important to note that the accuracy of the results is not guaranteed. It is recommended to use this feature at your own risk. The OpenAI service excels in processing complex and unstructured text to generate structured results. It can be used in many ways, such as extracting specific facts from free-form text, generating summaries of longer text, or performing sentiment analysis.

Use a Capture from OpenAI action to enrich data captured in your agent by sending it through the OpenAI API and asking it to extract the text into structured data fields that will be captured. Before using this type of action in your account, your OpenAI API key must be configured.

Steps for setting up Account to use Capture from OpenAI:

  1. Set up your account and API key at https://openai.com/

  2. Close the Agent Builder

  3. Log in to the Mozenda Web Console

  4. Navigate to the Account Settings Summary page

  5. Select OpenAI from the page menu
    Account OpenAI

  6. Insert and Save your API key

OpenAI key

  1. Open the Agent Builder and Open an Agent/Start a new Agent
  2. Create a Capture Text Action for the text that you would like to pass through to OpenAI
  3. Create a Capture from OpenAI Action and follow the directions
    Capture from OpenAI

Input: The input box is used to input the text that will be sent in the OpenAI prompt to be
evaluated.
Optimize input text before uploading checkbox: Checking this box will try to optimize the text being sent to OpenAI by removing certain words and phrases that the AI does not need. Reduce the size of the text sent to OpenAI reduces the cost and increases the performance.
Prompt: The prompt helps to tell OpenAI what you are looking for in a broad perspective. Typically, the default prompt supplied is sufficient.
Output Field(s): The output field value pairs of Field name and Description.
Field name: The name of the field you want returned.
Description: Simple description of the data that the field is trying to return.
10. Test the agent to allow the request to be sent to OpenAI

Note: After the OpenAI action has been allowed to run the user can use the Refine Captured Text to refine the data sent back from the OpenAI API.
Refine OpenAI


Was this article helpful?