GoogleCloudAiplatformV1GenerationConfig.fromJson constructor
GoogleCloudAiplatformV1GenerationConfig.fromJson(
- Map json_
Implementation
GoogleCloudAiplatformV1GenerationConfig.fromJson(core.Map json_)
: this(
audioTimestamp: json_['audioTimestamp'] as core.bool?,
candidateCount: json_['candidateCount'] as core.int?,
frequencyPenalty:
(json_['frequencyPenalty'] as core.num?)?.toDouble(),
logprobs: json_['logprobs'] as core.int?,
maxOutputTokens: json_['maxOutputTokens'] as core.int?,
mediaResolution: json_['mediaResolution'] as core.String?,
presencePenalty: (json_['presencePenalty'] as core.num?)?.toDouble(),
responseLogprobs: json_['responseLogprobs'] as core.bool?,
responseMimeType: json_['responseMimeType'] as core.String?,
responseModalities: (json_['responseModalities'] as core.List?)
?.map((value) => value as core.String)
.toList(),
responseSchema: json_.containsKey('responseSchema')
? GoogleCloudAiplatformV1Schema.fromJson(json_['responseSchema']
as core.Map<core.String, core.dynamic>)
: null,
routingConfig: json_.containsKey('routingConfig')
? GoogleCloudAiplatformV1GenerationConfigRoutingConfig.fromJson(
json_['routingConfig'] as core.Map<core.String, core.dynamic>)
: null,
seed: json_['seed'] as core.int?,
speechConfig: json_.containsKey('speechConfig')
? GoogleCloudAiplatformV1SpeechConfig.fromJson(
json_['speechConfig'] as core.Map<core.String, core.dynamic>)
: null,
stopSequences: (json_['stopSequences'] as core.List?)
?.map((value) => value as core.String)
.toList(),
temperature: (json_['temperature'] as core.num?)?.toDouble(),
topK: (json_['topK'] as core.num?)?.toDouble(),
topP: (json_['topP'] as core.num?)?.toDouble(),
);