Configure the Natural Language Generation component to use LLMs for multi-turn conversations, knowledge retrieval, and content generation.
Component information
LLM-generated content may be inaccurate. Verify all output before use.
|
Component icon |
Component name |
|
|
Natural Language Generation |
Prerequisites
To configure this component, access the flow canvas by using an existing flow or creating a new one.
Go to the canvas of an existing flow
In the
Create a new flow to open its canvas. For more information, see Create a flow.
Procedure
-
On the canvas, click the Natural Language Generation component icon to open its configuration panel.
In the Model settings area, set the implementation type to Model and the protocol to OpenAI. Enter the
baseUrl,apiKey, and model name, then click Save at the top. -
Configure the component as needed. Each setting is described in Parameters.
After you finish the configuration, click Save. In the dialog box that appears, click Save.
Parameters
1. Model settings
Click Implementation Type and select either Model or Application. Parameters vary by selection.
Model
|
Parameter |
Description |
|
Protocol |
Only OpenAI is supported when the implementation type is Model. |
|
baseUrl |
The model service endpoint, such as |
|
apiKey |
The API key for the model service. |
|
Model Name |
The name of the model to use, such as |
|
Initial Prompt |
Sets the context for the model session and guides output. Example: "You are a witty comedian. Use humorous language in your responses." |
|
Model Input |
Input for the current conversation turn. Reference variables directly or embed them in text, such as |
|
Model Output Variable Name |
Variable name for the model output. Use in subsequent steps or as a reply. |
|
Fallback Text |
Output when the model service is unavailable. Example: "Sorry, I am unable to answer your question at the moment." |
Application
|
Parameter |
Description |
|
Protocol |
Only Dashscope is supported when the implementation type is Application. Note
Learn how to build applications in Application development. |
|
apiKey |
The API key for the application service. Note
|
|
workspaceId |
The workspace ID containing the application (agent or workflow). Required for sub-workspaces; optional for the default workspace. |
|
appId |
The application ID. |
|
Application Input |
Input for the current conversation turn. Reference variables directly or embed them in text, such as |
|
Custom Pass-through Parameters |
Custom parameters passed to the application, such as |
|
Application Output Variable Name |
Variable name for the application output. Use in subsequent steps or as a reply. |
|
Fallback Text |
Output when the application service is unavailable. Example: "Sorry, I am unable to answer your question at the moment." |
2. Request header
Request header configuration is Implementation Type when the Application is set to Application.
|
Parameter |
Description |
|
request header configuration |
HTTP request headers with the following fields:
|
3. Multi-message processing
|
Parameter |
Description |
|
processing method |
Determines how new messages are handled while the LLM processes the current one.
|