This commit is contained in:
19
docs/snippets/ruby/utils/embedding_with_chunking.md
Normal file
19
docs/snippets/ruby/utils/embedding_with_chunking.md
Normal file
@@ -0,0 +1,19 @@
|
||||
```ruby title="Ruby"
|
||||
require 'kreuzberg'
|
||||
|
||||
config = Kreuzberg::ExtractionConfig.new(
|
||||
chunking: Kreuzberg::ChunkingConfig.new(
|
||||
max_characters: 1024,
|
||||
overlap: 100,
|
||||
embedding: Kreuzberg::EmbeddingConfig.new(
|
||||
model: Kreuzberg::EmbeddingModelType.new(
|
||||
type: 'preset',
|
||||
name: 'balanced'
|
||||
),
|
||||
normalize: true,
|
||||
batch_size: 32,
|
||||
show_download_progress: false
|
||||
)
|
||||
)
|
||||
)
|
||||
```
|
||||
Reference in New Issue
Block a user