Method: projects.locations.collections.engines.assistants.createCachedContent

명시적 컨텍스트 캐시 (Vertex CachedContent)를 만듭니다. name은 후속 assistant.generateContent 요청에서 cachedContent로 전달됩니다. Gemini Enterprise 클라이언트 (ASSISTANT_USER 공개 상태)로 제한됩니다.

HTTP 요청


POST https://discoveryengine.googleapis.com/v1alpha/{name=projects/*/locations/*/collections/*/engines/*/assistants/*}:createCachedContent

URL은 gRPC 트랜스코딩 구문을 사용합니다.

경로 매개변수

매개변수
name

string

필수 항목입니다. 요청을 처리하는 Assistant의 리소스 이름입니다. 형식: projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}

요청 본문

요청 본문에는 다음과 같은 구조의 데이터가 포함됩니다.

JSON 표현
{
  "model": string,
  "httpBody": {
    object (HttpBody)
  }
}
필드
model

string

필수 항목입니다. 캐시가 사용되는 불투명 모델 ID입니다. 이를 참조하는 assistants.generateContent 요청의 모델과 일치해야 합니다.

httpBody

object (HttpBody)

필수 항목입니다. 생성할 Vertex CachedContent(JSON 형식)

응답 본문

성공한 경우 응답은 형식이 메서드에 의해 정의되는 일반 HTTP 응답입니다.

승인 범위

다음 OAuth 범위 중 하나가 필요합니다.

  • 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

자세한 내용은 Authentication Overview에서 확인하세요.

IAM 권한

name 리소스에 대해서는 다음 IAM 권한이 필요합니다.

  • discoveryengine.assistants.assist

자세한 내용은 IAM 문서를 참조하세요.