Class WatsonxTokenCountEstimator

java.lang.Object
dev.langchain4j.model.watsonx.WatsonxTokenCountEstimator
All Implemented Interfaces:
TokenCountEstimator

public class WatsonxTokenCountEstimator extends Object implements TokenCountEstimator
A TokenCountEstimator implementation that integrates IBM watsonx.ai with LangChain4j.

Example usage:

TokenCountEstimator tokenCountEstimator = WatsonxTokenCountEstimator.builder()
    .baseUrl("https://...") // or use CloudRegion
    .apiKey("...")
    .projectId("...")
    .build();