fix rebase issue

This commit is contained in:
Evan Lohn 2025-03-13 13:42:06 -07:00
parent 1ed3ac7802
commit d8abb26d03
2 changed files with 3 additions and 3 deletions

View File

@ -164,8 +164,8 @@ class DocumentBase(BaseModel):
attributes.append(k + INDEX_SEPARATOR + v)
return attributes
def get_content(self) -> str:
return " ".join([section.text for section in self.sections])
def get_text_content(self) -> str:
return " ".join([section.text for section in self.sections if section.text])
class Document(DocumentBase):

View File

@ -477,7 +477,7 @@ class Chunker:
single_chunk_fits = True
doc_token_count = 0
if self.enable_contextual_rag:
doc_content = document.get_content()
doc_content = document.get_text_content()
tokenized_doc = self.tokenizer.tokenize(doc_content)
doc_token_count = len(tokenized_doc)