Method: projects.locations.collections.dataConnector.buildActionInvocation

DataConnector を使用してアクション呼び出しをビルドします。

HTTP リクエスト

POST https://discoveryengine.googleapis.com/v1alpha/{name=projects/*/locations/*/collections/*/dataConnector}:buildActionInvocation

この URL では gRPC Transcoding 構文を使用します。

パスパラメータ

パラメータ
name

string

必須。DataConnector リソース。

アクション呼び出しの構築に使用されるデータコネクタ。

リクエストの本文

リクエストの本文には、次の構造のデータが含まれます。

JSON 表現
{
  "actionName": string,
  "languageCode": string
}
フィールド
actionName

string

必須。アクションの名前。

例: 「send_email」

languageCode

string

省略可。ステータス メッセージとエラー メッセージに使用する言語。

レスポンスの本文

DataConnectorService.BuildActionInvocation メソッドに対するレスポンス。

成功した場合、レスポンスの本文には次の構造のデータが含まれます。

JSON 表現
{
  "actionInvocation": {
    object (ActionInvocation)
  }
}
フィールド
actionInvocation

object (ActionInvocation)

アクションの呼び出し。

認可スコープ

次の OAuth スコープのいずれかが必要です。

  • https://www.googleapis.com/auth/cloud-platform
  • https://www.googleapis.com/auth/discoveryengine.readwrite
  • https://www.googleapis.com/auth/discoveryengine.assist.readwrite

詳細については、Authentication Overview をご覧ください。

IAM 権限

name リソースに対する次の IAM 権限が必要です。

  • discoveryengine.dataConnectors.buildActionInvocation

詳細については、IAM のドキュメントをご覧ください。

ActionInvocation

アクションの呼び出しを表します。

JSON 表現
{
  "agentName": string,
  "actionName": string,
  "args": {
    object
  },
  "dataConnector": string,
  "dataSource": string,
  "invocationId": string,
  "actionDisplayName": string,
  "userConfirmationMessage": string,
  "authorizationUrl": string,
  "resendQueryOnUserAuthorization": boolean,
  "parameterDeclaration": {
    object
  },
  "argSetCandidates": [
    {
      object
    }
  ]
}
フィールド
agentName

string

省略可。アクションを実行しているエージェントの名前。

actionName

string

アクションの名前。

例: 「send_email」

args

object (Struct format)

アクションの名前付き引数。

例: {"recipient": "tom@...", "subject": ... }

ユーザーに提供される場合、この部分は編集可能になることがあります。

アクション引数に複数のオプションがある場合(カレンダー イベントに複数の時間帯の候補がある場合など)、このフィールドは最初のオプションを表します。

dataConnector

string

DataConnector リソース。

アクションの実行に使用されるデータコネクタ。

dataSource

string

出力専用。データソースの名前。

invocationId

string

出力専用。アクション呼び出し ID。

actionDisplayName

string

出力専用。ユーザーに表示されるアクションの人が読める名前。

userConfirmationMessage

string

出力専用。確認ダイアログとともにユーザーに表示される人間が読めるメッセージ。

authorizationUrl

string

出力専用。認証 URL。

resendQueryOnUserAuthorization

boolean

出力専用。true の場合、呼び出し元はユーザーの承認時にクエリを再送信する必要があります。

parameterDeclaration

object (Struct format)

出力専用。レンダリング/検証情報を含むアクションのパラメータの説明。形式は OpenAPI のパラメータ仕様に基づいています。出典: https://swagger.io/docs/specification/describing-parameters/

例:

{
    "type": "object",
    "properties": {
        "title": {
            "type": "string",
            "description": "title of the event",
        },
        "startTime": {
            "type": "string",
            "format": "date-time",
            "description": (
                "Start time of the meeting, e.g. 2024-07-12T23:30"
            ),
        },
        "attendees": {
            "type": "array",
            "items": {"type": "string", "format": "email"},
            "description": "List of email addresses of attendees",
        },
        "duration": {
            "type": "integer",
            "format": "int32",
            "minimum": 5,
            "maximum": 240,
            "default": { "numberValue": 30 },
            "description": (
                "Duration of the meeting in minutes. Defaults to 30"
                " minutes."
            ),
        },
        "timezone": {
            "type": "string",
            "description": (
                'IANA time Zone Database name, e.g. "Europe/Zurich". If'
                " omitted, timezone of the user will be used"
            ),
        },
        "eventType": {
            "type": "string",
            "enum": ["meeting", "focus_time", "out_of_office", "task"],
            "description": "type of the event",
        },
    },
    "required": ["startTime", "title", "attendees"]
}
argSetCandidates[]

object (Struct format)

出力専用。アクション引数に複数のオプションがある場合(カレンダー イベントの候補となる時間帯が複数ある場合など)、このフィールドに候補となる追加の引数が一覧表示されます。

引数セットのリストが含まれます。各引数セットは、args フィールドと同様の形式で指定します。引数セットには、args フィールドと異なる引数のみが含まれます。ユーザーに提示される場合、これらの値は編集可能になることがあります。

次に例を示します。

args には、すべての引数を含む最初のオプションが含まれています。

{"title": "Meeting with John", "startTime": "2024-08-01T13:30", ... }

argSetCandidates には残りのオプションが含まれますが、異なる引数のみが入力されます。

[{ "startTime": "2024-08-01T14:00" }, { "startTime": "2024-08-01T14:30" }, { "startTime": "2024-08-01T15:30" }]