Google Cloud Ai Platform V1 Client - Class FunctionResponse (1.8.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
Name Description
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
Type Description
string

setName

Required. The name of the function to call.

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

Parameter
Name Description
var string
Returns
Type Description
$this

getResponse

Required. The function response in JSON object format.

Returns
Type Description
Google\Protobuf\Struct|null

hasResponse

clearResponse

setResponse

Required. The function response in JSON object format.

Parameter
Name Description
var Google\Protobuf\Struct
Returns
Type Description
$this