Package dev.langchain4j.service.tool
Interface ToolProvider
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A tool provider. It is called each time the AI service is called and supplies tools for that specific call.
Tools returned in ToolProviderResult
will be included in the request to the LLM.
-
Method Summary
Modifier and TypeMethodDescriptionprovideTools
(ToolProviderRequest request) Provides tools for the request to the LLM.
-
Method Details
-
provideTools
Provides tools for the request to the LLM.- Parameters:
request
-ToolProviderRequest
containsUserMessage
and chat memory id (seeMemoryId
).- Returns:
ToolProviderResult
contains tools that should be included in the request to the LLM.
-