Method: projects.locations.collections.engines.assistants.agents.files.import

Mengimpor file ke Agent. Saat ini hanya agen Tanpa kode yang didukung.

Permintaan HTTP

POST https://discoveryengine.googleapis.com/v1alpha/{parent=projects/*/locations/*/collections/*/engines/*/assistants/*/agents/*}/files:import

URL menggunakan sintaks gRPC Transcoding.

Parameter jalur

Parameter
parent

string

Wajib. Nama resource Agent. Format: projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}/agents/{agent}

Isi permintaan

Isi permintaan memuat data dengan struktur berikut:

Representasi JSON
{
  "fileName": string,
  "mimeType": string
}
Kolom
fileName

string

Wajib. Nama file.

mimeType

string

Opsional. Jenis konten file, lihat https://www.iana.org/assignments/media-types/media-types.xhtml.

Kolom ini wajib diisi jika sumber data tidak memberikan jenis konten.

Isi respons

Respons untuk metode AgentService.ImportAgentFile.

Jika berhasil, isi respons memuat data dengan struktur berikut:

Representasi JSON
{
  "agentFile": {
    object (AgentFile)
  }
}
Kolom
agentFile

object (AgentFile)

AgentFile yang diimpor.

Cakupan otorisasi

Memerlukan salah satu cakupan OAuth berikut:

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

Untuk mengetahui informasi selengkapnya, lihat Authentication Overview.

AgentFile

Mendeskripsikan file yang digunakan secara internal oleh agen sebagai konteks pada setiap pemanggilan.

Representasi JSON
{
  "name": string,
  "fileName": string,
  "mimeType": string
}
Kolom
name

string

ID. Nama resource file. Format: projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}/agents/{agent}/files/{file}

fileName

string

Wajib. Nama file.

mimeType

string

Tidak dapat diubah. Jenis konten file.