From c8ca1cd42fea0c5f336aff379f1e432a87e29c14 Mon Sep 17 00:00:00 2001 From: Jin Hyung Ahn Date: Thu, 9 Jan 2025 00:16:39 +0900 Subject: [PATCH] community: fix "confluence-loader" enable include_labels for documents loaded via CQL (#29089) ## Description This PR enables label inclusion for documents loaded via CQL in the confluence-loader. - Updated _lazy_load to pass the include_labels parameter instead of False in process_pages calls for documents loaded via CQL. - Ensured that labels can now be fetched and added to the metadata for documents queried with cql. ## Related Modification History This PR builds on the previous functionality introduced in [#28259](https://github.com/langchain-ai/langchain/pull/28259), which added support for including labels with the include_labels option. However, this functionality did not work as expected for CQL queries, and this PR fixes that issue. If the False handling was intentional due to another issue, please let me know. I have verified with our Confluence instance that this change allows labels to be correctly fetched for documents loaded via CQL. ## Issue Fixes #29088 ## Dependencies No changes. ## Twitter Handle [@zenoengine](https://x.com/zenoengine) --- .../langchain_community/document_loaders/confluence.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/community/langchain_community/document_loaders/confluence.py b/libs/community/langchain_community/document_loaders/confluence.py index 8af05fbe93f..225488c9ceb 100644 --- a/libs/community/langchain_community/document_loaders/confluence.py +++ b/libs/community/langchain_community/document_loaders/confluence.py @@ -408,7 +408,7 @@ class ConfluenceLoader(BaseLoader): include_restricted_content, include_attachments, include_comments, - False, # labels are not included in the search results + include_labels, content_format, ocr_languages, keep_markdown_format,