Search K
Appearance
Appearance
The AIChat node enables interaction with a configured AI service (e.g., OpenAI) using a custom user prompt and optional context window. It returns the result of the AI response and stores it in a named output variable.
This node is useful when dynamic, intelligent responses or code generation are required based on contextual data and user input within your workflow.
This node sends a request to the AI service using:
User Input
)Context Window
)Request Code Only
)It returns the AI response and optionally parses it as JSON.
Label | Type | Required | Description |
---|---|---|---|
User Input | text | β | The main instruction or question for the AI (e.g., βGenerate a C# class for a user objectβ). |
Context Window | text | β | A block of context to give the AI additional information before the prompt (e.g., system state, variables). |
Request Code Only | checkbox (boolean) | β | If true , AI is prompted to return only code. Useful for generation tasks. |
ServiceAccount-OpenAI | serviceAccount | β | References the ID of the configured OpenAI service account (used for authentication). |
Save to Variable Name | text | β | The name of the output variable to store the AI response in. The response will be parsed to JSON if Request Code Only is checked. |
The AI's response is saved to the variable name defined in Save to Variable Name. If the response is JSON-compatible and Request Code Only
is enabled, the response will be deserialized.
You could use the AIChat node to:
For example:
Generate a class called Employee with Name, ID, and Department fields.
The project is written in C# and uses PascalCase naming.
true
generatedCode
The variable generatedCode
will contain the C# class definition returned by the AI.
If the AI request fails or the service account is misconfigured:
taskSuccess = false
statusReturn = "Fail"
taskMessage
will include the failure messageAISingleRequest()
from the internal AIService
class.Request Code Only
is checked.ServiceAccount-OpenAI
is correctly configured in your environment.