FunctionCallPart

class FunctionCallPart : Part


Represents function call name and params received from requests.

Summary

Public companion functions

FunctionCallPart
@PublicPreviewAPI
createWithThinking(
    name: String,
    args: Map<StringJsonElement>,
    id: String?,
    isThought: Boolean,
    thoughtSignature: String?
)

Creates a FunctionCallPart with advanced thinking metadata.

Public constructors

FunctionCallPart(name: String, args: Map<StringJsonElement>, id: String?)

Public companion functions

createWithThinking

@PublicPreviewAPI
fun createWithThinking(
    name: String,
    args: Map<StringJsonElement>,
    id: String?,
    isThought: Boolean,
    thoughtSignature: String?
): FunctionCallPart

Creates a FunctionCallPart with advanced thinking metadata.

Parameters
name: String

The name of the function to call.

args: Map<StringJsonElement>

The function parameters and values as a Map.

id: String?

Unique id of the function call.

isThought: Boolean

Indicates whether the response is a thought.

thoughtSignature: String?

The signature associated with the thought, if any.

Public constructors

FunctionCallPart

FunctionCallPart(
    name: String,
    args: Map<StringJsonElement>,
    id: String? = null
)
Parameters
name: String

the name of the function to call

args: Map<StringJsonElement>

the function parameters and values as a Map

id: String? = null

Unique id of the function call. If present, the returned FunctionResponsePart should have a matching id field.

Public properties

args

val argsMap<StringJsonElement>

id

val idString?

isThought

open val isThoughtBoolean

name

val nameString

thoughtSignature

val thoughtSignatureString?