change input

This commit is contained in:
Pavel
2023-10-13 21:52:56 +04:00
parent 8b3b16bce4
commit 381a2740ee
4 changed files with 9 additions and 5 deletions

View File

@@ -9,7 +9,8 @@ class CrawlerLoader(BaseRemote):
self.loader = WebBaseLoader # Initialize the document loader
self.limit = limit # Set the limit for the number of pages to scrape
def load_data(self, url):
def load_data(self, inputs):
url = inputs['data']
# Check if the input is a list and if it is, use the first element
if isinstance(url, list) and url:
url = url[0]