GenerationConfig interface

內容相關要求的設定選項

簽名:

export interface GenerationConfig 

屬性

屬性 類型 說明
candidateCount 數字
頻率 Penalty 數字
maxOutputTokens 數字
PresencePenalty 數字
responseMimeType 字串 所產生候選文字的輸出回應 MIME 類型。支援的 MIME 類型為 text/plain (預設、文字輸出) 和 application/json (候選項目的 JSON 回應)。您必須提示模型輸出合適的回應類型,否則行為未定義。這是預先發布版功能。
stopSequences string[]
溫度 數字
前 K 個 數字
topP 數字

GenConfig.candidateCount

簽名:

candidateCount?: number;

GenConfig.frequencyPenalty

簽名:

frequencyPenalty?: number;

GenConfig.maxOutputTokens

簽名:

maxOutputTokens?: number;

GenConfig.presencePenalty

簽名:

presencePenalty?: number;

GenConfig.responseMimeType

所產生候選文字的輸出回應 MIME 類型。支援的 MIME 類型為 text/plain (預設、文字輸出) 和 application/json (候選項目的 JSON 回應)。您必須提示模型輸出合適的回應類型,否則行為未定義。這是預先發布版功能。

簽名:

responseMimeType?: string;

GenConfig.stopSequences

簽名:

stopSequences?: string[];

GenConfig.temperature

簽名:

temperature?: number;

GenConfig.topK

簽名:

topK?: number;

GenConfig.topP

簽名:

topP?: number;