Ollama4j
A Java library (wrapper/binding) for Ollama server.
Loading...
Searching...
No Matches
io.github.ollama4j.tools.annotations.ToolSpec Interface Reference

Public Member Functions

String name () default ""
 
String desc ()
 

Detailed Description

Annotation to mark a method as a tool that can be registered automatically by Ollama#registerAnnotatedTools().

Methods annotated with @ToolSpec will be discovered and registered as tools when the containing class is specified as a provider in OllamaToolService.

Definition at line 27 of file ToolSpec.java.

Member Function Documentation

◆ desc()

String io.github.ollama4j.tools.annotations.ToolSpec.desc ( )

Provides a detailed description of the tool's functionality. This description is used by the LLM to determine when to call the tool.

Returns
the tool description

◆ name()

String io.github.ollama4j.tools.annotations.ToolSpec.name ( )

Specifies the name of the tool as exposed to the LLM. If left empty, the method's name will be used as the tool name.

Returns
the tool name

The documentation for this interface was generated from the following file: