community[patch]: fix RecursiveUrlLoader metadata_extractor return type (#18193)

**Description:** Fix `metadata_extractor` type for `RecursiveUrlLoader`,
the default `_metadata_extractor` returns `dict` instead of `str`.
**Issue:** N/A
**Dependencies:** N/A
**Twitter handle:** N/A

Signed-off-by: Hemslo Wang <hemslo.wang@gmail.com>
This commit is contained in:
Hemslo Wang 2024-03-02 07:08:20 +11:00 committed by GitHub
parent 98380cff9b
commit 58a2abf089
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -86,7 +86,7 @@ class RecursiveUrlLoader(BaseLoader):
max_depth: Optional[int] = 2, max_depth: Optional[int] = 2,
use_async: Optional[bool] = None, use_async: Optional[bool] = None,
extractor: Optional[Callable[[str], str]] = None, extractor: Optional[Callable[[str], str]] = None,
metadata_extractor: Optional[Callable[[str, str], str]] = None, metadata_extractor: Optional[Callable[[str, str], dict]] = None,
exclude_dirs: Optional[Sequence[str]] = (), exclude_dirs: Optional[Sequence[str]] = (),
timeout: Optional[int] = 10, timeout: Optional[int] = 10,
prevent_outside: bool = True, prevent_outside: bool = True,