public static List<Integer> encode(EncodingType encodingType, String text) {
        if (isBlank(text)) {
            return new ArrayList<>();
        }
        Encoding enc = getEncoding(encodingType);
        List<Integer> encoded = enc.encode(text);
        return encoded;
    }
Obtain the encoding array by encoding;

@param text
@return Encoding array
api/src/main/java/com/theokanning/openai/utils/TikTokensUtil.java