[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-18。"],[[["\u003cp\u003eIntents utilize a built-in response handler for providing static responses, which can be made somewhat dynamic by incorporating parameter references.\u003c/p\u003e\n"],["\u003cp\u003eWhile static responses suffice in some instances, dynamic response options, such as fulfillment or the API, are needed for more complex actions or tailored outputs.\u003c/p\u003e\n"],["\u003cp\u003eAgents commonly employ a blend of both static and dynamic responses and can provide multiple response variations that will be selected randomly to improve the conversational nature of the interaction.\u003c/p\u003e\n"],["\u003cp\u003eResponses should guide the end-user towards providing expressions that match other intents and should also lead the user toward giving specific data, by way of open-ended questions.\u003c/p\u003e\n"],["\u003cp\u003eResponses can be configured for the default platform or for specific integration platforms, allowing for platform-specific tailoring.\u003c/p\u003e\n"]]],[],null,["# Responses\n\nIntents have a built-in response handler that can return responses after the intent is matched.\nThis feature only supports static responses,\nthough you can use\n[parameter references](/dialogflow/docs/intents-actions-parameters#values)\nin these responses to make them somewhat dynamic.\nThis is helpful for recapping information provided by the end-user.\nFor example, your intent response could look like:\n\"Okay, I booked a room for you on $date\".\n\nIn some cases, this is all you need.\nIn cases where your code needs to take some action or build a more dynamic response,\nyou should use one of the dynamic response options below.\nAgents typically use a combination of static and dynamic responses.\n\nMultiple types of responses can be provided.\nThe basic response type is a text response.\nOther types of responses are available (image, audio, synthesized speech, and so on),\nsome of which are [platform-specific](#platforms).\n\nIf you define more than one response variation for an intent,\nyour agent will select a response at random.\nYou should add several response variations to make your agent more conversational.\n\nWhen building an agent,\nyou should provide response data for each intent.\nWhen you use the API or [fulfillment](/dialogflow/docs/fulfillment-overview)\nto interact with Dialogflow,\nyou technically may not need to provide response data,\nbecause both of these methods can dynamically generate any response.\nHowever, if you want to use the [simulator](/dialogflow/docs/console#simulator)\nfor testing or define intents that have a simple response,\nyou should provide response data.\n\nAs a general rule, your intent responses should prompt the end-user\nto provide an expression that will match another intent.\nYour responses should also guide the end-user to provide specific data.\nFor example, a question like \"What city were you born in?\"\nis better than a more open-ended question like \"Where were you born?\".\n\nWhere to find this data\n-----------------------\n\nWhen building an agent,\nit is most common to use the\nDialogflow ES console ([visit documentation](/dialogflow/docs/console), [open console](https://dialogflow.cloud.google.com)).\nThe instructions below focus on using the console.\nTo access intent response data:\n\n1. Go to the [Dialogflow ES console](https://dialogflow.cloud.google.com).\n2. Select an agent.\n3. Select **Intents** in the left sidebar menu.\n4. Select an intent.\n5. Scroll down to the **Responses** section.\n\nIf you are building an agent using the API instead of the console, see the\n[Intents reference](/dialogflow/docs/reference/common-types#intents).\nThe API field names are similar to the console field names.\nThe instructions below highlight any important differences between the console and the API.\n\nResponse platforms\n------------------\n\nEach response is defined for either the **Default** platform\n(referred to as `PLATFORM_UNSPECIFIED` in the API) or a specific\n[integration](/dialogflow/docs/integrations) platform.\nIf you are not using an integration,\nall of your responses can use the default platform.\nIf you are using integrations,\neach integration can have a unique response,\nor it can be configured to use the default response.\n\nFor more information on platform-specific responses,\nsee [Rich response messages](/dialogflow/docs/intents-rich-messages).\n\nCreate built-in responses\n-------------------------\n\nTo create built-in responses:\n\n1. Select **Default** or a specific platform.\n2. If the desired type of response (for example, **Text response** ) is not already listed, click **Add Responses** and select the response type.\n3. Enter required information for the response.\n4. Click **Save**.\n\nDynamic responses with fulfillment\n----------------------------------\n\nUsing fulfillment, you can create dynamic responses.\nSee the [fulfillment documents](/dialogflow/docs/fulfillment-overview)\nfor more information.\n\nDynamic responses with the API\n------------------------------\n\nUsing the API, you can create dynamic responses.\nSee the [API overview](/dialogflow/docs/api-overview)\nfor more information.\n\nSpecial characters\n------------------\n\nSome special characters require escaping in your response.\n\nTo use the dollar sign **`$`** or the number sign **`#`** in a response,\nadd braces **`{}`** around the content that immediately follows the sign.\nFor example:\n\n- `${100}` resolves to `$100`\n- `${$number}` resolves to `$100`, where `$number` is a parameter reference with a value of 100\n- `#{hello}` resolves to `#hello`\n\nTo use braces **`{}`** in a response,\nuse double braces.\nFor example:\n\n- `{{hello}}` resolves to `{hello}`\n\nHandling empty parameter values\n-------------------------------\n\nIf your intent has a parameter that can resolve to an empty value,\nyou must provide at least one response variant that does not use that parameter.\n\nFor example, if your intent has 2 parameters (`p1` and `p2`),\nand either or both could be empty,\nyou should provide at least four response variants:\n\n- Got it. You said $p1 and $p2.\n- Got it. You said $p1.\n- Got it. You said $p2.\n- Got it."]]