Replies: 1 comment 2 replies
-
🤖 Based on the current implementation of the However, the The So, while there isn't a direct way to add a request session or a request header to the Here is an example of how you can do this: from requests import Session
from langchain.document_loaders import SitemapLoader
# Create a session with the desired headers
session = Session()
session.headers.update({'header-name': 'header-value'})
# Create a SitemapLoader instance with the session
loader = SitemapLoader(web_path='http://example.com/sitemap.xml', session=session)
# Now the SitemapLoader instance will use the session with the desired headers for its HTTP requests Please note that this is a workaround and may not work in all cases, depending on the specifics of your use case and the implementation of the LangChain framework. If this does not meet your needs, you may need to modify the LangChain framework to add the desired functionality. Sources
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. If you want to continue the conversation, start your reply with @dosu-bot. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Is there a way to add a request session or a request header to the SitemapLoader call.
Beta Was this translation helpful? Give feedback.
All reactions