Part

Part는 커뮤니케이션 콘텐츠 섹션의 컨테이너를 나타냅니다. 파트는 순수 텍스트, 일종의 파일 (이미지, 동영상 등) 또는 구조화된 데이터 blob (예: JSON)일 수 있습니다.

JSON 표현
{
  "metadata": {
    object
  },

  // Union field part can be only one of the following:
  "text": string,
  "file": {
    object (FilePart)
  },
  "data": {
    object (DataPart)
  }
  // End of list of possible types for union field part.
}
필드
metadata

object (Struct format)

이 부분과 연결된 선택적 메타데이터입니다.

통합 필드 part.

part는 다음 중 하나여야 합니다.

text

string

file

object (FilePart)

data

object (DataPart)

FilePart

FilePart는 파일을 제공할 수 있는 다양한 방법을 나타냅니다. 파일이 작은 경우 fileWithBytes를 통해 바이트를 직접 제공할 수 있습니다. 파일이 큰 경우 에이전트는 fileWithUri 소스에서 직접 콘텐츠를 적절하게 읽어야 합니다.

JSON 표현
{
  "mimeType": string,
  "name": string,

  // Union field file can be only one of the following:
  "fileWithUri": string,
  "fileWithBytes": string
  // End of list of possible types for union field file.
}
필드
mimeType

string

name

string

통합 필드 file.

file는 다음 중 하나여야 합니다.

fileWithUri

string

fileWithBytes

string (bytes format)

base64 인코딩 문자열입니다.

DataPart

DataPart는 구조화된 blob을 나타냅니다. 가장 일반적인 것은 JSON 페이로드입니다.

JSON 표현
{
  "data": {
    object
  }
}
필드
data

object (Struct format)