Google Cloud Ai Platform V1 Client - Class FunctionResponse (0.32.0)

Reference documentation and code samples for the Google Cloud Ai Platform V1 Client class FunctionResponse.

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.

Generated from protobuf message google.cloud.aiplatform.v1.FunctionResponse

Namespace

Google \ Cloud \ AIPlatform \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ name string

Required. The name of the function to call. Matches [FunctionDeclaration.name] and [FunctionCall.name].

↳ response Google\Protobuf\Struct

Required. The function response in JSON object format.

getName

Required. The name of the function to call.

Matches [FunctionDeclaration.name] and [FunctionCall.name].

Returns
TypeDescription
string

setName

Required. The name of the function to call.

Matches [FunctionDeclaration.name] and [FunctionCall.name].

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getResponse

Required. The function response in JSON object format.

Returns
TypeDescription
Google\Protobuf\Struct|null

hasResponse

clearResponse

setResponse

Required. The function response in JSON object format.

Parameter
NameDescription
var Google\Protobuf\Struct
Returns
TypeDescription
$this