mirror of
https://github.com/tiennm99/DocsGPT.git
synced 2026-10-15 16:14:16 +00:00
change input
This commit is contained in:
1 parent
8b3b16bce4
commit
381a2740ee
4 files changed
+9
-5
No files matched your search
@@ -9,11 +9,12 @@ class SitemapLoader(BaseRemote):
|
||||
self.loader = WebBaseLoader
|
||||
self.limit = limit # Adding limit to control the number of URLs to process
|
||||
|
||||
def load_data(self, sitemap_url):
|
||||
def load_data(self, inputs):
|
||||
sitemap_url= inputs['data']
|
||||
# Check if the input is a list and if it is, use the first element
|
||||
if isinstance(sitemap_url, list) and sitemap_url:
|
||||
url = sitemap_url[0]
|
||||
|
||||
|
||||
urls = self._extract_urls(sitemap_url)
|
||||
if not urls:
|
||||
print(f"No URLs found in the sitemap: {sitemap_url}")
|
||||
|
||||
Reference in new issue
Block a user