Table of Contents

Struct Behavior

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

Specifies the function Behavior. Currently only non-blocking functions are supported. If not specified, the system keeps the current function call behavior. This field is currently only supported by the BidiGenerateContent method.

[JsonConverter(typeof(BehaviorConverter))]
public readonly record struct Behavior : IEquatable<Behavior>
Implements
Inherited Members

Properties

AllValues

public static IReadOnlyList<Behavior> AllValues { get; }

Property Value

IReadOnlyList<Behavior>

Blocking

If set, the system will wait to receive the function response before continuing the conversation.

public static Behavior Blocking { get; }

Property Value

Behavior

NonBlocking

If set, the system will not wait to receive the function response. Instead, it will attempt to handle function responses as they become available while maintaining the conversation between the user and the model.

public static Behavior NonBlocking { get; }

Property Value

Behavior

Unspecified

This value is unspecified.

public static Behavior Unspecified { get; }

Property Value

Behavior

Value

public string Value { get; }

Property Value

string

Methods

Equals(Behavior)

public bool Equals(Behavior other)

Parameters

other Behavior

Returns

bool

FromString(string)

public static Behavior FromString(string value)

Parameters

value string

Returns

Behavior

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

Operators

implicit operator Behavior(string)

public static implicit operator Behavior(string value)

Parameters

value string

Returns

Behavior