Class QwenTokenizer

java.lang.Object
dev.langchain4j.model.dashscope.QwenTokenizer
All Implemented Interfaces:
dev.langchain4j.model.Tokenizer

public class QwenTokenizer extends Object implements dev.langchain4j.model.Tokenizer
  • Constructor Details

    • QwenTokenizer

      public QwenTokenizer(String apiKey, String modelName)
  • Method Details

    • estimateTokenCountInText

      public int estimateTokenCountInText(String text)
      Specified by:
      estimateTokenCountInText in interface dev.langchain4j.model.Tokenizer
    • estimateTokenCountInMessage

      public int estimateTokenCountInMessage(dev.langchain4j.data.message.ChatMessage message)
      Specified by:
      estimateTokenCountInMessage in interface dev.langchain4j.model.Tokenizer
    • estimateTokenCountInMessages

      public int estimateTokenCountInMessages(Iterable<dev.langchain4j.data.message.ChatMessage> messages)
      Specified by:
      estimateTokenCountInMessages in interface dev.langchain4j.model.Tokenizer
    • estimateTokenCountInToolSpecifications

      public int estimateTokenCountInToolSpecifications(Iterable<dev.langchain4j.agent.tool.ToolSpecification> toolSpecifications)
      Specified by:
      estimateTokenCountInToolSpecifications in interface dev.langchain4j.model.Tokenizer
    • estimateTokenCountInToolExecutionRequests

      public int estimateTokenCountInToolExecutionRequests(Iterable<dev.langchain4j.agent.tool.ToolExecutionRequest> toolExecutionRequests)
      Specified by:
      estimateTokenCountInToolExecutionRequests in interface dev.langchain4j.model.Tokenizer