community: add flag to toggle progress bar (#24463)

- **Description:** Add a flag to determine whether to show progress bar 
- **Issue:** n/a
- **Dependencies:** n/a
- **Twitter handle:** n/a

---------

Co-authored-by: Chester Curme <chester.curme@gmail.com>
This commit is contained in:
clement.l
2024-07-20 21:18:02 +08:00
committed by GitHub
parent 6b08a33fa4
commit d98b830e4b
3 changed files with 23 additions and 6 deletions

View File

@@ -41,6 +41,7 @@ class BlackboardLoader(WebBaseLoader):
basic_auth: Optional[Tuple[str, str]] = None,
cookies: Optional[dict] = None,
continue_on_failure: bool = False,
show_progress: bool = True,
):
"""Initialize with blackboard course url.
@@ -56,12 +57,15 @@ class BlackboardLoader(WebBaseLoader):
occurs loading a url, emitting a warning instead of raising an
exception. Setting this to True makes the loader more robust, but also
may result in missing data. Default: False
show_progress: whether to show a progress bar while loading. Default: True
Raises:
ValueError: If blackboard course url is invalid.
"""
super().__init__(
web_paths=(blackboard_course_url), continue_on_failure=continue_on_failure
web_paths=(blackboard_course_url),
continue_on_failure=continue_on_failure,
show_progress=show_progress,
)
# Get base url
try: