1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. diagflow
  5. CxGenerator
Google Cloud v8.41.1 published on Monday, Aug 25, 2025 by Pulumi

gcp.diagflow.CxGenerator

Explore with Pulumi AI

gcp logo
Google Cloud v8.41.1 published on Monday, Aug 25, 2025 by Pulumi

    Generators contain prompt to be sent to the LLM model to generate text. The prompt can contain parameters which will be resolved before calling the model. It can optionally contain banned phrases to ensure the model responses are safe.

    To get more information about Generator, see:

    Example Usage

    Dialogflowcx Generator Basic

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const agent = new gcp.diagflow.CxAgent("agent", {
        displayName: "dialogflowcx-agent-fucntion",
        location: "global",
        defaultLanguageCode: "en",
        supportedLanguageCodes: [
            "fr",
            "de",
            "es",
        ],
        timeZone: "America/New_York",
        description: "Example description.",
    });
    const generator = new gcp.diagflow.CxGenerator("generator", {
        parent: agent.id,
        languageCode: "fr",
        displayName: "TF Prompt generator",
        llmModelSettings: {
            model: "gemini-2.0-flash-001",
            promptText: "Return me some great results",
        },
        promptText: {
            text: "Send me great results in french",
        },
        modelParameter: {
            temperature: 0.55,
        },
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    agent = gcp.diagflow.CxAgent("agent",
        display_name="dialogflowcx-agent-fucntion",
        location="global",
        default_language_code="en",
        supported_language_codes=[
            "fr",
            "de",
            "es",
        ],
        time_zone="America/New_York",
        description="Example description.")
    generator = gcp.diagflow.CxGenerator("generator",
        parent=agent.id,
        language_code="fr",
        display_name="TF Prompt generator",
        llm_model_settings={
            "model": "gemini-2.0-flash-001",
            "prompt_text": "Return me some great results",
        },
        prompt_text={
            "text": "Send me great results in french",
        },
        model_parameter={
            "temperature": 0.55,
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/diagflow"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		agent, err := diagflow.NewCxAgent(ctx, "agent", &diagflow.CxAgentArgs{
    			DisplayName:         pulumi.String("dialogflowcx-agent-fucntion"),
    			Location:            pulumi.String("global"),
    			DefaultLanguageCode: pulumi.String("en"),
    			SupportedLanguageCodes: pulumi.StringArray{
    				pulumi.String("fr"),
    				pulumi.String("de"),
    				pulumi.String("es"),
    			},
    			TimeZone:    pulumi.String("America/New_York"),
    			Description: pulumi.String("Example description."),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = diagflow.NewCxGenerator(ctx, "generator", &diagflow.CxGeneratorArgs{
    			Parent:       agent.ID(),
    			LanguageCode: pulumi.String("fr"),
    			DisplayName:  pulumi.String("TF Prompt generator"),
    			LlmModelSettings: &diagflow.CxGeneratorLlmModelSettingsArgs{
    				Model:      pulumi.String("gemini-2.0-flash-001"),
    				PromptText: pulumi.String("Return me some great results"),
    			},
    			PromptText: &diagflow.CxGeneratorPromptTextArgs{
    				Text: pulumi.String("Send me great results in french"),
    			},
    			ModelParameter: &diagflow.CxGeneratorModelParameterArgs{
    				Temperature: pulumi.Float64(0.55),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var agent = new Gcp.Diagflow.CxAgent("agent", new()
        {
            DisplayName = "dialogflowcx-agent-fucntion",
            Location = "global",
            DefaultLanguageCode = "en",
            SupportedLanguageCodes = new[]
            {
                "fr",
                "de",
                "es",
            },
            TimeZone = "America/New_York",
            Description = "Example description.",
        });
    
        var generator = new Gcp.Diagflow.CxGenerator("generator", new()
        {
            Parent = agent.Id,
            LanguageCode = "fr",
            DisplayName = "TF Prompt generator",
            LlmModelSettings = new Gcp.Diagflow.Inputs.CxGeneratorLlmModelSettingsArgs
            {
                Model = "gemini-2.0-flash-001",
                PromptText = "Return me some great results",
            },
            PromptText = new Gcp.Diagflow.Inputs.CxGeneratorPromptTextArgs
            {
                Text = "Send me great results in french",
            },
            ModelParameter = new Gcp.Diagflow.Inputs.CxGeneratorModelParameterArgs
            {
                Temperature = 0.55,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.diagflow.CxAgent;
    import com.pulumi.gcp.diagflow.CxAgentArgs;
    import com.pulumi.gcp.diagflow.CxGenerator;
    import com.pulumi.gcp.diagflow.CxGeneratorArgs;
    import com.pulumi.gcp.diagflow.inputs.CxGeneratorLlmModelSettingsArgs;
    import com.pulumi.gcp.diagflow.inputs.CxGeneratorPromptTextArgs;
    import com.pulumi.gcp.diagflow.inputs.CxGeneratorModelParameterArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var agent = new CxAgent("agent", CxAgentArgs.builder()
                .displayName("dialogflowcx-agent-fucntion")
                .location("global")
                .defaultLanguageCode("en")
                .supportedLanguageCodes(            
                    "fr",
                    "de",
                    "es")
                .timeZone("America/New_York")
                .description("Example description.")
                .build());
    
            var generator = new CxGenerator("generator", CxGeneratorArgs.builder()
                .parent(agent.id())
                .languageCode("fr")
                .displayName("TF Prompt generator")
                .llmModelSettings(CxGeneratorLlmModelSettingsArgs.builder()
                    .model("gemini-2.0-flash-001")
                    .promptText("Return me some great results")
                    .build())
                .promptText(CxGeneratorPromptTextArgs.builder()
                    .text("Send me great results in french")
                    .build())
                .modelParameter(CxGeneratorModelParameterArgs.builder()
                    .temperature(0.55)
                    .build())
                .build());
    
        }
    }
    
    resources:
      agent:
        type: gcp:diagflow:CxAgent
        properties:
          displayName: dialogflowcx-agent-fucntion
          location: global
          defaultLanguageCode: en
          supportedLanguageCodes:
            - fr
            - de
            - es
          timeZone: America/New_York
          description: Example description.
      generator:
        type: gcp:diagflow:CxGenerator
        properties:
          parent: ${agent.id}
          languageCode: fr
          displayName: TF Prompt generator
          llmModelSettings:
            model: gemini-2.0-flash-001
            promptText: Return me some great results
          promptText:
            text: Send me great results in french
          modelParameter:
            temperature: 0.55
    

    Create CxGenerator Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new CxGenerator(name: string, args: CxGeneratorArgs, opts?: CustomResourceOptions);
    @overload
    def CxGenerator(resource_name: str,
                    args: CxGeneratorArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def CxGenerator(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    display_name: Optional[str] = None,
                    prompt_text: Optional[CxGeneratorPromptTextArgs] = None,
                    language_code: Optional[str] = None,
                    llm_model_settings: Optional[CxGeneratorLlmModelSettingsArgs] = None,
                    model_parameter: Optional[CxGeneratorModelParameterArgs] = None,
                    parent: Optional[str] = None,
                    placeholders: Optional[Sequence[CxGeneratorPlaceholderArgs]] = None)
    func NewCxGenerator(ctx *Context, name string, args CxGeneratorArgs, opts ...ResourceOption) (*CxGenerator, error)
    public CxGenerator(string name, CxGeneratorArgs args, CustomResourceOptions? opts = null)
    public CxGenerator(String name, CxGeneratorArgs args)
    public CxGenerator(String name, CxGeneratorArgs args, CustomResourceOptions options)
    
    type: gcp:diagflow:CxGenerator
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args CxGeneratorArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args CxGeneratorArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args CxGeneratorArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CxGeneratorArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CxGeneratorArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var cxGeneratorResource = new Gcp.Diagflow.CxGenerator("cxGeneratorResource", new()
    {
        DisplayName = "string",
        PromptText = new Gcp.Diagflow.Inputs.CxGeneratorPromptTextArgs
        {
            Text = "string",
        },
        LanguageCode = "string",
        LlmModelSettings = new Gcp.Diagflow.Inputs.CxGeneratorLlmModelSettingsArgs
        {
            Model = "string",
            PromptText = "string",
        },
        ModelParameter = new Gcp.Diagflow.Inputs.CxGeneratorModelParameterArgs
        {
            MaxDecodeSteps = 0,
            Temperature = 0,
            TopK = 0,
            TopP = 0,
        },
        Parent = "string",
        Placeholders = new[]
        {
            new Gcp.Diagflow.Inputs.CxGeneratorPlaceholderArgs
            {
                Id = "string",
                Name = "string",
            },
        },
    });
    
    example, err := diagflow.NewCxGenerator(ctx, "cxGeneratorResource", &diagflow.CxGeneratorArgs{
    	DisplayName: pulumi.String("string"),
    	PromptText: &diagflow.CxGeneratorPromptTextArgs{
    		Text: pulumi.String("string"),
    	},
    	LanguageCode: pulumi.String("string"),
    	LlmModelSettings: &diagflow.CxGeneratorLlmModelSettingsArgs{
    		Model:      pulumi.String("string"),
    		PromptText: pulumi.String("string"),
    	},
    	ModelParameter: &diagflow.CxGeneratorModelParameterArgs{
    		MaxDecodeSteps: pulumi.Int(0),
    		Temperature:    pulumi.Float64(0),
    		TopK:           pulumi.Int(0),
    		TopP:           pulumi.Float64(0),
    	},
    	Parent: pulumi.String("string"),
    	Placeholders: diagflow.CxGeneratorPlaceholderArray{
    		&diagflow.CxGeneratorPlaceholderArgs{
    			Id:   pulumi.String("string"),
    			Name: pulumi.String("string"),
    		},
    	},
    })
    
    var cxGeneratorResource = new CxGenerator("cxGeneratorResource", CxGeneratorArgs.builder()
        .displayName("string")
        .promptText(CxGeneratorPromptTextArgs.builder()
            .text("string")
            .build())
        .languageCode("string")
        .llmModelSettings(CxGeneratorLlmModelSettingsArgs.builder()
            .model("string")
            .promptText("string")
            .build())
        .modelParameter(CxGeneratorModelParameterArgs.builder()
            .maxDecodeSteps(0)
            .temperature(0.0)
            .topK(0)
            .topP(0.0)
            .build())
        .parent("string")
        .placeholders(CxGeneratorPlaceholderArgs.builder()
            .id("string")
            .name("string")
            .build())
        .build());
    
    cx_generator_resource = gcp.diagflow.CxGenerator("cxGeneratorResource",
        display_name="string",
        prompt_text={
            "text": "string",
        },
        language_code="string",
        llm_model_settings={
            "model": "string",
            "prompt_text": "string",
        },
        model_parameter={
            "max_decode_steps": 0,
            "temperature": 0,
            "top_k": 0,
            "top_p": 0,
        },
        parent="string",
        placeholders=[{
            "id": "string",
            "name": "string",
        }])
    
    const cxGeneratorResource = new gcp.diagflow.CxGenerator("cxGeneratorResource", {
        displayName: "string",
        promptText: {
            text: "string",
        },
        languageCode: "string",
        llmModelSettings: {
            model: "string",
            promptText: "string",
        },
        modelParameter: {
            maxDecodeSteps: 0,
            temperature: 0,
            topK: 0,
            topP: 0,
        },
        parent: "string",
        placeholders: [{
            id: "string",
            name: "string",
        }],
    });
    
    type: gcp:diagflow:CxGenerator
    properties:
        displayName: string
        languageCode: string
        llmModelSettings:
            model: string
            promptText: string
        modelParameter:
            maxDecodeSteps: 0
            temperature: 0
            topK: 0
            topP: 0
        parent: string
        placeholders:
            - id: string
              name: string
        promptText:
            text: string
    

    CxGenerator Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The CxGenerator resource accepts the following input properties:

    DisplayName string
    The human-readable name of the generator, unique within the agent.
    PromptText CxGeneratorPromptText
    Prompt for the LLM model. Structure is documented below.
    LanguageCode string
    The language to create generators for the following fields:

    • Generator.prompt_text.text If not specified, the agent's default language is used.
    LlmModelSettings CxGeneratorLlmModelSettings
    The LLM model settings. Structure is documented below.
    ModelParameter CxGeneratorModelParameter
    Parameters passed to the LLM to configure its behavior. Structure is documented below.
    Parent string
    The agent to create a Generator for. Format: projects//locations//agents/.
    Placeholders List<CxGeneratorPlaceholder>
    List of custom placeholders in the prompt text. Structure is documented below.
    DisplayName string
    The human-readable name of the generator, unique within the agent.
    PromptText CxGeneratorPromptTextArgs
    Prompt for the LLM model. Structure is documented below.
    LanguageCode string
    The language to create generators for the following fields:

    • Generator.prompt_text.text If not specified, the agent's default language is used.
    LlmModelSettings CxGeneratorLlmModelSettingsArgs
    The LLM model settings. Structure is documented below.
    ModelParameter CxGeneratorModelParameterArgs
    Parameters passed to the LLM to configure its behavior. Structure is documented below.
    Parent string
    The agent to create a Generator for. Format: projects//locations//agents/.
    Placeholders []CxGeneratorPlaceholderArgs
    List of custom placeholders in the prompt text. Structure is documented below.
    displayName String
    The human-readable name of the generator, unique within the agent.
    promptText CxGeneratorPromptText
    Prompt for the LLM model. Structure is documented below.
    languageCode String
    The language to create generators for the following fields:

    • Generator.prompt_text.text If not specified, the agent's default language is used.
    llmModelSettings CxGeneratorLlmModelSettings
    The LLM model settings. Structure is documented below.
    modelParameter CxGeneratorModelParameter
    Parameters passed to the LLM to configure its behavior. Structure is documented below.
    parent String
    The agent to create a Generator for. Format: projects//locations//agents/.
    placeholders List<CxGeneratorPlaceholder>
    List of custom placeholders in the prompt text. Structure is documented below.
    displayName string
    The human-readable name of the generator, unique within the agent.
    promptText CxGeneratorPromptText
    Prompt for the LLM model. Structure is documented below.
    languageCode string
    The language to create generators for the following fields:

    • Generator.prompt_text.text If not specified, the agent's default language is used.
    llmModelSettings CxGeneratorLlmModelSettings
    The LLM model settings. Structure is documented below.
    modelParameter CxGeneratorModelParameter
    Parameters passed to the LLM to configure its behavior. Structure is documented below.
    parent string
    The agent to create a Generator for. Format: projects//locations//agents/.
    placeholders CxGeneratorPlaceholder[]
    List of custom placeholders in the prompt text. Structure is documented below.
    display_name str
    The human-readable name of the generator, unique within the agent.
    prompt_text CxGeneratorPromptTextArgs
    Prompt for the LLM model. Structure is documented below.
    language_code str
    The language to create generators for the following fields:

    • Generator.prompt_text.text If not specified, the agent's default language is used.
    llm_model_settings CxGeneratorLlmModelSettingsArgs
    The LLM model settings. Structure is documented below.
    model_parameter CxGeneratorModelParameterArgs
    Parameters passed to the LLM to configure its behavior. Structure is documented below.
    parent str
    The agent to create a Generator for. Format: projects//locations//agents/.
    placeholders Sequence[CxGeneratorPlaceholderArgs]
    List of custom placeholders in the prompt text. Structure is documented below.
    displayName String
    The human-readable name of the generator, unique within the agent.
    promptText Property Map
    Prompt for the LLM model. Structure is documented below.
    languageCode String
    The language to create generators for the following fields:

    • Generator.prompt_text.text If not specified, the agent's default language is used.
    llmModelSettings Property Map
    The LLM model settings. Structure is documented below.
    modelParameter Property Map
    Parameters passed to the LLM to configure its behavior. Structure is documented below.
    parent String
    The agent to create a Generator for. Format: projects//locations//agents/.
    placeholders List<Property Map>
    List of custom placeholders in the prompt text. Structure is documented below.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the CxGenerator resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The unique identifier of the Generator. Format: projects//locations//agents//generators/.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The unique identifier of the Generator. Format: projects//locations//agents//generators/.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The unique identifier of the Generator. Format: projects//locations//agents//generators/.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    The unique identifier of the Generator. Format: projects//locations//agents//generators/.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    The unique identifier of the Generator. Format: projects//locations//agents//generators/.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The unique identifier of the Generator. Format: projects//locations//agents//generators/.

    Look up Existing CxGenerator Resource

    Get an existing CxGenerator resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: CxGeneratorState, opts?: CustomResourceOptions): CxGenerator
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            display_name: Optional[str] = None,
            language_code: Optional[str] = None,
            llm_model_settings: Optional[CxGeneratorLlmModelSettingsArgs] = None,
            model_parameter: Optional[CxGeneratorModelParameterArgs] = None,
            name: Optional[str] = None,
            parent: Optional[str] = None,
            placeholders: Optional[Sequence[CxGeneratorPlaceholderArgs]] = None,
            prompt_text: Optional[CxGeneratorPromptTextArgs] = None) -> CxGenerator
    func GetCxGenerator(ctx *Context, name string, id IDInput, state *CxGeneratorState, opts ...ResourceOption) (*CxGenerator, error)
    public static CxGenerator Get(string name, Input<string> id, CxGeneratorState? state, CustomResourceOptions? opts = null)
    public static CxGenerator get(String name, Output<String> id, CxGeneratorState state, CustomResourceOptions options)
    resources:  _:    type: gcp:diagflow:CxGenerator    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    DisplayName string
    The human-readable name of the generator, unique within the agent.
    LanguageCode string
    The language to create generators for the following fields:

    • Generator.prompt_text.text If not specified, the agent's default language is used.
    LlmModelSettings CxGeneratorLlmModelSettings
    The LLM model settings. Structure is documented below.
    ModelParameter CxGeneratorModelParameter
    Parameters passed to the LLM to configure its behavior. Structure is documented below.
    Name string
    The unique identifier of the Generator. Format: projects//locations//agents//generators/.
    Parent string
    The agent to create a Generator for. Format: projects//locations//agents/.
    Placeholders List<CxGeneratorPlaceholder>
    List of custom placeholders in the prompt text. Structure is documented below.
    PromptText CxGeneratorPromptText
    Prompt for the LLM model. Structure is documented below.
    DisplayName string
    The human-readable name of the generator, unique within the agent.
    LanguageCode string
    The language to create generators for the following fields:

    • Generator.prompt_text.text If not specified, the agent's default language is used.
    LlmModelSettings CxGeneratorLlmModelSettingsArgs
    The LLM model settings. Structure is documented below.
    ModelParameter CxGeneratorModelParameterArgs
    Parameters passed to the LLM to configure its behavior. Structure is documented below.
    Name string
    The unique identifier of the Generator. Format: projects//locations//agents//generators/.
    Parent string
    The agent to create a Generator for. Format: projects//locations//agents/.
    Placeholders []CxGeneratorPlaceholderArgs
    List of custom placeholders in the prompt text. Structure is documented below.
    PromptText CxGeneratorPromptTextArgs
    Prompt for the LLM model. Structure is documented below.
    displayName String
    The human-readable name of the generator, unique within the agent.
    languageCode String
    The language to create generators for the following fields:

    • Generator.prompt_text.text If not specified, the agent's default language is used.
    llmModelSettings CxGeneratorLlmModelSettings
    The LLM model settings. Structure is documented below.
    modelParameter CxGeneratorModelParameter
    Parameters passed to the LLM to configure its behavior. Structure is documented below.
    name String
    The unique identifier of the Generator. Format: projects//locations//agents//generators/.
    parent String
    The agent to create a Generator for. Format: projects//locations//agents/.
    placeholders List<CxGeneratorPlaceholder>
    List of custom placeholders in the prompt text. Structure is documented below.
    promptText CxGeneratorPromptText
    Prompt for the LLM model. Structure is documented below.
    displayName string
    The human-readable name of the generator, unique within the agent.
    languageCode string
    The language to create generators for the following fields:

    • Generator.prompt_text.text If not specified, the agent's default language is used.
    llmModelSettings CxGeneratorLlmModelSettings
    The LLM model settings. Structure is documented below.
    modelParameter CxGeneratorModelParameter
    Parameters passed to the LLM to configure its behavior. Structure is documented below.
    name string
    The unique identifier of the Generator. Format: projects//locations//agents//generators/.
    parent string
    The agent to create a Generator for. Format: projects//locations//agents/.
    placeholders CxGeneratorPlaceholder[]
    List of custom placeholders in the prompt text. Structure is documented below.
    promptText CxGeneratorPromptText
    Prompt for the LLM model. Structure is documented below.
    display_name str
    The human-readable name of the generator, unique within the agent.
    language_code str
    The language to create generators for the following fields:

    • Generator.prompt_text.text If not specified, the agent's default language is used.
    llm_model_settings CxGeneratorLlmModelSettingsArgs
    The LLM model settings. Structure is documented below.
    model_parameter CxGeneratorModelParameterArgs
    Parameters passed to the LLM to configure its behavior. Structure is documented below.
    name str
    The unique identifier of the Generator. Format: projects//locations//agents//generators/.
    parent str
    The agent to create a Generator for. Format: projects//locations//agents/.
    placeholders Sequence[CxGeneratorPlaceholderArgs]
    List of custom placeholders in the prompt text. Structure is documented below.
    prompt_text CxGeneratorPromptTextArgs
    Prompt for the LLM model. Structure is documented below.
    displayName String
    The human-readable name of the generator, unique within the agent.
    languageCode String
    The language to create generators for the following fields:

    • Generator.prompt_text.text If not specified, the agent's default language is used.
    llmModelSettings Property Map
    The LLM model settings. Structure is documented below.
    modelParameter Property Map
    Parameters passed to the LLM to configure its behavior. Structure is documented below.
    name String
    The unique identifier of the Generator. Format: projects//locations//agents//generators/.
    parent String
    The agent to create a Generator for. Format: projects//locations//agents/.
    placeholders List<Property Map>
    List of custom placeholders in the prompt text. Structure is documented below.
    promptText Property Map
    Prompt for the LLM model. Structure is documented below.

    Supporting Types

    CxGeneratorLlmModelSettings, CxGeneratorLlmModelSettingsArgs

    Model string
    The selected LLM model.
    PromptText string
    The custom prompt to use.
    Model string
    The selected LLM model.
    PromptText string
    The custom prompt to use.
    model String
    The selected LLM model.
    promptText String
    The custom prompt to use.
    model string
    The selected LLM model.
    promptText string
    The custom prompt to use.
    model str
    The selected LLM model.
    prompt_text str
    The custom prompt to use.
    model String
    The selected LLM model.
    promptText String
    The custom prompt to use.

    CxGeneratorModelParameter, CxGeneratorModelParameterArgs

    MaxDecodeSteps int
    The maximum number of tokens to generate.
    Temperature double
    The temperature used for sampling. Temperature sampling occurs after both topP and topK have been applied. Valid range: [0.0, 1.0] Low temperature = less random. High temperature = more random.
    TopK int
    If set, the sampling process in each step is limited to the topK tokens with highest probabilities. Valid range: [1, 40] or 1000+. Small topK = less random. Large topK = more random.
    TopP double
    If set, only the tokens comprising the top topP probability mass are considered. If both topP and topK are set, topP will be used for further refining candidates selected with topK. Valid range: (0.0, 1.0]. Small topP = less random. Large topP = more random.
    MaxDecodeSteps int
    The maximum number of tokens to generate.
    Temperature float64
    The temperature used for sampling. Temperature sampling occurs after both topP and topK have been applied. Valid range: [0.0, 1.0] Low temperature = less random. High temperature = more random.
    TopK int
    If set, the sampling process in each step is limited to the topK tokens with highest probabilities. Valid range: [1, 40] or 1000+. Small topK = less random. Large topK = more random.
    TopP float64
    If set, only the tokens comprising the top topP probability mass are considered. If both topP and topK are set, topP will be used for further refining candidates selected with topK. Valid range: (0.0, 1.0]. Small topP = less random. Large topP = more random.
    maxDecodeSteps Integer
    The maximum number of tokens to generate.
    temperature Double
    The temperature used for sampling. Temperature sampling occurs after both topP and topK have been applied. Valid range: [0.0, 1.0] Low temperature = less random. High temperature = more random.
    topK Integer
    If set, the sampling process in each step is limited to the topK tokens with highest probabilities. Valid range: [1, 40] or 1000+. Small topK = less random. Large topK = more random.
    topP Double
    If set, only the tokens comprising the top topP probability mass are considered. If both topP and topK are set, topP will be used for further refining candidates selected with topK. Valid range: (0.0, 1.0]. Small topP = less random. Large topP = more random.
    maxDecodeSteps number
    The maximum number of tokens to generate.
    temperature number
    The temperature used for sampling. Temperature sampling occurs after both topP and topK have been applied. Valid range: [0.0, 1.0] Low temperature = less random. High temperature = more random.
    topK number
    If set, the sampling process in each step is limited to the topK tokens with highest probabilities. Valid range: [1, 40] or 1000+. Small topK = less random. Large topK = more random.
    topP number
    If set, only the tokens comprising the top topP probability mass are considered. If both topP and topK are set, topP will be used for further refining candidates selected with topK. Valid range: (0.0, 1.0]. Small topP = less random. Large topP = more random.
    max_decode_steps int
    The maximum number of tokens to generate.
    temperature float
    The temperature used for sampling. Temperature sampling occurs after both topP and topK have been applied. Valid range: [0.0, 1.0] Low temperature = less random. High temperature = more random.
    top_k int
    If set, the sampling process in each step is limited to the topK tokens with highest probabilities. Valid range: [1, 40] or 1000+. Small topK = less random. Large topK = more random.
    top_p float
    If set, only the tokens comprising the top topP probability mass are considered. If both topP and topK are set, topP will be used for further refining candidates selected with topK. Valid range: (0.0, 1.0]. Small topP = less random. Large topP = more random.
    maxDecodeSteps Number
    The maximum number of tokens to generate.
    temperature Number
    The temperature used for sampling. Temperature sampling occurs after both topP and topK have been applied. Valid range: [0.0, 1.0] Low temperature = less random. High temperature = more random.
    topK Number
    If set, the sampling process in each step is limited to the topK tokens with highest probabilities. Valid range: [1, 40] or 1000+. Small topK = less random. Large topK = more random.
    topP Number
    If set, only the tokens comprising the top topP probability mass are considered. If both topP and topK are set, topP will be used for further refining candidates selected with topK. Valid range: (0.0, 1.0]. Small topP = less random. Large topP = more random.

    CxGeneratorPlaceholder, CxGeneratorPlaceholderArgs

    Id string
    Unique ID used to map custom placeholder to parameters in fulfillment.
    Name string
    Custom placeholder value in the prompt text.
    Id string
    Unique ID used to map custom placeholder to parameters in fulfillment.
    Name string
    Custom placeholder value in the prompt text.
    id String
    Unique ID used to map custom placeholder to parameters in fulfillment.
    name String
    Custom placeholder value in the prompt text.
    id string
    Unique ID used to map custom placeholder to parameters in fulfillment.
    name string
    Custom placeholder value in the prompt text.
    id str
    Unique ID used to map custom placeholder to parameters in fulfillment.
    name str
    Custom placeholder value in the prompt text.
    id String
    Unique ID used to map custom placeholder to parameters in fulfillment.
    name String
    Custom placeholder value in the prompt text.

    CxGeneratorPromptText, CxGeneratorPromptTextArgs

    Text string
    Text input which can be used for prompt or banned phrases.
    Text string
    Text input which can be used for prompt or banned phrases.
    text String
    Text input which can be used for prompt or banned phrases.
    text string
    Text input which can be used for prompt or banned phrases.
    text str
    Text input which can be used for prompt or banned phrases.
    text String
    Text input which can be used for prompt or banned phrases.

    Import

    Generator can be imported using any of these accepted formats:

    • {{parent}}/generators/{{name}}

    • {{parent}}/{{name}}

    When using the pulumi import command, Generator can be imported using one of the formats above. For example:

    $ pulumi import gcp:diagflow/cxGenerator:CxGenerator default {{parent}}/generators/{{name}}
    
    $ pulumi import gcp:diagflow/cxGenerator:CxGenerator default {{parent}}/{{name}}
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Google Cloud (GCP) Classic pulumi/pulumi-gcp
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the google-beta Terraform Provider.
    gcp logo
    Google Cloud v8.41.1 published on Monday, Aug 25, 2025 by Pulumi