Nomad changes
All checks were successful
Deploy fil (kreuzberg) / deploy (push) Successful in 49s

This commit is contained in:
Henrik Jess Nielsen
2026-06-01 23:40:55 +02:00
parent 72b1a0a6ed
commit b4c07d3693
5723 changed files with 1130655 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
```ruby title="Ruby"
require 'kreuzberg'
items = [
Kreuzberg::BatchBytesItem.new(
content: File.read('doc1.pdf'),
mime_type: 'application/pdf'
),
Kreuzberg::BatchBytesItem.new(
content: File.read('doc2.docx'),
mime_type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
),
Kreuzberg::BatchBytesItem.new(
content: File.read('doc3.xlsx'),
mime_type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
)
]
config = Kreuzberg::ExtractionConfig.new(use_cache: true)
results = Kreuzberg.batch_extract_bytes_sync(items, config: config)
results.each { |result| puts "Extracted: #{result.content.length} chars" }
```