From c3b3f46cb8ca66643fe19a73f48c4e693617c859 Mon Sep 17 00:00:00 2001 From: ZhangShenao <15201440436@163.com> Date: Wed, 18 Sep 2024 06:00:07 +0800 Subject: [PATCH] Improvement[Community] Improve api doc of `BeautifulSoupTransformer` (#26423) - Add missing args Co-authored-by: Erick Friis --- .../document_transformers/beautiful_soup_transformer.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libs/community/langchain_community/document_transformers/beautiful_soup_transformer.py b/libs/community/langchain_community/document_transformers/beautiful_soup_transformer.py index 901aed2bdf2..4fb27cfafeb 100644 --- a/libs/community/langchain_community/document_transformers/beautiful_soup_transformer.py +++ b/libs/community/langchain_community/document_transformers/beautiful_soup_transformer.py @@ -132,6 +132,7 @@ class BeautifulSoupTransformer(BaseDocumentTransformer): Args: html_content: The original HTML content string. tags: A list of tags to be extracted from the HTML. + remove_comments: If set to True, the comments will be removed. Returns: A string combining the content of the extracted tags. @@ -184,6 +185,7 @@ def get_navigable_strings( Args: element: A BeautifulSoup element. + remove_comments: If set to True, the comments will be removed. Returns: A generator of strings.