Message

ユーザーとシステム間のインタラクションからのメッセージ。

JSON 表現
{
  "timestamp": string,
  "messageId": string,

  // Union field kind can be only one of the following:
  "userMessage": {
    object (UserMessage)
  },
  "systemMessage": {
    object (SystemMessage)
  }
  // End of list of possible types for union field kind.
}
フィールド
timestamp

string (Timestamp format)

出力専用。ユーザー メッセージの場合、これはシステムがメッセージを受信した時刻です。システム メッセージの場合、これはシステムがメッセージを生成した時刻です。

RFC 3339 を使用します。生成された出力は常に Z 正規化され、小数点以下は 0、3、6、または 9 桁になります。「Z」以外のオフセットも使用できます。例: "2014-10-02T15:01:23Z""2014-10-02T15:01:23.045123456Z""2014-10-02T15:01:23+05:30"

messageId

string

省略可。永続化のための会話内のメッセージの一意の ID。

共用体フィールド kind。メッセージの種類。kind は次のいずれかになります。
userMessage

object (UserMessage)

システムとやり取りしているユーザーからのメッセージ。

systemMessage

object (SystemMessage)

ユーザーへの応答としてシステムから送信されるメッセージ。

UserMessage

システムとやり取りしているユーザーからのメッセージ。

JSON 表現
{

  // Union field kind can be only one of the following:
  "text": string
  // End of list of possible types for union field kind.
}
フィールド
共用体フィールド kind。ユーザー メッセージのコンテンツの種類。kind は次のいずれかになります。
text

string

テキストには blob ではなくこのフィールドを使用する必要があります。

SystemMessage

ユーザーへの応答としてシステムから送信されるメッセージ。このメッセージは、システムとのマルチターンの会話の履歴コンテキストとしてのユーザーからのメッセージである可能性もあります。

JSON 表現
{

  // Union field kind can be only one of the following:
  "text": {
    object (TextMessage)
  },
  "schema": {
    object (SchemaMessage)
  },
  "data": {
    object (DataMessage)
  },
  "analysis": {
    object (AnalysisMessage)
  },
  "chart": {
    object (ChartMessage)
  },
  "error": {
    object (ErrorMessage)
  }
  // End of list of possible types for union field kind.
  "groupId": integer
}
フィールド
共用体フィールド kind。システム メッセージのコンテンツの種類。kind は次のいずれかになります。
text

object (TextMessage)

ユーザー メッセージに対する自然言語の直接的な回答。

schema

object (SchemaMessage)

スキーマの解決中に生成されたメッセージ。

data

object (DataMessage)

データの取得中に生成されたメッセージ。

analysis

object (AnalysisMessage)

分析中に生成されたメッセージ。

chart

object (ChartMessage)

グラフの生成中に生成されたメッセージ。

error

object (ErrorMessage)

エラー メッセージ。

groupId

integer

イベントが属するグループを識別します。類似するイベントは論理的に関連性があると見なされ、UI で一緒に表示されます。

TextMessage

マルチパート テキスト メッセージ。

JSON 表現
{
  "parts": [
    string
  ]
}
フィールド
parts[]

string

省略可。メッセージの各部分。

SchemaMessage

スキーマの解決中に生成されたメッセージ。

JSON 表現
{

  // Union field kind can be only one of the following:
  "query": {
    object (SchemaQuery)
  },
  "result": {
    object (SchemaResult)
  }
  // End of list of possible types for union field kind.
}
フィールド
共用体フィールド kind。このメッセージにクエリまたはスキーマ解決の結果が含まれているかどうか。kind は次のいずれかになります。
query

object (SchemaQuery)

スキーマ解決クエリ。

result

object (SchemaResult)

スキーマ解決クエリの結果。

SchemaQuery

提示された質問に関連するスキーマを解決するためのクエリ。

JSON 表現
{
  "question": string
}
フィールド
question

string

省略可。スキーマ解決のためにシステムに送信する質問。

SchemaResult

スキーマ解決の結果。

JSON 表現
{
  "datasources": [
    {
      object (Datasource)
    }
  ]
}
フィールド
datasources[]

object (Datasource)

省略可。スキーマクエリの解決に使用されるデータソース。

Datasource

質問への回答に使用できるデータソース。

