Package dev.langchain4j.model.dashscope
Class QwenTokenizer
java.lang.Object
dev.langchain4j.model.dashscope.QwenTokenizer
- All Implemented Interfaces:
dev.langchain4j.model.Tokenizer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
estimateTokenCountInMessage
(dev.langchain4j.data.message.ChatMessage message) int
estimateTokenCountInMessages
(Iterable<dev.langchain4j.data.message.ChatMessage> messages) int
int
estimateTokenCountInToolExecutionRequests
(Iterable<dev.langchain4j.agent.tool.ToolExecutionRequest> toolExecutionRequests) int
estimateTokenCountInToolSpecifications
(Iterable<dev.langchain4j.agent.tool.ToolSpecification> toolSpecifications) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface dev.langchain4j.model.Tokenizer
estimateTokenCountInForcefulToolExecutionRequest, estimateTokenCountInForcefulToolSpecification, estimateTokenCountInTools, estimateTokenCountInTools
-
Constructor Details
-
QwenTokenizer
-
-
Method Details
-
estimateTokenCountInText
- Specified by:
estimateTokenCountInText
in interfacedev.langchain4j.model.Tokenizer
-
estimateTokenCountInMessage
public int estimateTokenCountInMessage(dev.langchain4j.data.message.ChatMessage message) - Specified by:
estimateTokenCountInMessage
in interfacedev.langchain4j.model.Tokenizer
-
estimateTokenCountInMessages
public int estimateTokenCountInMessages(Iterable<dev.langchain4j.data.message.ChatMessage> messages) - Specified by:
estimateTokenCountInMessages
in interfacedev.langchain4j.model.Tokenizer
-
estimateTokenCountInToolSpecifications
public int estimateTokenCountInToolSpecifications(Iterable<dev.langchain4j.agent.tool.ToolSpecification> toolSpecifications) - Specified by:
estimateTokenCountInToolSpecifications
in interfacedev.langchain4j.model.Tokenizer
-
estimateTokenCountInToolExecutionRequests
public int estimateTokenCountInToolExecutionRequests(Iterable<dev.langchain4j.agent.tool.ToolExecutionRequest> toolExecutionRequests) - Specified by:
estimateTokenCountInToolExecutionRequests
in interfacedev.langchain4j.model.Tokenizer
-