Submits a prompt to ChatGPT, writing the results either to a FlowFile attribute or to the contents of the FlowFile
text, chatgpt, gpt, machine learning, ML, artificial intelligence, ai, document, langchain
In the list below, the names of required properties appear in bold. Any other properties (not in bold) are considered optional. The table also indicates any default values, and whether a property supports the NiFi Expression Language.
Display Name | API Name | Default Value | Description |
---|---|---|---|
OpenAI Model Name | OpenAI Model Name | gpt-3.5-turbo | The name of the OpenAI Model to use in order to answer the prompt Supports Expression Language: true (will be evaluated using flow file attributes and Environment variables) |
Prompt | Prompt | The prompt to issue to ChatGPT. This may use FlowFile attributes via Expression Language and may also reference the FlowFile content by using the literal
{flowfile_content} (including braces) in the prompt. If the FlowFile's content is JSON formatted, a reference may also include JSONPath Expressions
to reference specific fields in the FlowFile content, such as {$.page_content} Supports Expression Language: true (will be evaluated using flow file attributes and Environment variables) | |
Temperature | Temperature | 1.0 | The Temperature parameter to submit to OpenAI. A lower value will result in more consistent answers while a higher value will result in a more creative answer.
"The value must be between 0 and 2, inclusive. Supports Expression Language: true (will be evaluated using flow file attributes and Environment variables) |
Result Attribute | Result Attribute | If specified, the result will be added to the attribute whose name is given. If not specified, the result will be written to the FlowFile's content | |
API Key | API Key | The OpenAI API Key to use Sensitive Property: true | |
Request Timeout | Request Timeout | 60 secs | The amount of time to wait before timing out the request |
Max Tokens to Generate | Max Tokens to Generate | The maximum number of tokens that ChatGPT should generate | |
OpenAI Organization ID | OpenAI Organization ID | The OpenAI Organization ID | |
API Base URL Path | API Base URL Path | The API Base URL to use for interacting with OpenAI. This should be populated only if using a proxy or an emulator. |