FunctionResponsePart
@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *)
public struct FunctionResponsePart : Part
Result output from a function call.
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 FunctionCallPart
made based on model prediction.
-
The name of the function that was called.
Declaration
Swift
public var name: String { get }
-
The function’s response or return value.
Declaration
Swift
public var response: JSONObject { get }
-
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.