- JSON representation
- UserMessage
- SystemMessage
- TextMessage
- SchemaMessage
- SchemaQuery
- SchemaResult
- Datasource
- DataMessage
- DataQuery
- DataResult
- LookerQuery
- Filter
- BigQueryJob
- AnalysisMessage
- AnalysisQuery
- AnalysisEvent
- ChartMessage
- ChartQuery
- ChartResult
- Blob
- ErrorMessage
A message from an interaction between the user and the system.
JSON representation |
---|
{ "timestamp" : string , "messageId" : string , // Union field |
kind
. The kind of message. kind
can be only one of the following:UserMessage
A message from the user that is interacting with the system.
JSON representation |
---|
{ // Union field |
kind
. The kind of content in the user message. kind
can be only one of the following:text
string
Text should use this field instead of blob.
SystemMessage
A message from the system in response to the user. This message can also be a message from the user as historical context for multiturn conversations with the system.
JSON representation |
---|
{ // Union field |
kind
. The kind of content in the system message. kind
can be only one of the following:text
object (
TextMessage
)
A direct natural language response to the user message.
schema
object (
SchemaMessage
)
A message produced during schema resolution.
data
object (
DataMessage
)
A message produced during data retrieval.
analysis
object (
AnalysisMessage
)
A message produced during analysis.
chart
object (
ChartMessage
)
A message produced during chart generation.
error
object (
ErrorMessage
)
An error message.
groupId
integer
Identifies the group that the event belongs to. Similar events are deemed to be logically relevant to each other and should be shown together in the UI.
TextMessage
A multi-part text message.
JSON representation |
---|
{ "parts" : [ string ] } |
Fields | |
---|---|
parts[]
|
Optional. The parts of the message. |
SchemaMessage
A message produced during schema resolution.
JSON representation |
---|
{ // Union field |
kind
. Whether this message contains the query or the result of the schema resolution. kind
can be only one of the following:query
object (
SchemaQuery
)
A schema resolution query.
result
object (
SchemaResult
)
The result of a schema resolution query.
SchemaQuery
A query for resolving the schema relevant to the posed question.
JSON representation |
---|
{ "question" : string } |
Fields | |
---|---|
question
|
Optional. The question to send to the system for schema resolution. |
SchemaResult
The result of schema resolution.
JSON representation |
---|
{
"datasources"
:
[
{
object (
|
Fields | |
---|---|
datasources[]
|
Optional. The datasources used to resolve the schema query. |
Datasource
A datasource that can be used to answer questions.
JSON representation |
---|
{ "schema" : { object ( |
schema
object (
Schema
)
Optional. The schema of the datasource.
reference
. The reference to the datasource. reference
can be only one of the following:bigqueryTableReference
object (
BigQueryTableReference
)
A reference to a BigQuery table.
studioDatasourceId
string
A reference to a Looker Studio datasource.
lookerExploreReference
object (
LookerExploreReference
)
A reference to a Looker explore.
DataMessage
A message produced during data retrieval.
JSON representation |
---|
{ // Union field |
kind
. Whether this message contains the query, the result, or generated SQL for the data retrieval. kind
can be only one of the following:query
object (
DataQuery
)
A data retrieval query.
generatedSql
string
SQL generated by the system to retrieve data.
result
object (
DataResult
)
Retrieved data.
generatedLookerQuery
object (
LookerQuery
)
Looker Query generated by the system to retrieve data.
bigQueryJob
object (
BigQueryJob
)
A BigQuery job executed by the system to retrieve data.
DataQuery
A query for retrieving data.
JSON representation |
---|
{
"question"
:
string
,
"name"
:
string
,
"datasources"
:
[
{
object (
|
question
string
Optional. A natural language question to answer.
name
string
Optional. A snake-case name for the query that reflects its intent. It is used to name the corresponding data result, so that it can be referenced in later steps.
- Example: "total_sales_by_product"
- Example: "sales_for_product_12345"
datasources[]
object (
Datasource
)
Optional. The datasources available to answer the question.
DataResult
Retrieved data.
JSON representation |
---|
{
"name"
:
string
,
"schema"
:
{
object (
|
name
string
Optional. A snake-case name for the data result that reflects its contents. The name is used to pass the result around by reference, and serves as a signal about its meaning.
- Example: "total_sales_by_product"
- Example: "sales_for_product_12345"
schema
object (
Schema
)
Optional. The schema of the data.
data[]
object (
Struct
format)
Optional. The content of the data. Each row is a struct that matches the schema. Simple values are represented as strings, while nested structures are represented as lists or structs.
LookerQuery
A query for retrieving data from a Looker Explore. See Run Inline Query .
JSON representation |
---|
{
"model"
:
string
,
"explore"
:
string
,
"fields"
:
[
string
]
,
"filters"
:
[
{
object (
|
Fields | |
---|---|
model
|
Required. The LookML model used to generate the query. |
explore
|
Required. The LookML Explore used to generate the query. |
fields[]
|
Optional. The fields to retrieve from the Explore. |
filters[]
|
Optional. The filters to apply to the Explore. |
sorts[]
|
Optional. The sorts to apply to the Explore. |
limit
|
Optional. Limit in the query. |
Filter
A Looker query filter.
JSON representation |
---|
{ "field" : string , "value" : string } |
Fields | |
---|---|
field
|
Required. The field to filter on. |
value
|
Required. The value f field to filter on. |
BigQueryJob
A BigQuery job executed by the system.
JSON representation |
---|
{ "projectId" : string , "jobId" : string , "location" : string , "destinationTable" : { object ( |
Fields | |
---|---|
projectId
|
Required. The project that the job belongs to. See JobReference . |
jobId
|
Required. The ID of the job. See JobReference . |
location
|
Optional. The location of the job. See JobReference . |
destinationTable
|
Optional. A reference to the destination table of the job's query results. See JobConfigurationQuery . |
schema
|
Optional. The schema of the job's query results. See JobStatistics2 . |
AnalysisMessage
A message produced during analysis.
JSON representation |
---|
{ // Union field |
kind
. Whether this message contains the query or one of the events from the analysis. kind
can be only one of the following:query
object (
AnalysisQuery
)
An analysis query.
progressEvent
object (
AnalysisEvent
)
An event indicating the progress of the analysis.
AnalysisQuery
A query for performing an analysis.
JSON representation |
---|
{ "question" : string , "dataResultNames" : [ string ] } |
Fields | |
---|---|
question
|
Optional. An analysis question to help answer the user's original question. |
dataResultNames[]
|
Optional. The names of previously retrieved data results to analyze. |
AnalysisEvent
An event indicating the progress of an analysis.
JSON representation |
---|
{ // Union field |
kind
. The kind of event that occurred during the analysis. kind
can be only one of the following:plannerReasoning
string
Python codegen planner's reasoning.
coderInstruction
string
Instructions issued for code generation.
code
string
Generated code.
executionOutput
string
Output from code execution.
executionError
string
An error from code execution.
resultVegaChartJson
string
Result as Vega chart JSON string.
resultNaturalLanguage
string
Result as NL string.
resultCsvData
string
Result as CSV string.
resultReferenceData
string
Result as a reference to a data source.
error
string
A generic error message.
ChartMessage
A message produced during chart generation.
JSON representation |
---|
{ // Union field |
kind
. Whether this message contains the query or the result of the chart generation. kind
can be only one of the following:query
object (
ChartQuery
)
A query for generating a chart.
result
object (
ChartResult
)
The result of a chart generation query.
ChartQuery
A query for generating a chart.
JSON representation |
---|
{ "instructions" : string , "dataResultName" : string } |
Fields | |
---|---|
instructions
|
Optional. Natural language instructions for generating the chart. |
dataResultName
|
Optional. The name of a previously retrieved data result to use in the chart. |
ChartResult
The result of a chart generation query.
JSON representation |
---|
{
"vegaConfig"
:
{
object
}
,
"image"
:
{
object (
|
Fields | |
---|---|
vegaConfig
|
Optional. A generated Vega chart config. See https://vega.github.io/vega/docs/config/ |
image
|
Optional. A rendering of the chart if this was requested in the context. |
Blob
A blob of data with a MIME type.
JSON representation |
---|
{ "mimeType" : string , "data" : string } |
Fields | |
---|---|
mimeType
|
Required. The IANA standard MIME type of the message data. |
data
|
Required. The data represented as bytes. A base64-encoded string. |
ErrorMessage
An error message.
JSON representation |
---|
{ "text" : string } |
Fields | |
---|---|
text
|
Output only. The text of the error. |