JSON 表現
{
  "schema": {
    object (Schema)
  },

  // Union field reference can be only one of the following:
  "bigqueryTableReference": {
    object (BigQueryTableReference)
  },
  "studioDatasourceId": string,
  "lookerExploreReference": {
    object (LookerExploreReference)
  }
  // End of list of possible types for union field reference.
}
フィールド
schema

object (Schema)

省略可。データソースのスキーマ。

共用体フィールド reference。データソースへの参照。reference は次のいずれかになります。
bigqueryTableReference

object (BigQueryTableReference)

BigQuery テーブルへの参照。

studioDatasourceId

string

Looker Studio データソースへの参照。

lookerExploreReference

object (LookerExploreReference)

Looker Explore への参照。

DataMessage

データの取得中に生成されたメッセージ。

JSON 表現
{

  // Union field kind can be only one of the following:
  "query": {
    object (DataQuery)
  },
  "generatedSql": string,
  "result": {
    object (DataResult)
  },
  "generatedLookerQuery": {
    object (LookerQuery)
  },
  "bigQueryJob": {
    object (BigQueryJob)
  }
  // End of list of possible types for union field kind.
}
フィールド
共用体フィールド kind。このメッセージに、データ取得用のクエリ、結果、または生成された SQL のいずれが含まれているか。kind は次のいずれかになります。
query

object (DataQuery)

データ取得クエリ。

generatedSql

string

データを取得するためにシステムによって生成される SQL。

result

object (DataResult)

取得したデータ。

generatedLookerQuery

object (LookerQuery)

データを取得するためにシステムによって生成される Looker クエリ。

bigQueryJob

object (BigQueryJob)

データを取得するためにシステムによって実行される BigQuery ジョブ。

DataQuery

データを取得するためのクエリ。

JSON 表現
{
  "question": string,
  "name": string,
  "datasources": [
    {
      object (Datasource)
    }
  ]
}
フィールド
question

string

省略可。回答する自然言語の質問。

name

string

省略可。クエリの意図を反映したスネークケースの名前。対応するデータ結果に名前を付け、後の手順で参照できるようにするために使用されます。

  • 例: 「total_sales_by_product」
  • 例: 「sales_for_product_12345」
datasources[]

object (Datasource)

省略可。質問に回答するために使用できるデータソース。

DataResult

取得したデータ。

JSON 表現
{
  "name": string,
  "schema": {
    object (Schema)
  },
  "data": [
    {
      object
    }
  ]
}
フィールド
name

string

省略可。内容を反映したデータ結果のスネークケース名。この名前は、参照によって結果を渡すために使用され、その意味を示すシグナルとして機能します。

  • 例: 「total_sales_by_product」
  • 例: 「sales_for_product_12345」
schema

object (Schema)

省略可。データのスキーマ。

data[]

object (Struct format)

省略可。データの内容。各行は、スキーマと一致する構造体です。単純な値は文字列として表され、ネストされた構造はリストまたは構造体として表されます。

LookerQuery

Looker Explore からデータを取得するクエリ。インライン クエリを実行するをご覧ください。

JSON 表現
{
  "model": string,
  "explore": string,
  "fields": [
    string
  ],
  "filters": [
    {
      object (Filter)
    }
  ],
  "sorts": [
    string
  ],
  "limit": string
}
フィールド
model

string

必須。クエリの生成に使用される LookML モデル。

explore

string

必須。クエリの生成に使用される LookML Explore。

fields[]

string

省略可。Explore から取得するフィールド。

filters[]

object (Filter)

省略可。Explore に適用するフィルタ。

sorts[]

string

省略可。Explore に適用する並べ替え。

limit

string

省略可。クエリの制限。

フィルタ

Looker クエリフィルタ。

JSON 表現
{
  "field": string,
  "value": string
}
フィールド
field

string

必須。フィルタリングするフィールド。

value

string

必須。フィルタを適用する値の f フィールド。

BigQueryJob

システムによって実行される BigQuery ジョブ。

JSON 表現
{
  "projectId": string,
  "jobId": string,
  "location": string,
  "destinationTable": {
    object (BigQueryTableReference)
  },
  "schema": {
    object (Schema)
  }
}
フィールド
projectId

string

