伺服器串流原始預測,適用於使用原始要求/回應通訊協定而非 generateContent 形狀的模型。
僅限 Gemini Enterprise 客戶 (ASSISTANT_USER 可見度),不屬於一般 Discovery Engine API。
HTTP 要求
POST https://discoveryengine.googleapis.com/v1alpha/{name=projects/*/locations/*/collections/*/engines/*/assistants/*}:streamRawPredict
這個網址使用 gRPC 轉碼語法。
路徑參數
| 參數 | |
|---|---|
name |
這是必要旗標, |
要求主體
要求主體包含下列結構的資料:
| JSON 表示法 |
|---|
{
"model": string,
"httpBody": {
object ( |
| 欄位 | |
|---|---|
model |
這是必要旗標,用於處理要求的模型。這是不透明的模型 ID,不是 Discovery Engine 資源。 |
httpBody |
這是必要旗標,不透明的要求主體。 |
回應主體
如果成功,回應會是通用 HTTP 回應,格式由方法定義。
授權範圍
需要下列其中一種 OAuth 範圍:
https://www.googleapis.com/auth/cloud-platformhttps://www.googleapis.com/auth/discoveryengine.assist.readwritehttps://www.googleapis.com/auth/discoveryengine.readwritehttps://www.googleapis.com/auth/discoveryengine.serving.readwrite
詳情請參閱Authentication Overview。
IAM 權限
需要 name 資源的下列 IAM 權限:
discoveryengine.assistants.assist
詳情請參閱 IAM 說明文件。