Method: corpora.documents.chunks.list

Lists all Chunks in a Document.

HTTP request

GET https://generativelanguage.googleapis.com/v1beta/{parent=corpora/*/documents/*}/chunks

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Required. The name of the Document containing Chunks. Example: corpora/my-corpus-123/documents/the-doc-abc

Query parameters

Parameters
pageSize

integer

Optional. The maximum number of Chunks to return (per page). The service may return fewer Chunks.

If unspecified, at most 10 Chunks will be returned. The maximum size limit is 100 Chunks per page.

pageToken

string

Optional. A page token, received from a previous chunks.list call.

Provide the nextPageToken returned in the response as an argument to the next request to retrieve the next page.

When paginating, all other parameters provided to chunks.list must match the call that provided the page token.

Request body

The request body must be empty.

Response body

Response from chunks.list containing a paginated list of Chunks. The Chunks are sorted by ascending chunk.create_time.

If successful, the response body contains data with the following structure:

JSON representation
{
  "chunks": [
    {
      object (Chunk)
    }
  ],
  "nextPageToken": string
}
Fields
chunks[]

object (Chunk)

The returned Chunks.

nextPageToken

string

A token, which can be sent as pageToken to retrieve the next page. If this field is omitted, there are no more pages.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/generative-language.retriever
  • https://www.googleapis.com/auth/generative-language.retriever.readonly

For more information, see the Authentication Overview.