Struct googapis::google::cloud::dataqna::v1alpha::auto_suggestion_service_client::AutoSuggestionServiceClient[][src]

pub struct AutoSuggestionServiceClient<T> { /* fields omitted */ }
Expand description

This stateless API provides automatic suggestions for natural language queries for the data sources in the provided project and location.

The service provides a resourceless operation suggestQueries that can be called to get a list of suggestions for a given incomplete query and scope (or list of scopes) under which the query is to be interpreted.

There are two types of suggestions, ENTITY for single entity suggestions and TEMPLATE for full sentences. By default, both types are returned.

Example Request:

GetSuggestions({
  parent: "locations/us/projects/my-project"
  scopes:
  "//bigquery.googleapis.com/projects/my-project/datasets/my-dataset/tables/my-table"
  query: "top it"
})

The service will retrieve information based on the given scope(s) and give suggestions based on that (e.g. “top item” for “top it” if “item” is a known dimension for the provided scope).

suggestions {
  suggestion_info {
    annotated_suggestion {
      text_formatted: "top item by sum of usd_revenue_net"
      markups {
        type: DIMENSION
        start_char_index: 4
        length: 4
      }
      markups {
        type: METRIC
        start_char_index: 19
        length: 15
      }
    }
    query_matches {
      start_char_index: 0
      length: 6
    }
  }
  suggestion_type: TEMPLATE
  ranking_score: 0.9
}
suggestions {
  suggestion_info {
    annotated_suggestion {
      text_formatted: "item"
      markups {
        type: DIMENSION
        start_char_index: 4
        length: 2
      }
    }
    query_matches {
      start_char_index: 0
      length: 6
    }
  }
  suggestion_type: ENTITY
  ranking_score: 0.8
}

Implementations

Compress requests with gzip.

This requires the server to support it otherwise it might respond with an error.

Enable decompressing responses with gzip.

Gets a list of suggestions based on a prefix string. AutoSuggestion tolerance should be less than 1 second.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Wrap the input message T in a tonic::Request

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more