Extract Data
ActionStep Reference » OpenAI » Extraction » Extract Data
- Open the OpenAI node in the Workspace Explorer.
- In the OpenAI node, select the Extract Data ActionStep.
Parameters:
The ActionStep has the following input parameters:
Name |
Description
|
---|---|
API Key
|
The key required to authenticate and access OpenAI's API services.
Allowed Context Scopes [Fixed, Local, Global, Reference] Allowed Context Types [Fixed, Variable, Parameter, Result, Enum] Allowed Context Values [String] |
Content
|
The text content.
Allowed Context Scopes [Fixed, Local, Global, Reference] Allowed Context Types [Fixed, Variable, Parameter, Result, Enum] Allowed Context Values [String] |
Data To Extract
|
Specific instructions or criteria defining what information should be extracted from the Content.
Allowed Context Scopes [Fixed, Local, Global, Reference] Allowed Context Types [Fixed, Variable, Parameter, Result, Enum] Allowed Context Values [String] |
Timeout
|
The timeout in milliseconds for the API request.
Allowed Context Scopes [Fixed, Local, Global, Reference] Allowed Context Types [Fixed, Variable, Parameter, Result, Enum] Allowed Context Values [Int64] |
Model
|
Specifies which OpenAI model to use for the data extraction task (e.g., GPT-3, GPT-4).
Allowed Context Scopes [Fixed, Local, Global, Reference] Allowed Context Types [Fixed, Variable, Parameter, Result, Enum] Allowed Context Values [String] |
Maximum Tokens
|
Sets the upper limit on the number of tokens (words and characters) in the generated response.
Allowed Context Scopes [Fixed, Local, Global, Reference] Allowed Context Types [Fixed, Variable, Parameter, Result, Enum] Allowed Context Values [Int64] |
Output Template
|
A predefined format or template that dictates how the extracted data should be structured and presented in the output.
Allowed Context Scopes [Fixed] Allowed Context Types [Fixed] |
Results:
The ActionStep returns the following results:
name |
Description
|
---|---|
Success
|
Indicates the result of the OpenAI request.
Allowed Context Scopes [Fixed] Allowed Context Types [Fixed] Allowed Context Values [Boolean] |
Output
|
Contains the extracted content or data as processed by OpenAI. The nature of this output depends on the Data To Extract criteria and, if applicable, the Output Template.
Allowed Context Scopes [Fixed] Allowed Context Types [Fixed] |
Example 1 (Text Generation and Data Extraction ):
This example demonstrates an ActionScript that performs text generation followed by data extraction. Initially, the script generates text about notable sights in New York City using the OpenAI Generate Text ActionStep. Then, it concatenates the lines of the generated text for further processing. Next, the OpenAI Extract Data ActionStep is executed with the task of summarizing the content in 100 words. It uses a specific OpenAI model, sets a randomness parameter, and defines the maximum number of tokens for the output. The successful execution of this script results in a concise summary of the key sights in New York City, as shown in the Output section of the result list.