Class FunctionResponse
- Namespace
- GenerativeAI.Types
- Assembly
- GenerativeAI.dll
The result output from a FunctionCall that contains a string representing the Name and a structured JSON object containing any output from the function is used as context to the model. This should contain the result of a FunctionCall made based on model prediction.
public class FunctionResponse
- Inheritance
-
FunctionResponse
- Inherited Members
- Extension Methods
Constructors
FunctionResponse()
Initializes a new instance of the FunctionResponse class for JSON deserialization.
public FunctionResponse()
FunctionResponse(string)
Initializes a new instance of the FunctionResponse class with the specified function name.
public FunctionResponse(string name)
Parameters
namestringThe name of the function this response is for.
Properties
Id
Optional. The id of the function call this response is for. Populated by the client
to match the corresponding function call id.
[JsonPropertyName("id")]
public string? Id { get; set; }
Property Value
Name
Required. The name of the function to call. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 63.
[JsonPropertyName("name")]
public string Name { get; set; }
Property Value
Parts
Optional. List of parts that constitute a function response. Each part may have a different IANA MIME type.
[JsonPropertyName("parts")]
public List<FunctionResponsePart>? Parts { get; set; }
Property Value
Response
Required. The function response in JSON object format.
[JsonPropertyName("response")]
public JsonNode? Response { get; set; }
Property Value
Scheduling
Optional. Specifies how the response should be scheduled in the conversation. Only applicable to NON_BLOCKING function calls. Defaults to WHEN_IDLE.
[JsonPropertyName("scheduling")]
public FunctionResponseScheduling? Scheduling { get; set; }
Property Value
WillContinue
Optional. Signals that function call continues, and more responses will be returned, turning the function call into a generator.
[JsonPropertyName("willContinue")]
public bool? WillContinue { get; set; }
Property Value
- bool?