FunctionResponse class final

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.

Inheritance
  • Object
  • ProtoMessage
  • FunctionResponse

Constructors

FunctionResponse({String id = '', required String name, required Struct? response})
FunctionResponse.fromJson(Object? j)
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
id String
Optional. The id of the function call this response is for. Populated by the client to match the corresponding function call id.
final
name String
Required. The name of the function to call. Matches FunctionDeclaration.name and FunctionCall.name.
final
qualifiedName String
The fully qualified name of this message, i.e., google.protobuf.Duration or google.rpc.ErrorInfo.
finalinherited
response → 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.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Object
override
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

fullyQualifiedName → const String