import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * 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: * * * [API documentation](https://cloud.google.com/dialogflow/cx/docs/reference/rest/v3/projects.locations.agents.generators) * * How-to Guides * * [Official Documentation](https://cloud.google.com/dialogflow/cx/docs) * * ## Example Usage * * ### Dialogflowcx Generator Basic * * ```typescript * 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 * * 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: * * ```sh * $ pulumi import gcp:diagflow/cxGenerator:CxGenerator default {{parent}}/generators/{{name}} * ``` * * ```sh * $ pulumi import gcp:diagflow/cxGenerator:CxGenerator default {{parent}}/{{name}} * ``` */ export declare class CxGenerator extends pulumi.CustomResource { /** * Get an existing CxGenerator resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: CxGeneratorState, opts?: pulumi.CustomResourceOptions): CxGenerator; /** * Returns true if the given object is an instance of CxGenerator. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is CxGenerator; /** * The human-readable name of the generator, unique within the agent. */ readonly displayName: pulumi.Output; /** * The language to create generators for the following fields: * * Generator.prompt_text.text * If not specified, the agent's default language is used. */ readonly languageCode: pulumi.Output; /** * The LLM model settings. * Structure is documented below. */ readonly llmModelSettings: pulumi.Output; /** * Parameters passed to the LLM to configure its behavior. * Structure is documented below. */ readonly modelParameter: pulumi.Output; /** * The unique identifier of the Generator. * Format: projects//locations//agents//generators/. */ readonly name: pulumi.Output; /** * The agent to create a Generator for. * Format: projects//locations//agents/. */ readonly parent: pulumi.Output; /** * List of custom placeholders in the prompt text. * Structure is documented below. */ readonly placeholders: pulumi.Output; /** * Prompt for the LLM model. * Structure is documented below. */ readonly promptText: pulumi.Output; /** * Create a CxGenerator resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: CxGeneratorArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering CxGenerator resources. */ export interface CxGeneratorState { /** * The human-readable name of the generator, unique within the agent. */ displayName?: pulumi.Input; /** * The language to create generators for the following fields: * * Generator.prompt_text.text * If not specified, the agent's default language is used. */ languageCode?: pulumi.Input; /** * The LLM model settings. * Structure is documented below. */ llmModelSettings?: pulumi.Input; /** * Parameters passed to the LLM to configure its behavior. * Structure is documented below. */ modelParameter?: pulumi.Input; /** * The unique identifier of the Generator. * Format: projects//locations//agents//generators/. */ name?: pulumi.Input; /** * The agent to create a Generator for. * Format: projects//locations//agents/. */ parent?: pulumi.Input; /** * List of custom placeholders in the prompt text. * Structure is documented below. */ placeholders?: pulumi.Input[]>; /** * Prompt for the LLM model. * Structure is documented below. */ promptText?: pulumi.Input; } /** * The set of arguments for constructing a CxGenerator resource. */ export interface CxGeneratorArgs { /** * The human-readable name of the generator, unique within the agent. */ displayName: pulumi.Input; /** * The language to create generators for the following fields: * * Generator.prompt_text.text * If not specified, the agent's default language is used. */ languageCode?: pulumi.Input; /** * The LLM model settings. * Structure is documented below. */ llmModelSettings?: pulumi.Input; /** * Parameters passed to the LLM to configure its behavior. * Structure is documented below. */ modelParameter?: pulumi.Input; /** * The agent to create a Generator for. * Format: projects//locations//agents/. */ parent?: pulumi.Input; /** * List of custom placeholders in the prompt text. * Structure is documented below. */ placeholders?: pulumi.Input[]>; /** * Prompt for the LLM model. * Structure is documented below. */ promptText: pulumi.Input; }