Method: projects.locations.notebooks.sources.batchCreate

Membuat daftar Source.

Permintaan HTTP


POST https://discoveryengine.googleapis.com/v1alpha/{parent=projects/*/locations/*/notebooks/*}/sources:batchCreate

URL ini menggunakan sintaksis gRPC Transcoding.

Parameter jalur

Parameter
parent

string

Wajib. Resource induk tempat sumber akan dibuat. Format: projects/{project}/locations/{location}/notebooks/{notebook}

Isi permintaan

Isi permintaan memuat data dengan struktur berikut:

Representasi JSON
{
  "userContents": [
    {
      object (UserContent)
    }
  ]
}
Kolom
userContents[]

object (UserContent)

Wajib. UserContent yang akan diupload.

Isi respons

Respons untuk metode SourceService.BatchCreateSources.

Jika berhasil, isi respons memuat data dengan struktur berikut:

Representasi JSON
{
  "sources": [
    {
      object (Source)
    }
  ]
}
Kolom
sources[]

object (Source)

Source.

Cakupan otorisasi

Memerlukan salah satu cakupan OAuth berikut:

  • https://www.googleapis.com/auth/cloud-platform
  • https://www.googleapis.com/auth/discoveryengine.assist.readwrite
  • https://www.googleapis.com/auth/discoveryengine.readwrite
  • https://www.googleapis.com/auth/discoveryengine.serving.readwrite

Untuk mengetahui informasi selengkapnya, lihat Authentication Overview.

Izin IAM

Memerlukan izin IAM berikut pada resource parent:

  • discoveryengine.sources.create

Untuk mengetahui informasi selengkapnya, lihat dokumentasi IAM.

UserContent

Pesan "Konten" merujuk pada data yang ingin diupload pengguna.

Representasi JSON
{

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "googleDriveContent": {
    object (GoogleDriveContent)
  },
  "textContent": {
    object (TextContent)
  },
  "webContent": {
    object (WebContent)
  },
  "videoContent": {
    object (VideoContent)
  },
  "agentspaceContent": {
    object (AgentspaceContent)
  }
  // End of mutually exclusive fields.
}
Kolom
Konten pengguna. Berikut adalah daftar kolom yang bersifat eksklusif satu sama lain. Maksimal satu kolom akan ditetapkan dalam respons:
googleDriveContent

object (GoogleDriveContent)

Konten dari Google Drive.

textContent

object (TextContent)

Konten teks yang diupload sebagai sumber.

webContent

object (WebContent)

Konten web yang diupload sebagai sumber.

videoContent

object (VideoContent)

Konten video yang diupload sebagai sumber.

agentspaceContent

object (AgentspaceContent)

Konten Agentspace diupload sebagai sumber.

Akhir kolom yang saling eksklusif.

GoogleDriveContent

Konten dari Google Drive.

Representasi JSON
{
  "documentId": string,
  "mimeType": string,
  "sourceName": string
}
Kolom
documentId

string

ID dokumen dari dokumen yang dipilih.

mimeType

string

Jenis MIME dokumen yang dipilih.

Dapat digunakan untuk membedakan jenis konten yang dipilih di pemilih Drive. Gunakan application/vnd.google-apps.document untuk Google Dokumen atau application/vnd.google-apps.presentation untuk Google Slide.

sourceName

string

Nama yang akan ditampilkan untuk sumber.

TextContent

Konten teks yang diupload sebagai sumber.

Representasi JSON
{
  "sourceName": string,
  "content": string
}
Kolom
sourceName

string

Nama tampilan sumber teks.

content

string

Nama yang akan ditampilkan untuk sumber.

WebContent

Konten web yang diupload sebagai sumber.

Representasi JSON
{
  "url": string,
  "sourceName": string
}
Kolom
url

string

Jika URL diberikan, akan mengambil halaman web di backend.

sourceName

string

Nama yang akan ditampilkan untuk sumber.

VideoContent

Konten video yang diupload sebagai sumber.

Representasi JSON
{

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "youtubeUrl": string
  // End of mutually exclusive fields.
}
Kolom
Menentukan format konten video. Berikut adalah daftar kolom yang saling eksklusif. Maksimal satu kolom akan ditetapkan dalam respons:
youtubeUrl

string

URL YouTube dari konten video.

Akhir kolom yang saling eksklusif.

AgentspaceContent

Konten Agentspace diupload sebagai sumber.

Representasi JSON
{
  "documentName": string,
  "engineName": string,
  "ideaforgeIdeaName": string
}
Kolom
documentName

string

Opsional. Nama lengkap resource dokumen Agentspace. Format: projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}/branches/{branch}/documents/{documentId}.

engineName

string

Opsional. Engine untuk memverifikasi izin dokumen. Format: projects/{project}/locations/{location}/collections/{collection}/engines/{engine}.

ideaforgeIdeaName

string

Opsional. Nama resource instance platform ide. Format: projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}/ideaForgeInstances/{instance}