R/extendr-wrappers.R

Defines functions rs_decode_tokens rs_get_token_count rs_model_to_tokenizer rs_get_tokens

# Generated by extendr: Do not edit by hand

# nolint start

#
# This file was created with the following call:
#   .Call("wrap__make_rtiktoken_wrappers", use_symbols = TRUE, package_name = "rtiktoken")

#' @usage NULL
#' @useDynLib rtiktoken, .registration = TRUE
NULL

rs_get_tokens <- function(text, model) .Call(wrap__rs_get_tokens, text, model)

rs_model_to_tokenizer <- function(model) .Call(wrap__rs_model_to_tokenizer, model)

rs_get_token_count <- function(text, model) .Call(wrap__rs_get_token_count, text, model)

rs_decode_tokens <- function(tokens, model) .Call(wrap__rs_decode_tokens, tokens, model)


# nolint end

Try the rtiktoken package in your browser

Any scripts or data that you put into this service are public.

rtiktoken documentation built on April 15, 2025, 1:35 a.m.