Grammar Correction
Corrects grammar in provided 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 that needs grammar correction.
Options
- Model - The OpenAI model to use for grammar correction. 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
- Corrected Text - The grammatically corrected version of the input text.
How It Works
The Grammar Correction node uses OpenAI models to identify and correct grammatical errors in provided text. When executed, the node:
- Validates the provided Connection Id
- Prepares a system prompt instructing the model to convert statements to standard English
- Sends the input text along with the prompt to the selected OpenAI model
- Processes the model's response to extract the corrected text
- Returns the corrected text as output
Requirements
- A valid OpenAI API key or Robomotion Credits
- An active OpenAI connection
- Input text to correct
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
- For best results, provide clear and complete sentences
- The Max Tokens option can be adjusted based on the length of the input text
- When using Robomotion Credits, the timeout can be customized for better performance