Uses of Class
dev.langchain4j.agent.tool.ToolSpecification
Package
Description
-
Uses of ToolSpecification in dev.langchain4j.agent.tool
Modifier and TypeMethodDescriptionToolSpecification.Builder.build()
Returns aToolSpecification
built from the parameters previously set.static ToolSpecification
ToolSpecifications.toolSpecificationFrom
(Method method) Returns theToolSpecification
for the given method annotated with @Tool
.Modifier and TypeMethodDescriptionstatic List
<ToolSpecification> ToolSpecifications.toolSpecificationsFrom
(Class<?> classWithTools) ReturnsToolSpecification
s for all methods annotated with @Tool
within the specified class.static List
<ToolSpecification> ToolSpecifications.toolSpecificationsFrom
(Object objectWithTools) ReturnsToolSpecification
s for all methods annotated with @Tool
within the class of the specified object.Modifier and TypeMethodDescriptionstatic void
ToolSpecifications.validateSpecifications
(List<ToolSpecification> toolSpecifications) Validates all theToolSpecification
s. -
Uses of ToolSpecification in dev.langchain4j.model
Modifier and TypeMethodDescriptiondefault int
Tokenizer.estimateTokenCountInForcefulToolSpecification
(ToolSpecification toolSpecification) Estimates the count of tokens in the given tool specification.Modifier and TypeMethodDescriptionint
Tokenizer.estimateTokenCountInToolSpecifications
(Iterable<ToolSpecification> toolSpecifications) Estimates the count of tokens in the given tool specifications. -
Uses of ToolSpecification in dev.langchain4j.model.anthropic
Modifier and TypeMethodDescriptionvoid
AnthropicStreamingChatModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification, StreamingResponseHandler<AiMessage> handler) -
Uses of ToolSpecification in dev.langchain4j.model.anthropic.internal.mapper
Modifier and TypeMethodDescriptionstatic AnthropicTool
AnthropicMapper.toAnthropicTool
(ToolSpecification toolSpecification, AnthropicCacheType cacheToolsPrompt) Modifier and TypeMethodDescriptionstatic List
<AnthropicTool> AnthropicMapper.toAnthropicTools
(List<ToolSpecification> toolSpecifications, AnthropicCacheType cacheToolsPrompt) -
Uses of ToolSpecification in dev.langchain4j.model.azure
Modifier and TypeMethodDescriptionint
AzureOpenAiTokenizer.estimateTokenCountInForcefulToolSpecification
(ToolSpecification toolSpecification) AzureOpenAiChatModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification) void
AzureOpenAiStreamingChatModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification, StreamingResponseHandler<AiMessage> handler) Modifier and TypeMethodDescriptionint
AzureOpenAiTokenizer.estimateTokenCountInToolSpecifications
(Iterable<ToolSpecification> toolSpecifications) -
Uses of ToolSpecification in dev.langchain4j.model.bedrock
Modifier and TypeMethodDescriptionBedrockAnthropicMessageChatModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification) -
Uses of ToolSpecification in dev.langchain4j.model.chat
Modifier and TypeMethodDescriptionChatLanguageModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification) Generates a response from the model based on a list of messages and a single tool specification.DisabledChatLanguageModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification) void
DisabledStreamingChatLanguageModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification, StreamingResponseHandler<AiMessage> handler) default void
StreamingChatLanguageModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification, StreamingResponseHandler<AiMessage> handler) Generates a response from the model based on a list of messages and a tool specification. -
Uses of ToolSpecification in dev.langchain4j.model.chat.listener
Modifier and TypeMethodDescriptionChatModelRequest.ChatModelRequestBuilder.toolSpecifications
(List<ToolSpecification> toolSpecifications) -
Uses of ToolSpecification in dev.langchain4j.model.chat.request
Modifier and TypeMethodDescriptionChatRequest.Builder.toolSpecifications
(ToolSpecification... toolSpecifications) Modifier and TypeMethodDescriptionChatRequest.Builder.toolSpecifications
(List<ToolSpecification> toolSpecifications) -
Uses of ToolSpecification in dev.langchain4j.model.dashscope
Modifier and TypeMethodDescriptionQwenChatModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification) void
QwenStreamingChatModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification, StreamingResponseHandler<AiMessage> handler) Modifier and TypeMethodDescriptionint
QwenTokenizer.estimateTokenCountInToolSpecifications
(Iterable<ToolSpecification> toolSpecifications) -
Uses of ToolSpecification in dev.langchain4j.model.github
Modifier and TypeMethodDescriptionGitHubModelsChatModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification) void
GitHubModelsStreamingChatModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification, StreamingResponseHandler<AiMessage> handler) -
Uses of ToolSpecification in dev.langchain4j.model.googleai
Modifier and TypeMethodDescriptionGoogleAiGeminiChatModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification) void
GoogleAiGeminiStreamingChatModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification, StreamingResponseHandler<AiMessage> handler) Modifier and TypeMethodDescriptionint
GoogleAiGeminiTokenizer.estimateTokenCountInToolSpecifications
(Iterable<ToolSpecification> toolSpecifications) -
Uses of ToolSpecification in dev.langchain4j.model.jlama
Modifier and TypeMethodDescriptionJlamaChatModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification) -
Uses of ToolSpecification in dev.langchain4j.model.localai
Modifier and TypeMethodDescriptionLocalAiChatModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification) void
LocalAiStreamingChatModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification, StreamingResponseHandler<AiMessage> handler) -
Uses of ToolSpecification in dev.langchain4j.model.mistralai
Modifier and TypeMethodDescriptionMistralAiChatModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification) Generates an AI message response based on the given list of chat messages and a tool specification.void
MistralAiStreamingChatModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification, StreamingResponseHandler<AiMessage> handler) Generates streamed token response based on the given list of messages and tool specification. -
Uses of ToolSpecification in dev.langchain4j.model.mistralai.internal.mapper
Modifier and TypeMethodDescriptionstatic List
<MistralAiTool> MistralAiMapper.toMistralAiTools
(List<ToolSpecification> toolSpecifications) -
Uses of ToolSpecification in dev.langchain4j.model.openai
Modifier and TypeMethodDescriptionint
OpenAiTokenizer.estimateTokenCountInForcefulToolSpecification
(ToolSpecification toolSpecification) OpenAiChatModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification) void
OpenAiStreamingChatModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification, StreamingResponseHandler<AiMessage> handler) Modifier and TypeMethodDescriptionint
OpenAiTokenizer.estimateTokenCountInToolSpecifications
(Iterable<ToolSpecification> toolSpecifications) static List
<dev.ai4j.openai4j.chat.Function> InternalOpenAiHelper.toFunctions
(Collection<ToolSpecification> toolSpecifications) Deprecated.static List
<dev.ai4j.openai4j.chat.Tool> InternalOpenAiHelper.toTools
(Collection<ToolSpecification> toolSpecifications, boolean strict) -
Uses of ToolSpecification in dev.langchain4j.model.qianfan
Modifier and TypeMethodDescriptionQianfanChatModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification) void
QianfanStreamingChatModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification, StreamingResponseHandler<AiMessage> handler) Modifier and TypeMethodDescriptionInternalQianfanHelper.toFunctions
(Collection<ToolSpecification> toolSpecifications) -
Uses of ToolSpecification in dev.langchain4j.model.vertexai
Modifier and TypeMethodDescriptionVertexAiGeminiChatModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification) void
VertexAiGeminiStreamingChatModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification, StreamingResponseHandler<AiMessage> handler) -
Uses of ToolSpecification in dev.langchain4j.model.workersai
Modifier and TypeMethodDescriptionWorkersAiChatModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification) Generates a response from the model based on a list of messages and a single tool specification. -
Uses of ToolSpecification in dev.langchain4j.model.zhipu
Modifier and TypeMethodDescriptionZhipuAiChatModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification) void
ZhipuAiStreamingChatModel.generate
(List<ChatMessage> messages, ToolSpecification toolSpecification, StreamingResponseHandler<AiMessage> handler) -
Uses of ToolSpecification in dev.langchain4j.service
Modifier and TypeMethodDescriptionAiServices.tools
(Map<ToolSpecification, ToolExecutor> tools) Configures the tools that the LLM can use. -
Uses of ToolSpecification in dev.langchain4j.service.tool
Modifier and TypeMethodDescriptionToolProviderResult.Builder.add
(ToolSpecification tool, ToolExecutor executor) Modifier and TypeMethodDescriptionToolProviderResult.Builder.addAll
(Map<ToolSpecification, ToolExecutor> tools)
InternalOpenAiHelper.toTools(Collection, boolean)
instead