FunctionResponse Class

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.

Definition

Namespace: GenerativeAI.Types
Assembly: GenerativeAI (in GenerativeAI.dll) Version: 2.0.2+aa51399cad6d90cc71158d589a6268608b3c1893
C#
public class FunctionResponse
Inheritance
Object    FunctionResponse

Constructors

FunctionResponseInitializes a new instance of the FunctionResponse class

Properties

Id Optional. The id of the function call this response is for. Populated by the client to match the corresponding function call id.
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.
Response Required. The function response in JSON object format.

Methods

EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetTypeGets the Type of the current instance.
(Inherited from Object)
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
ToStringReturns a string that represents the current object.
(Inherited from Object)

Extension Methods

ToFunctionCallContent Converts a nullable FunctionResponse into a Content object configured with the role of "function" and containing the response as a single part of the content.
(Defined by FunctionCallExtensions)

See Also