Discovery Engine API . projects . locations . collections . engines . assistants . agents . files

Instance Methods

close()

Close httplib2 connections.

import_(parent, body=None, x__xgafv=None)

Imports a file to an Agent. Currently only No-Code agents are supported.

Method Details

close()
Close httplib2 connections.
import_(parent, body=None, x__xgafv=None)
Imports a file to an Agent. Currently only No-Code agents are supported.

Args:
  parent: string, Required. The resource name of the Agent. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}/agents/{agent}` (required)
  body: object, The request body.
    The object takes the form of:

{ # Request for the AgentService.ImportAgentFile method.
  "fileName": "A String", # Required. The name of the file.
  "mimeType": "A String", # Optional. The content type of the file, see https://www.iana.org/assignments/media-types/media-types.xhtml. This field is required when the data source does not provide the content type.
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Response for the AgentService.ImportAgentFile method.
  "agentFile": { # Describes a file used internally by an agent as a context on each invocation. # The imported AgentFile.
    "fileName": "A String", # Required. The name of the file.
    "mimeType": "A String", # Immutable. The content type of the file.
    "name": "A String", # Identifier. The resource name of the file. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}/agents/{agent}/files/{file}`
  },
}