会話型アクションのサポートは 2023 年 6 月 13 日に終了しました。詳細については、
会話型アクションの廃止をご覧ください。
Method: projects.matchIntents
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
HTTP リクエスト
POST https://actions.googleapis.com/v2/{project=projects/*}:matchIntents
この URL は gRPC Transcoding 構文を使用します。
パスパラメータ
パラメータ |
project |
string
必須。プロジェクト ID で指定される、テスト対象のプロジェクト。形式: projects/{project}
|
リクエスト本文
リクエストの本文には、次の構造のデータが含まれます。
JSON 表現 |
{
"query": string,
"locale": string
} |
フィールド |
query |
string
必須。書式なしテキストでのユーザークエリ。
|
locale |
string
必須。クエリの評価に使用する言語 / 地域(「en」など)。形式は BCP 47(https://tools.ietf.org/html/bcp47)に準拠する必要があります。サポートされている言語の一覧については、https://developers.google.com/assistant/console/languages-locales をご覧ください。
|
レスポンスの本文
成功した場合、レスポンスの本文には次の構造のデータが含まれます。
JSON 表現 |
{
"matchedIntents": [
{
object (Intent )
}
]
} |
フィールド |
matchedIntents[] |
object (Intent )
一致したインテント(関連性が高い順)。最初の 50 個の一致のみが返されます。
|
インテント
JSON 表現 |
{
"name": string,
"params": {
string: {
object (IntentParameterValue )
},
...
},
"query": string
} |
フィールド |
name |
string
必須。最後に一致したインテントの名前。
|
params |
map (key: string, value: object (IntentParameterValue ))
必須。インテント マッチングの一部として識別されるパラメータを表します。これは、識別されたパラメータの名前と、ユーザー入力から識別されたパラメータの値のマップです。一致したインテントの中で定義済みのパラメータがここに表示されます。 "key": value ペアのリストを含むオブジェクト。例: { "name": "wrench", "mass": "1.3kg", "count": "3" }
|
query |
string
省略可。このインテントに一致したエンドユーザーの入力または音声入力。ユーザー入力に基づいてインテントが一致すると入力されます。
|
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-26 UTC。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-07-26 UTC。"],[[["\u003cp\u003eFinds the intents that match a given user query, returning the top 50 matches ranked by relevance.\u003c/p\u003e\n"],["\u003cp\u003eRequires a \u003ccode\u003ePOST\u003c/code\u003e request to the specified endpoint, including the project ID and user query.\u003c/p\u003e\n"],["\u003cp\u003eThe request body must contain the user query as plain text and the locale for evaluation.\u003c/p\u003e\n"],["\u003cp\u003eThe response includes a list of matched intents, each with its name, parameters, and the original query.\u003c/p\u003e\n"],["\u003cp\u003eEach intent object provides details like the intent name, identified parameters, and the portion of the user input that triggered the match.\u003c/p\u003e\n"]]],["This document details the process of matching user queries to intents via a `POST` request to `https://actions.googleapis.com/v2/{project=projects/*}:matchIntents`. The request requires a `project` path parameter, a JSON body with `query` and `locale` strings. The response returns a JSON object with `matchedIntents`, an array of matched intents, each with `name`, `params` (parameter name-value pairs), and `query` fields. Only the first 50 matching intents are returned, ordered from most to least relevant.\n"],null,[]]