MCPcopy Index your code
hub / github.com/1Panel-dev/MaxKB / content_is_null

Method content_is_null

apps/common/utils/split_model.py:445–454  ·  view source on GitHub ↗
(paragraph: Dict, title_list: List[str])

Source from the content-addressed store, hash-verified

443
444 @staticmethod
445 def content_is_null(paragraph: Dict, title_list: List[str]):
446 if 'title' in paragraph:
447 title = paragraph.get('title')
448 content = paragraph.get('content')
449 if (content is None or len(content.strip()) == 0) and (title is not None and len(title) > 0):
450 find = [t for t in title_list if t.__contains__(title) and t != title]
451 if find:
452 return {'title': '', 'content': ''}
453 return {'title': '', 'content': title}
454 return paragraph
455
456 @staticmethod
457 def filter_title_special_characters(paragraph: Dict):

Callers 1

post_reset_paragraphMethod · 0.95

Calls 1

getMethod · 0.45

Tested by

no test coverage detected