FunctionResponsePart

public final class FunctionResponsePart implements Part


Represents function call output to be returned to the model when it requests a function call.

Summary

Nested types

public static class FunctionResponsePart.Companion

Public fields

final String
boolean
final @NonNull String
final @NonNull List<@NonNull Part>
final @NonNull JsonObject
final String

Public constructors

FunctionResponsePart(
    @NonNull String name,
    @NonNull JsonObject response,
    String id,
    @NonNull List<@NonNull Part> parts
)

Public methods

static final @NonNull FunctionResponsePart
@PublicPreviewAPI
createWithThinking(
    @NonNull String name,
    @NonNull JsonObject response,
    String id,
    @NonNull List<@NonNull Part> parts,
    boolean isThought,
    String thoughtSignature
)

Creates a FunctionResponsePart with advanced thinking metadata.

Public fields

id

public final String id

isThought

public boolean isThought

name

public final @NonNull String name

parts

public final @NonNull List<@NonNull Partparts

response

public final @NonNull JsonObject response

thoughtSignature

public final String thoughtSignature

Public constructors

FunctionResponsePart

public FunctionResponsePart(
    @NonNull String name,
    @NonNull JsonObject response,
    String id,
    @NonNull List<@NonNull Part> parts
)
Parameters
@NonNull String name

The name of the called function.

@NonNull JsonObject response

The response produced by the function as a JSONObject.

String id

Matching id for a FunctionCallPart, if one was provided.

Public methods

createWithThinking

@PublicPreviewAPI
public static final @NonNull FunctionResponsePart createWithThinking(
    @NonNull String name,
    @NonNull JsonObject response,
    String id,
    @NonNull List<@NonNull Part> parts,
    boolean isThought,
    String thoughtSignature
)

Creates a FunctionResponsePart with advanced thinking metadata.

Parameters
@NonNull String name

The name of the called function.

@NonNull JsonObject response

The response produced by the function as a JsonObject.

String id

Matching id for a FunctionCallPart, if one was provided.

@NonNull List<@NonNull Part> parts

Additional response parts, if any.

boolean isThought

Indicates whether the response is a thought.

String thoughtSignature

The signature associated with the thought, if any.

Morty Proxy This is a proxified and sanitized view of the page, visit original site.