GoogleCloudAiplatformV1GenerationConfig.fromJson constructor

GoogleCloudAiplatformV1GenerationConfig.fromJson(
  1. Map json_
)

Implementation

GoogleCloudAiplatformV1GenerationConfig.fromJson(core.Map json_)
    : this(
        candidateCount: json_.containsKey('candidateCount')
            ? json_['candidateCount'] as core.int
            : null,
        maxOutputTokens: json_.containsKey('maxOutputTokens')
            ? json_['maxOutputTokens'] as core.int
            : null,
        stopSequences: json_.containsKey('stopSequences')
            ? (json_['stopSequences'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        temperature: json_.containsKey('temperature')
            ? (json_['temperature'] as core.num).toDouble()
            : null,
        topK: json_.containsKey('topK')
            ? (json_['topK'] as core.num).toDouble()
            : null,
        topP: json_.containsKey('topP')
            ? (json_['topP'] as core.num).toDouble()
            : null,
      );