ExecutableCodePart

class ExecutableCodePart : Part


Represents the code that was executed by the model.

Summary

Public companion functions

ExecutableCodePart
@PublicPreviewAPI
createWithThinking(
    language: String,
    code: String,
    isThought: Boolean,
    thoughtSignature: String?
)

Creates an ExecutableCodePart with advanced thinking metadata.

Public constructors

ExecutableCodePart(language: String, code: String)

This function is deprecated. Part of the model response.

Public properties

String

The source code to be executed.

open Boolean

Indicates whether the response is a thought.

String

The programming language of the code.

String?

Public companion functions

createWithThinking

@PublicPreviewAPI
fun createWithThinking(
    language: String,
    code: String,
    isThought: Boolean,
    thoughtSignature: String?
): ExecutableCodePart

Creates an ExecutableCodePart with advanced thinking metadata.

Parameters
language: String

The programming language of the code.

code: String

The source code to be executed.

isThought: Boolean

Indicates whether the response is a thought.

thoughtSignature: String?

The signature associated with the thought, if any.

Public constructors

ExecutableCodePart

ExecutableCodePart(language: String, code: String)

Public properties

code

val codeString

The source code to be executed.

isThought

open val isThoughtBoolean

Indicates whether the response is a thought.

language

val languageString

The programming language of the code.

thoughtSignature

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