FlowGptPrompt
Represents a GPT prompt step within a workflow, handling query execution and results.
Properties
Name | Description |
---|---|
Key | A unique identifier for the workflow step. |
WorkflowCodeInstance | The workflow code instance associated with the flow object. |
CachedDMObjects | The cached document management objects related to the flow object. |
ExecutionType | Indicates the execution type of the GPT query. |
QueryId | Specifies the unique identifier for the GPT query. |
Structure | Defines the structure of the GPT query return type. |
QueryName | The name of the GPT query to be executed. |
TypeCode | The type code associated with the flow object. |
QueryParameters | A list of parameters used for the GPT query execution. |
ResumeOnError | Determines whether the query execution should continue when an error occurs. |
ErrorOptions | Defines error-related options for the API step. |
Name | Name for the workflow step. |
ResultObjectName | Specifies the object name to store the query results. |
QueryResult | Holds the result of the executed query. |
Caption | The caption dictionary representing localized captions for the flow object. |
Constructors
Name | Description |
---|---|
FlowGptPrompt(name, workflowData, workflowCodeInstance) | Constructor for the FlowGptPrompt class. Initializes a new instance of the FlowGptPrompt class. |
FlowGptPrompt(name, workflowData, workflowCodeInstance) | Initializes a new instance of the FlowGptPrompt class. |
FlowGptPrompt(name,workflowData,workflowCodeInstance) | Initializes a new instance of the FlowGptPrompt class with a name, workflow data, and workflow code instance. |
Methods
Name | Description |
---|---|
ExecuteQueryAsync() | Executes the GPT query asynchronously and stores the results. |
Initialize() | Initializes the FlowGptPrompt step with necessary configurations. |
GetResult<T>() | Executes the query and returns the result as an IEnumerable of type T , where T is the C# class representing the JSON structure returned by the query. |
ToLiquid() | Converts the query result to a Liquid-compatible format for template rendering. |
Events
Name | Description |
---|---|
OnBeforeExecution(sender, args) | Occurs before the execution of the workflow step. |
OnAfterExecution(sender, args) | Occurs after the execution of the workflow step. |
Generic Types
Name | Description |
---|---|
TProperties | Generic type of properties. |