Files
fil/docs/snippets/r/utils/token_reduction.md

16 lines
296 B
Markdown
Raw Normal View History

2026-06-01 23:40:55 +02:00
```r title="R"
library(kreuzberg)
config <- list(
token_reduction = list(
mode = "moderate",
preserve_important_words = TRUE
)
)
json <- extract_file_sync("document.pdf", "application/pdf", config)
result <- jsonlite::fromJSON(json, simplifyVector = FALSE)
cat(result$content)
```