Method: projects.locations.collections.engines.sessions.removeContextFile

הפונקציה מסירה קובץ הקשר מסשן.

בקשת HTTP


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

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

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

פרמטרים
name

string

חובה. שם הסשן.

פורמט: projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/sessions/{session}

גוף הבקשה

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

ייצוג ב-JSON
{
  "fileId": string,
  "metadata": {
    string: string,
    ...
  }
}
שדות
fileId

string

חובה. המזהה של קובץ ההקשר.

metadata

map (key: string, value: string)

אופציונלי. מטא-נתונים שהלקוח מספק לגבי הקובץ. משקף את המפה של metadata ב-UploadSessionFileRequest. המפתחות הם בפורמט AIP-148 (אותיות קטנות, ספרות, -; ללא נקודות או קידומת של מרחב שמות בסגנון DNS). הכלי הזה משמש היום לשליחת ענף של ארטיפקט שסופק על ידי משתמש Sobi ‏ (sobi-scope = SOBI_ARTIFACT), שכולל sobi-agent-id, sobi-task-id ו-sobi-filename מחוץ לכתובת URL, כי המחיקה מתבצעת מחוץ לכל הקשר של סשן.

גוף התשובה

אם הפעולה בוצעה ללא שגיאות, גוף התגובה יהיה ריק.

היקפי הרשאות

נדרש אחד מהיקפי ההרשאות הבאים של 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.sessions.removeContextFile

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