Skip to content

Commit

Permalink
re-add prefix condition (#3183)
Browse files Browse the repository at this point in the history
  • Loading branch information
spolu authored Jan 12, 2024
1 parent 90f05a1 commit f30be84
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions core/src/data_sources/splitter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ impl TokenizedSection {
if let Some(c) = content.as_ref() {
if (c.tokens.len() + prefixes_tokens_count) > max_chunk_size
|| !section.sections.is_empty()
|| prefix.is_some()
{
let effective_max_chunk_size = max_chunk_size - prefixes_tokens_count;

Expand Down

0 comments on commit f30be84

Please sign in to comment.