Table of Contents

Class InlinedRequest

Namespace
Google.GenAI.Types
Assembly
Google.GenAI.dll

Config for inlined request.

public record InlinedRequest : IEquatable<InlinedRequest>
Inheritance
InlinedRequest
Implements
Inherited Members

Properties

Config

Configuration that contains optional model parameters.

[JsonPropertyName("config")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public GenerateContentConfig? Config { get; set; }

Property Value

GenerateContentConfig

Contents

Content of the request.

[JsonPropertyName("contents")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public List<Content>? Contents { get; set; }

Property Value

List<Content>

Metadata

The metadata to be associated with the request.

[JsonPropertyName("metadata")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public Dictionary<string, string>? Metadata { get; set; }

Property Value

Dictionary<string, string>

Model

ID of the model to use. For a list of models, see Google models (https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models).

[JsonPropertyName("model")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? Model { get; set; }

Property Value

string

Methods

FromJson(string, JsonSerializerOptions?)

Deserializes a JSON string to a InlinedRequest object.

public static InlinedRequest? FromJson(string jsonString, JsonSerializerOptions? options = null)

Parameters

jsonString string

The JSON string to deserialize.

options JsonSerializerOptions

Optional JsonSerializerOptions.

Returns

InlinedRequest

The deserialized InlinedRequest object, or null if deserialization fails.