- Print
- DarkLight
- PDF
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:
Set up your account and API key at https://openai.com/
Close the Agent Builder
Log in to the Mozenda Web Console
Navigate to the Account Settings Summary page
Select OpenAI from the page menu
Insert and Save your API key
- Open the Agent Builder and Open an Agent/Start a new Agent
- Create a Capture Text Action for the text that you would like to pass through to OpenAI
- Create a Capture from OpenAI Action and follow the directions
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.