GenerateContentRequest class final
Request to generate a completion from the model. NEXT ID: 18
- Inheritance
-
- Object
- ProtoMessage
- GenerateContentRequest
Constructors
-
GenerateContentRequest({required String model, Content? systemInstruction, required List<
Content> contents, List<Tool> tools = const [], ToolConfig? toolConfig, List<SafetySetting> safetySettings = const [], GenerationConfig? generationConfig, String? cachedContent}) - GenerateContentRequest.fromJson(Object? j)
-
factory
Properties
- cachedContent → String?
-
Optional. The name of the content
cached to use as context
to serve the prediction. Format:
cachedContents/{cachedContent}final -
contents
→ List<
Content> -
Required. The content of the current conversation with the model.
final
- generationConfig → GenerationConfig?
-
Optional. Configuration options for model generation and outputs.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- model → String
-
Required. The name of the
Modelto use for generating the completion.final - qualifiedName → String
-
The fully qualified name of this message, i.e.,
google.protobuf.Durationorgoogle.rpc.ErrorInfo.finalinherited - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
safetySettings
→ List<
SafetySetting> -
Optional. A list of unique
SafetySettinginstances for blocking unsafe content.final - systemInstruction → Content?
-
Optional. Developer set system
instruction(s).
Currently, text only.
final
- toolConfig → ToolConfig?
-
Optional. Tool configuration for any
Toolspecified in the request. Refer to the Function calling guide for a usage example.final -
tools
→ List<
Tool> -
Optional. A list of
ToolstheModelmay use to generate the next response.final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Object -
override
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- fullyQualifiedName → const String