Extract Keywords
Extracts keywords from a given text using OpenAI models.
Common Properties
- Name - The custom name of the node.
- Color - The custom color of the node.
- Delay Before (sec) - Waits in seconds before executing the node.
- Delay After (sec) - Waits in seconds after executing node.
- Continue On Error - Automation will continue regardless of any error. The default value is false.
info
If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.
Inputs
- Connection Id - The connection ID for the OpenAI service.
- Input Text - The text from which keywords will be extracted.
Options
- Model - The OpenAI model to use for keyword extraction. Options include:
- gpt-3.5-turbo
- gpt-3.5-turbo-instruct
- gpt-4-turbo
- gpt-4
- gpt-4-32k
- Max Tokens - The maximum number of tokens to generate in the completion.
- Timeout (sec) - Timeout for the request. Only available with Robomotion Credits. Leave blank for default value (120+).
Output
- Keywords - A list of keywords extracted from the input text.
How It Works
The Extract Keywords node uses OpenAI models to identify and extract relevant keywords from provided text. When executed, the node:
- Validates the provided Connection Id
- Prepares a system prompt instructing the model to extract keywords from text
- Sends the input text along with the prompt to the selected OpenAI model
- Processes the model's response to extract keywords in a list format
- Returns the keywords as a list output
Requirements
- A valid OpenAI API key or Robomotion Credits
- An active OpenAI connection
- Input text to analyze
Error Handling
The node will return specific errors in the following cases:
- Empty or invalid Connection Id
- Empty or invalid Input Text
- Invalid Max Tokens value
- OpenAI API errors
- Timeout errors
Usage Notes
- The default model is gpt-3.5-turbo, which provides a good balance of performance and cost
- Keywords are returned as a list, separated by commas in the model response
- For best results, provide clear and concise input text
- The Max Tokens option can be adjusted based on the expected length of the keyword list
- When using Robomotion Credits, the timeout can be customized for better performance