CodeExecutionResultPart.Companion

public static class CodeExecutionResultPart.Companion


Summary

Public methods

static final @NonNull CodeExecutionResultPart
@PublicPreviewAPI
createWithThinking(
    @NonNull String outcome,
    @NonNull String output,
    boolean isThought,
    String thoughtSignature
)

Creates a CodeExecutionResultPart with advanced thinking metadata.

Public methods

createWithThinking

@PublicPreviewAPI
public static final @NonNull CodeExecutionResultPart createWithThinking(
    @NonNull String outcome,
    @NonNull String output,
    boolean isThought,
    String thoughtSignature
)

Creates a CodeExecutionResultPart with advanced thinking metadata.

Parameters
@NonNull String outcome

The result of the execution.

@NonNull String output

The stdout from the code execution, or an error message if it failed.

boolean isThought

Indicates whether the response is a thought.

String thoughtSignature

The signature associated with the thought, if any.