Class FunctionResponse (1.81.0)

FunctionResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)

The result output from a [FunctionCall] that contains a string representing the [FunctionDeclaration.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.

Attributes

Name Description
name str
Required. The name of the function to call. Matches [FunctionDeclaration.name] and [FunctionCall.name].
response google.protobuf.struct_pb2.Struct
Required. The function response in JSON object format. Use "output" key to specify function output and "error" key to specify error details (if any). If "output" and "error" keys are not specified, then whole "response" is treated as function output.

Methods

FunctionResponse

FunctionResponse(mapping=None, *, ignore_unknown_fields=False, **kwargs)

The result output from a [FunctionCall] that contains a string representing the [FunctionDeclaration.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.