Llm4sTools

org.llm4s.spring.Llm4sTools
See theLlm4sTools companion object
final class Llm4sTools(declared: List[JTool])

The agent tools the application's beans declare (#2279): each public method annotated with llm4s's @Tool (org.llm4s.javaapi.Tool) on a singleton bean, read as JTool.fromAnnotated reads it. The llm4sAgent bean offers them to its model; inject this bean to give them to an agent of your own.

@Component
public class WeatherTools {
   @Tool(description = "The current weather in a city")
   public String weather(@Param(name = "city", description = "City name") String city) { ... }
}

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Any
def tools(): List[JTool]

The tools, in the order their beans were defined, and in each bean by method name.

The tools, in the order their beans were defined, and in each bean by method name.

Attributes