選取要在工作階段中使用的背景資訊檔案。
HTTP 要求
POST https://discoveryengine.googleapis.com/v1alpha/{name=projects/*/locations/*/collections/*/engines/*/sessions/*}:selectContextFiles
這個網址使用 gRPC 轉碼語法。
路徑參數
| 參數 | |
|---|---|
| name | 
 這是必要旗標,工作階段名稱。 格式: | 
要求主體
要求主體包含下列結構的資料:
| JSON 表示法 | 
|---|
| {
  "fileSelections": [
    {
      object ( | 
| 欄位 | |
|---|---|
| fileSelections[] | 
 這是必要旗標,檔案選取項目變更。你只能選取 (或取消選取) 先前上傳至工作階段的檔案。未在此處提及的檔案會維持目前的選取狀態。 | 
回應主體
如果成功,回應主體會留白。
授權範圍
需要下列其中一種 OAuth 範圍:
- https://www.googleapis.com/auth/cloud-platform
- https://www.googleapis.com/auth/discoveryengine.readwrite
- https://www.googleapis.com/auth/discoveryengine.assist.readwrite
詳情請參閱Authentication Overview。
IAM 權限
需要 name 資源的下列 IAM 權限:
- discoveryengine.sessions.selectContextFiles
詳情請參閱 IAM 說明文件。
FileSelection
內容檔案的選取狀態。
| JSON 表示法 | 
|---|
| { "fileId": string, "selected": boolean } | 
| 欄位 | |
|---|---|
| fileId | 
 這是必要旗標,內容檔案的 ID。 | 
| selected | 
 這是必要旗標,檔案是否已選取,可在工作階段中使用。 |