mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-01 09:04:03 +00:00
parent
69be82c86d
commit
7d962278f6
@ -50,7 +50,7 @@ class _KdtSuggestContext(BaseModel):
|
|||||||
lines.append("(")
|
lines.append("(")
|
||||||
|
|
||||||
if not self.columns or len(self.columns) == 0:
|
if not self.columns or len(self.columns) == 0:
|
||||||
ValueError(detail="columns list can't be null.") # type: ignore
|
ValueError("columns list can't be null.")
|
||||||
|
|
||||||
columns = []
|
columns = []
|
||||||
for column in self.columns:
|
for column in self.columns:
|
||||||
|
@ -39,7 +39,7 @@ class AzureBlobStorageContainerLoader(BaseLoader):
|
|||||||
loader = AzureBlobStorageFileLoader(
|
loader = AzureBlobStorageFileLoader(
|
||||||
self.conn_str,
|
self.conn_str,
|
||||||
self.container,
|
self.container,
|
||||||
blob.name, # type: ignore
|
blob.name,
|
||||||
)
|
)
|
||||||
docs.extend(loader.load())
|
docs.extend(loader.load())
|
||||||
return docs
|
return docs
|
||||||
|
@ -176,16 +176,16 @@ class BlackboardLoader(WebBaseLoader):
|
|||||||
from bs4 import BeautifulSoup, Tag
|
from bs4 import BeautifulSoup, Tag
|
||||||
|
|
||||||
# Get content list
|
# Get content list
|
||||||
|
content_list: BeautifulSoup
|
||||||
content_list = soup.find("ul", {"class": "contentList"})
|
content_list = soup.find("ul", {"class": "contentList"})
|
||||||
if content_list is None:
|
if content_list is None:
|
||||||
raise ValueError("No content list found.")
|
raise ValueError("No content list found.")
|
||||||
content_list: BeautifulSoup # type: ignore
|
|
||||||
# Get all attachments
|
# Get all attachments
|
||||||
attachments = []
|
attachments = []
|
||||||
|
attachment: Tag
|
||||||
for attachment in content_list.find_all("ul", {"class": "attachments"}):
|
for attachment in content_list.find_all("ul", {"class": "attachments"}):
|
||||||
attachment: Tag # type: ignore
|
link: Tag
|
||||||
for link in attachment.find_all("a"):
|
for link in attachment.find_all("a"):
|
||||||
link: Tag # type: ignore
|
|
||||||
href = link.get("href")
|
href = link.get("href")
|
||||||
# Only add if href is not None and does not start with #
|
# Only add if href is not None and does not start with #
|
||||||
if href is not None and not href.startswith("#"):
|
if href is not None and not href.startswith("#"):
|
||||||
|
@ -469,7 +469,7 @@ class ConfluenceLoader(BaseLoader):
|
|||||||
)
|
)
|
||||||
if include_comments or not keep_markdown_format:
|
if include_comments or not keep_markdown_format:
|
||||||
try:
|
try:
|
||||||
from bs4 import BeautifulSoup # type: ignore
|
from bs4 import BeautifulSoup
|
||||||
except ImportError:
|
except ImportError:
|
||||||
raise ImportError(
|
raise ImportError(
|
||||||
"`beautifulsoup4` package not found, please run "
|
"`beautifulsoup4` package not found, please run "
|
||||||
|
Loading…
Reference in New Issue
Block a user