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

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. 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.

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.

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.

Returns
Type
Description

hasResponse

clearResponse

setResponse

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.

Parameter
Name
Description
Returns
Type
Description
$this
Design a Mobile Site
View Site in Mobile | Classic
Share by: