decode_tokens | R Documentation |
Decodes tokens back to text
decode_tokens(tokens, model)
tokens |
a vector of tokens to decode, or a list of tokens |
model |
a model to use for tokenization, either a model name, e.g., |
a character string of the decoded tokens or a vector or strings
model_to_tokenizer()
, get_tokens()
tokens <- get_tokens("Hello World", "gpt-4o")
tokens
decode_tokens(tokens, "gpt-4o")
tokens <- get_tokens(c("Hello World", "Alice Bob Charlie"), "gpt-4o")
tokens
decode_tokens(tokens, "gpt-4o")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.