GenerateContentConfig class
Generation configuration for text/content model calls.
Constructors
-
GenerateContentConfig({List<
ToolDeclaration> ? tools, String? systemInstruction, double? temperature, double? topP, int? topK, int? maxOutputTokens, List<String> ? stopSequences, double? frequencyPenalty, double? presencePenalty, int? seed, int? candidateCount, bool? responseLogprobs, int? logprobs, Object? thinkingConfig, Object? responseSchema, Object? responseJsonSchema, String? responseMimeType, LlmToolConfig? toolConfig, String? cachedContent, HttpOptions? httpOptions, Map<String, String> ? labels}) - Creates generation settings for content requests.
Properties
- cachedContent ↔ String?
-
Cached content resource identifier.
getter/setter pair
- candidateCount ↔ int?
-
Number of response candidates to request.
getter/setter pair
- frequencyPenalty ↔ double?
-
Frequency penalty parameter.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- httpOptions ↔ HttpOptions?
-
HTTP options for outbound model calls.
getter/setter pair
-
labels
↔ Map<
String, String> -
Provider labels attached to this request.
getter/setter pair
- logprobs ↔ int?
-
Number of top log probabilities to return.
getter/setter pair
- maxOutputTokens ↔ int?
-
Maximum output token count.
getter/setter pair
- presencePenalty ↔ double?
-
Presence penalty parameter.
getter/setter pair
- responseJsonSchema ↔ Object?
-
Raw JSON schema payload for structured outputs.
getter/setter pair
- responseLogprobs ↔ bool?
-
Whether to include response log probabilities.
getter/setter pair
- responseMimeType ↔ String?
-
Preferred response MIME type.
getter/setter pair
- responseSchema ↔ Object?
-
Provider-specific structured response schema.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- seed ↔ int?
-
Seed used for deterministic sampling.
getter/setter pair
-
stopSequences
↔ List<
String> -
Stop sequences that terminate generation.
getter/setter pair
- systemInstruction ↔ String?
-
System instruction text sent with the request.
getter/setter pair
- temperature ↔ double?
-
Sampling temperature.
getter/setter pair
- thinkingConfig ↔ Object?
-
Provider-specific thinking configuration.
getter/setter pair
- toolConfig ↔ LlmToolConfig?
-
Tool execution configuration.
getter/setter pair
-
tools
↔ List<
ToolDeclaration> ? -
Tool declarations available to the model.
getter/setter pair
- topK ↔ int?
-
Top-k sampling parameter.
getter/setter pair
- topP ↔ double?
-
Nucleus sampling parameter.
getter/setter pair
Methods
-
copyWith(
{Object? tools = _sentinel, Object? systemInstruction = _sentinel, Object? temperature = _sentinel, Object? topP = _sentinel, Object? topK = _sentinel, Object? maxOutputTokens = _sentinel, List< String> ? stopSequences, Object? frequencyPenalty = _sentinel, Object? presencePenalty = _sentinel, Object? seed = _sentinel, Object? candidateCount = _sentinel, Object? responseLogprobs = _sentinel, Object? logprobs = _sentinel, Object? thinkingConfig = _sentinel, Object? responseSchema = _sentinel, Object? responseJsonSchema = _sentinel, Object? responseMimeType = _sentinel, Object? toolConfig = _sentinel, Object? cachedContent = _sentinel, Object? httpOptions = _sentinel, Map<String, String> ? labels}) → GenerateContentConfig - Returns a copy of this generation configuration.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited