#[non_exhaustive]pub struct ChunkingConfig {
pub chunk_size: i32,
pub include_ancestor_headings: bool,
/* private fields */
}Expand description
Serving config for chunking.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.chunk_size: i32Optional. The chunk sizes to use when splitting documents, in order of level.
include_ancestor_headings: boolOptional. Whether or not to include ancestor headings when splitting.
Implementations§
Source§impl ChunkingConfig
impl ChunkingConfig
pub fn new() -> Self
Sourcepub fn set_chunk_size<T: Into<i32>>(self, v: T) -> Self
pub fn set_chunk_size<T: Into<i32>>(self, v: T) -> Self
Sourcepub fn set_include_ancestor_headings<T: Into<bool>>(self, v: T) -> Self
pub fn set_include_ancestor_headings<T: Into<bool>>(self, v: T) -> Self
Sets the value of include_ancestor_headings.
§Example
ⓘ
let x = ChunkingConfig::new().set_include_ancestor_headings(true);Trait Implementations§
Source§impl Clone for ChunkingConfig
impl Clone for ChunkingConfig
Source§fn clone(&self) -> ChunkingConfig
fn clone(&self) -> ChunkingConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ChunkingConfig
impl Debug for ChunkingConfig
Source§impl Default for ChunkingConfig
impl Default for ChunkingConfig
Source§fn default() -> ChunkingConfig
fn default() -> ChunkingConfig
Returns the “default value” for a type. Read more
Source§impl Message for ChunkingConfig
impl Message for ChunkingConfig
Source§impl PartialEq for ChunkingConfig
impl PartialEq for ChunkingConfig
impl StructuralPartialEq for ChunkingConfig
Auto Trait Implementations§
impl Freeze for ChunkingConfig
impl RefUnwindSafe for ChunkingConfig
impl Send for ChunkingConfig
impl Sync for ChunkingConfig
impl Unpin for ChunkingConfig
impl UnwindSafe for ChunkingConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more