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