內容相關要求的設定選項
簽名:
export interface GenerationConfig
屬性
屬性 | 類型 | 說明 |
---|---|---|
candidateCount | 數字 | |
frequencyPenalty | 數字 | |
maxOutputTokens | 數字 | |
presencePenalty | 數字 | |
responseMimeType | 字串 | 產生的候選文字的輸出回應 MIME 類型。支援的 MIME 類型為 text/plain (預設、文字輸出) 和 application/json (候選項目中的 JSON 回應)。必須提示模型輸出適當的回應類型,否則行為會未定義。這是預先發布版功能。 |
stopSequences | string[] | |
溫度 | 數字 | |
前 K 個 | 數字 | |
TopP | 數字 |
GenerationConfig.candidateCount
簽名:
candidateCount?: number;
GenerationConfig.frequencyPenalty
簽名:
frequencyPenalty?: number;
GenConfig.maxOutputTokens
簽名:
maxOutputTokens?: number;
GenConfig.presencePenalty
簽名:
presencePenalty?: number;
GenerationConfig.responseMimeType
產生的候選文字的輸出回應 MIME 類型。支援的 MIME 類型為 text/plain
(預設、文字輸出) 和 application/json
(候選項目中的 JSON 回應)。必須提示模型輸出適當的回應類型,否則行為會未定義。這是預先發布版功能。
簽名:
responseMimeType?: string;
GenerationConfig.stopSequences
簽名:
stopSequences?: string[];
GenConfig.temperature
簽名:
temperature?: number;
GenerationConfig.topK
簽名:
topK?: number;
GenerationConfig.topP
簽名:
topP?: number;