必須。ジョブが属するプロジェクト。

JobReference をご覧ください。

jobId

string

必須。ジョブの ID。

JobReference をご覧ください。

location

string

省略可。ジョブのロケーション。

JobReference をご覧ください。

destinationTable

object (BigQueryTableReference)

省略可。ジョブのクエリ結果の宛先テーブルへの参照。

JobConfigurationQuery をご覧ください。

schema

object (Schema)

省略可。ジョブのクエリ結果のスキーマ。

JobStatistics2 を参照してください。

AnalysisMessage

分析中に生成されたメッセージ。

JSON 表現
{

  // Union field kind can be only one of the following:
  "query": {
    object (AnalysisQuery)
  },
  "progressEvent": {
    object (AnalysisEvent)
  }
  // End of list of possible types for union field kind.
}
フィールド
共用体フィールド kind。このメッセージにクエリまたは分析のイベントのいずれかが含まれているかどうか。kind は次のいずれかになります。
query

object (AnalysisQuery)

分析クエリ。

progressEvent

object (AnalysisEvent)

分析の進行状況を示すイベント。

AnalysisQuery

分析を実行するためのクエリ。

JSON 表現
{
  "question": string,
  "dataResultNames": [
    string
  ]
}
フィールド
question

string

省略可。ユーザーの元の質問に答えるための分析質問。

dataResultNames[]

string

省略可。分析する以前に取得したデータ結果の名前。

AnalysisEvent

分析の進行状況を示すイベント。

JSON 表現
{

  // Union field kind can be only one of the following:
  "plannerReasoning": string,
  "coderInstruction": string,
  "code": string,
  "executionOutput": string,
  "executionError": string,
  "resultVegaChartJson": string,
  "resultNaturalLanguage": string,
  "resultCsvData": string,
  "resultReferenceData": string,
  "error": string
  // End of list of possible types for union field kind.
}
フィールド
共用体フィールド kind。分析中に発生したイベントの種類。kind は次のいずれかになります。
plannerReasoning

string

Python codegen プランナーの推論。

coderInstruction

string

コード生成用に発行される指示。

code

string

生成されるコード。

executionOutput

string

コード実行の出力。

executionError

string

コード実行によるエラー。

resultVegaChartJson

string

結果は Vega グラフの JSON 文字列です。

resultNaturalLanguage

string

結果を NL 文字列として返します。

resultCsvData

string

結果を CSV 文字列として返します。

resultReferenceData

string

データソースへの参照としての結果。

error

string

一般的なエラー メッセージ。

ChartMessage

グラフの生成中に生成されたメッセージ。

JSON 表現
{

  // Union field kind can be only one of the following:
  "query": {
    object (ChartQuery)
  },
  "result": {
    object (ChartResult)
  }
  // End of list of possible types for union field kind.
}
フィールド
共用体フィールド kind。このメッセージにクエリまたはグラフ生成の結果が含まれているかどうか。kind は次のいずれかになります。
query

object (ChartQuery)

グラフを生成するためのクエリ。

result

object (ChartResult)

グラフ生成クエリの結果。

ChartQuery

グラフを生成するためのクエリ。

JSON 表現
{
  "instructions": string,
  "dataResultName": string
}
フィールド
instructions

string

省略可。グラフを生成するための自然言語による指示。

dataResultName

string

省略可。グラフで使用する、以前に取得したデータ結果の名前。

ChartResult

グラフ生成クエリの結果。

JSON 表現
{
  "vegaConfig": {
    object
  },
  "image": {
    object (Blob)
  }
}
フィールド
vegaConfig

object (Struct format)

省略可。生成された Vega グラフ構成。https://vega.github.io/vega/docs/config/ をご覧ください。

image

object (Blob)

省略可。コンテキストでリクエストされた場合は、グラフのレンダリング。

Blob

MIME タイプのデータの blob。

JSON 表現
{
  "mimeType": string,
  "data": string
}
フィールド
mimeType

string

必須。メッセージ データの IANA 標準 MIME タイプ。

data

string (bytes format)

必須。バイト単位で表されるデータ。

Base64 でエンコードされた文字列。

ErrorMessage

エラー メッセージ。

JSON 表現
{
  "text": string
}
フィールド
text

string

出力専用。エラーのテキスト。