對話動作已於 2023 年 6 月 13 日淘汰。詳情請參閱「
對話動作已淘汰」。
Method: projects.versions.create
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
依據模型建立專案版本,並觸發部署至指定的發布版本 (如有指定)。
HTTP 要求
POST https://actions.googleapis.com/v2/{parent=projects/*}/versions:create
這個網址使用 gRPC 轉碼語法。
路徑參數
參數 |
parent |
string
必要欄位。父項資源名稱,格式為 projects/{project} 。{project} 是與專案相關聯的雲端專案 ID。
|
要求主體
要求主體的資料會採用以下結構:
JSON 表示法 |
{
"files": {
object (Files )
},
"releaseChannel": string
} |
欄位 |
files |
object (Files )
必要欄位。一次傳送至伺服器的檔案清單。這是設定檔或資料檔案的清單。1. 第一個要求必須為 ConfigFile。2. 第一個要求必須具備含有「settings」的 ConfigFile。3. 第一個要求必須具備含有「manifest」的 ConfigFile。4. 與內嵌雲端函式相對應的 Webhook ConfigFile 必須先串流,才能位於對應至其原始碼的 DataFile 之前。
|
releaseChannel |
string
選用設定。用來部署版本的發布版本 (如有指定)。支援的內建版本為 actions.channels.Production、action.channels.ClosedBeta、action.channels.Alpha。。
|
回應主體
如果成功,回應主體會包含 Version
的執行例項。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-26 (世界標準時間)。
[null,null,["上次更新時間:2025-07-26 (世界標準時間)。"],[[["\u003cp\u003eCreates a new project version and optionally deploys it to a specified release channel.\u003c/p\u003e\n"],["\u003cp\u003eRequires a POST request to the provided URL with project ID in the path.\u003c/p\u003e\n"],["\u003cp\u003eThe request body must include necessary configuration and data files, with specific requirements for the initial request.\u003c/p\u003e\n"],["\u003cp\u003eOptionally, specify the release channel for deployment within the request body.\u003c/p\u003e\n"],["\u003cp\u003eA successful response returns details about the created version.\u003c/p\u003e\n"]]],["This outlines the process to create a project version and deploy it. A `POST` request is sent to `https://actions.googleapis.com/v2/{parent=projects/*}/versions:create`, with the `parent` path parameter specifying the project ID. The request body requires a JSON structure that includes a list of `files`, such as config and data files, and an optional `releaseChannel` to direct the deployment. A successful request returns a `Version` instance in the response body.\n"],null,["# Method: projects.versions.create\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n - [JSON representation](#body.request_body.SCHEMA_REPRESENTATION)\n- [Response body](#body.response_body)\n\nCreates a project version based on the model and triggers deployment to the specified release channel, if specified.\n\n### HTTP request\n\n`POST https://actions.googleapis.com/v2/{parent=projects/*}/versions:create`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------|------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `parent` | `string` Required. The parent resource name in the format `projects/{project}`. The `{project}` is the cloud project ID associated with the project. |\n\n### Request body\n\nThe request body contains data with the following structure:\n\n| JSON representation ||\n|------------------------------------------------------------------------------------------------------------|---|\n| ``` { \"files\": { object (/assistant/actions/api/reference/rest/v2/Files) }, \"releaseChannel\": string } ``` |\n\n| Fields ||\n|------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `files` | `object (`[Files](/assistant/actions/api/reference/rest/v2/Files)`)` Required. List of files sent to the server at a time. This is a list of config files or data files. 1. The first request must be a ConfigFiles. 2. The first request must have a ConfigFile with 'settings'. 3. The first request must have a ConfigFile with 'manifest'. 4. The webhook ConfigFile corresponding to inline cloud function must be streamed before the DataFile corresponding to its source code. |\n| `releaseChannel` | `string` Optional. The release channel to deploy the version, if specified. The supported built in release channels are actions.channels.Production, actions.channels.ClosedBeta, actions.channels.Alpha. . |\n\n### Response body\n\nIf successful, the response body contains an instance of [Version](/assistant/actions/api/reference/rest/v2/Version)."]]