Annotation

Citation information for model-generated content.

JSON representation
{
  "startIndex": integer,
  "endIndex": integer,

  // Union field type can be only one of the following:
  "urlCitation": {
    object (UrlCitation)
  },
  "fileCitation": {
    object (FileCitation)
  },
  "placeCitation": {
    object (PlaceCitation)
  },
  "wordInfo": {
    object (WordInfo)
  }
  // End of list of possible types for union field type.
}
Fields
startIndex

integer

Start of segment of the response that is attributed to this source.

Index indicates the start of the segment, measured in bytes.

endIndex

integer

End of the attributed segment, exclusive.

Union field type. The type of annotation. type can be only one of the following:
urlCitation

object (UrlCitation)

NOTE: We use these instead of the Citation message for historical reasons. A URL citation annotation.

fileCitation

object (FileCitation)

A file citation annotation.

placeCitation

object (PlaceCitation)

A place citation annotation.

wordInfo

object (WordInfo)

word-level ASR annotation with timing and speaker info.

UrlCitation

A URL citation annotation.

JSON representation
{
  "url": string,
  "title": string
}
Fields
url

string

The URL.

title

string

The title of the URL.

FileCitation

A file citation annotation.

JSON representation
{
  "documentUri": string,
  "fileName": string,
  "source": string,
  "customMetadata": {
    object (Struct)
  },
  "pageNumber": integer,
  "mediaId": string
}
Fields
documentUri

string

The URI of the file.

fileName

string

The name of the file.

source

string

Source attributed for a portion of the text.

customMetadata

object (Struct)

user provided metadata about the retrieved context.

pageNumber

integer

Page number of the cited document, if applicable.

mediaId

string

Media id in-case of image citations, if applicable.

PlaceCitation

A place citation annotation.

JSON representation
{
  "placeId": string,
  "name": string,
  "url": string,
  "reviewSnippets": [
    {
      object (ReviewSnippet)
    }
  ]
}
Fields
placeId

string

The id of the place, in places/{placeId} format.

name

string

title of the place.

url

string

URI reference of the place.

reviewSnippets[]

object (ReviewSnippet)

Snippets of reviews that are used to generate answers about the features of a given place in Google Maps.

WordInfo

word-level ASR annotation for transcription output. Carries the word text, optional timing, and optional speaker attribution.

JSON representation
{
  "text": string,
  "startOffset": string,
  "endOffset": string,
  "speaker": string
}
Fields
text

string

The transcribed word.

startOffset

string (Duration format)

Start offset in time of the word relative to the start of the audio. Present when timestampGranularities contains "word".

A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".

endOffset

string (Duration format)

End offset in time of the word relative to the start of the audio. Present when timestampGranularities contains "word".

A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".

speaker

string

Optional. Speaker label for this word (e.g. "spk_1", "spk_2"). Present when diarizationMode is set in TranscriptionConfig.