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

יוצר שמירת הקשר במטמון מפורשת (Vertex CachedContent); הערך name שלו מועבר כ-cachedContent בבקשות הבאות של assistants.generateContent. הגישה מוגבלת ללקוחות Gemini Enterprise (החשיפה של ASSISTANT_USER).

בקשת HTTP


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

כתובות ה-URL כתובות בתחביר של gRPC Transcoding.

פרמטרים של נתיב

פרמטרים
name

string

חובה. שם המשאב של Assistant שמשרת את הבקשה. פורמט: projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/assistants/{assistant}

גוף הבקשה

גוף הבקשה מכיל נתונים במבנה הבא:

ייצוג ב-JSON
{
  "model": string,
  "httpBody": {
    object (HttpBody)
  }
}
שדות
model

string

חובה. מזהה אטום של המודל שמשמש את המטמון. המזהה צריך להיות זהה למודל בבקשות 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

נדרשת הרשאת IAM הבאה במשאב name:

  • discoveryengine.assistants.assist

מידע נוסף מופיע במאמרי העזרה בנושא IAM.