Package dev.langchain4j.agent.tool
Annotation Type Tool
Java methods annotated with @Tool are considered tools that language model can use.
When using OpenAI models, function calling
is used under the hood.
-
Optional Element Summary
Optional Elements
-
Element Details
-
name
String nameName of the tool. If not provided, method name will be used.- Returns:
- name of the tool.
- Default:
""
-
value
String[] valueDescription of the tool. It should be clear and descriptive to allow language model to understand the tool's purpose and its intended use.- Returns:
- description of the tool.
- Default:
{""}
-