PromptChatGPT

Description:

Submits a prompt to ChatGPT, writing the results either to a FlowFile attribute or to the contents of the FlowFile

Tags:

text, chatgpt, gpt, machine learning, ML, artificial intelligence, ai, document, langchain

Properties:

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 NameAPI NameDefault ValueDescription
OpenAI Model NameOpenAI Model Namegpt-3.5-turboThe 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)
PromptPromptThe 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)
TemperatureTemperature1.0The 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 AttributeResult AttributeIf 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 KeyAPI KeyThe OpenAI API Key to use
Sensitive Property: true
Request TimeoutRequest Timeout60 secsThe amount of time to wait before timing out the request
Max Tokens to GenerateMax Tokens to GenerateThe maximum number of tokens that ChatGPT should generate
OpenAI Organization IDOpenAI Organization IDThe OpenAI Organization ID
API Base URL PathAPI Base URL PathThe API Base URL to use for interacting with OpenAI. This should be populated only if using a proxy or an emulator.