类的使用
dev.langchain4j.agent.tool.ToolSpecification
使用ToolSpecification的程序包
程序包
说明
-
dev.langchain4j.agent.tool中ToolSpecification的使用
修饰符和类型方法说明ToolSpecification.Builder.build()Returns aToolSpecificationbuilt from the parameters previously set.static ToolSpecificationToolSpecifications.toolSpecificationFrom(Method method) Returns theToolSpecificationfor the given method annotated with @Tool.返回变量类型为ToolSpecification的类型的dev.langchain4j.agent.tool中的方法修饰符和类型方法说明static List<ToolSpecification>ToolSpecifications.toolSpecificationsFrom(Class<?> classWithTools) ReturnsToolSpecifications for all methods annotated with @Toolwithin the specified class.static List<ToolSpecification>ToolSpecifications.toolSpecificationsFrom(Object objectWithTools) ReturnsToolSpecifications for all methods annotated with @Toolwithin the class of the specified object.类型变量类型为ToolSpecification的dev.langchain4j.agent.tool中的方法参数修饰符和类型方法说明static voidToolSpecifications.validateSpecifications(List<ToolSpecification> toolSpecifications) Validates all theToolSpecifications. -
dev.langchain4j.model中ToolSpecification的使用
参数类型为ToolSpecification的dev.langchain4j.model中的方法修饰符和类型方法说明default intTokenizer.estimateTokenCountInForcefulToolSpecification(ToolSpecification toolSpecification) Estimates the count of tokens in the given tool specification.类型变量类型为ToolSpecification的dev.langchain4j.model中的方法参数修饰符和类型方法说明intTokenizer.estimateTokenCountInToolSpecifications(Iterable<ToolSpecification> toolSpecifications) Estimates the count of tokens in the given tool specifications. -
dev.langchain4j.model.chat中ToolSpecification的使用
修饰符和类型方法说明ChatLanguageModel.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) voidDisabledStreamingChatLanguageModel.generate(List<ChatMessage> messages, ToolSpecification toolSpecification, StreamingResponseHandler<AiMessage> handler) default voidStreamingChatLanguageModel.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. -
dev.langchain4j.model.chat.listener中ToolSpecification的使用
返回变量类型为ToolSpecification的类型的dev.langchain4j.model.chat.listener中的方法