Method: projects.locations.chat

Answers a data question by generating a stream of Message objects.

HTTP request

POST https://geminidataanalytics.googleapis.com/v1alpha/{parent=projects/*/locations/*}:chat

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Required. The parent value for chat request. Pattern: projects/{project}/locations/{location}

Request body

The request body contains data with the following structure:

JSON representation
{
  "project": string,
  "messages": [
    {
      object (Message)
    }
  ],

  // Union field context_provider can be only one of the following:
  "inlineContext": {
    object (Context)
  },
  "conversationReference": {
    object (ConversationReference)
  },
  "dataAgentContext": {
    object (DataAgentContext)
  }
  // End of list of possible types for union field context_provider.
}
Fields
project
(deprecated)

string

Optional. The Google Cloud project to be used for quota and billing.

messages[]

object (Message)

Required. Content of current conversation.

Union field context_provider. Context Provider for the chat request. It can either be - inline_context, which is a context provided inline in the request. data_agent, which is a reference to a data agent resource. conversation_reference, which is a reference to a persisted conversation and context using conversation_id and agent_id. context_provider can be only one of the following:
inlineContext

object (Context)

Optional. Inline context for the chat request. Use this to chat statelessly (without managed conversation persistence and without an Agent) by passing all context inline.

conversationReference

object (ConversationReference)

Optional. Reference to a persisted conversation and agent context. Use this to chat with an Agent using managed conversation persistence.

dataAgentContext

object (DataAgentContext)

Optional. Context for the chat request. Use this to chat with an Agent statelessly, without managed conversation persistence.

Response body

If successful, the response body contains a stream of Message instances.

Authorization scopes

Requires the following OAuth scope:

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

For more information, see the Authentication Overview.

ConversationReference

Reference to a persisted conversation and agent context.

JSON representation
{
  "conversation": string,
  "dataAgentContext": {
    object (DataAgentContext)
  }
}
Fields
conversation

string

Required. Name of the conversation resource. Format: projects/{project}/locations/{location}/conversations/{conversationId}

dataAgentContext

object (DataAgentContext)

Required. Context for the chat request using a data agent.

DataAgentContext

Context for the chat request using a data agent.

JSON representation
{
  "dataAgent": string,
  "credentials": {
    object (Credentials)
  },
  "contextVersion": enum (ContextVersion)
}
Fields
dataAgent

string

Required. The name of the data agent resource.

credentials

object (Credentials)

Optional. The credentials to use when calling the Looker data source.

Currently supports both OAuth token and API key-based credentials, as described in Authentication with an SDK.

contextVersion

enum (ContextVersion)

Optional. Version of context to be used by DCS (e.g. STAGING, PUBLISHED)

ContextVersion

List of context versions supported by DCS. There are two versions of context. This is to maintain versioning for the data agent.

Enums
CONTEXT_VERSION_UNSPECIFIED Unspecified or unrecognized.
STAGING Using this version, DCS will use the latest staging context for the data agent.
PUBLISHED Using this version, DCS will use the latest published context for the data agent.