FirebaseVertexAI Framework Reference

FunctionResponse

public struct FunctionResponse : Equatable
extension FunctionResponse: Encodable

Result output from a FunctionCall.

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.

  • Constructs a new FunctionResponse.

    Declaration

    Swift

    public init(name: String, response: JSONObject)

    Parameters

    name

    The name of the function that was called.

    response

    The function’s response.