Tool

@Target(allowedTargets = [AnnotationTarget.FUNCTION])
@Retention(value = AnnotationRetention.RUNTIME)
public annotation Tool


Annotates a function to register it as a Tool that can be called by the generative model.

Summary

Public constructors

Tool(@NonNull String name, @NonNull String description)

Public methods

final @NonNull String

A detailed description of what the tool does, used by the model to determine when to call it.

final @NonNull String

The name of the tool.

Public constructors

Tool

public Tool(@NonNull String name, @NonNull String description)

Public methods

getDescription

public final @NonNull String getDescription()

A detailed description of what the tool does, used by the model to determine when to call it.

getName

public final @NonNull String getName()

The name of the tool. If not specified, the function name will be used.