Class FunctionCallingConfig
Function calling config.
public record FunctionCallingConfig : IEquatable<FunctionCallingConfig>
- Inheritance
-
FunctionCallingConfig
- Implements
- Inherited Members
Properties
AllowedFunctionNames
Optional. Function names to call. Only set when the Mode is ANY. Function names should match FunctionDeclaration.name. With mode set to ANY, model will predict a function call from the set of function names provided.
[JsonPropertyName("allowedFunctionNames")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public List<string>? AllowedFunctionNames { get; set; }
Property Value
Mode
Optional. Function calling mode.
[JsonPropertyName("mode")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public FunctionCallingConfigMode? Mode { get; set; }
Property Value
StreamFunctionCallArguments
Optional. When set to true, arguments of a single function call will be streamed out in
multiple parts/contents/responses. Partial parameter results will be returned in the
FunctionCall.partial_args field. This field is not supported in Gemini API.
[JsonPropertyName("streamFunctionCallArguments")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public bool? StreamFunctionCallArguments { get; set; }
Property Value
- bool?
Methods
FromJson(string, JsonSerializerOptions?)
Deserializes a JSON string to a FunctionCallingConfig object.
public static FunctionCallingConfig? FromJson(string jsonString, JsonSerializerOptions? options = null)
Parameters
jsonStringstringThe JSON string to deserialize.
optionsJsonSerializerOptionsOptional JsonSerializerOptions.
Returns
- FunctionCallingConfig
The deserialized FunctionCallingConfig object, or null if deserialization fails.