Method: corpora.documents.chunks.batchUpdate

Batch update Chunks.

HTTP request

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

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Optional. The name of the Document containing the Chunks to update. The parent field in every UpdateChunkRequest must match this value. Example: corpora/my-corpus-123/documents/the-doc-abc

Request body

The request body contains data with the following structure:

JSON representation
{
  "requests": [
    {
      object (UpdateChunkRequest)
    }
  ]
}
Fields
requests[]

object (UpdateChunkRequest)

Required. The request messages specifying the Chunks to update. A maximum of 100 Chunks can be updated in a batch.

Response body

Response from chunks.batchUpdate containing a list of updated Chunks.

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

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

object (Chunk)

Chunks updated.

Authorization scopes

Requires the following OAuth scope:

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

For more information, see the Authentication Overview.

UpdateChunkRequest

Request to update a Chunk.

JSON representation
{
  "chunk": {
    object (Chunk)
  },
  "updateMask": string
}
Fields
chunk

object (Chunk)

Required. The Chunk to update.

updateMask

string (FieldMask format)

Required. The list of fields to update. Currently, this only supports updating customMetadata and data.

This is a comma-separated list of fully qualified names of fields. Example: "user.displayName,photo".