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,
        frequencyPenalty: json_.containsKey('frequencyPenalty')
            ? (json_['frequencyPenalty'] as core.num).toDouble()
            : null,
        maxOutputTokens: json_.containsKey('maxOutputTokens')
            ? json_['maxOutputTokens'] as core.int
            : null,
        presencePenalty: json_.containsKey('presencePenalty')
            ? (json_['presencePenalty'] as core.num).toDouble()
            : null,
        responseMimeType: json_.containsKey('responseMimeType')
            ? json_['responseMimeType'] as core.String
            : null,
        responseSchema: json_.containsKey('responseSchema')
            ? GoogleCloudAiplatformV1Schema.fromJson(json_['responseSchema']
                as core.Map<core.String, core.dynamic>)
            : 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,
      );