mirror of
https://github.com/tiennm99/DocsGPT.git
synced 2026-10-15 20:15:30 +00:00
No crawler, no sitemap
This commit is contained in:
1 parent
8f2ad38503
commit
658867cb46
7 files changed
+76
-1
No files matched your search
@@ -0,0 +1,18 @@
|
||||
# from sitemap_loader import SitemapLoader
|
||||
# from crawler_loader import CrawlerLoader
|
||||
from application.parser.remote.web_loader import WebLoader
|
||||
|
||||
|
||||
class RemoteCreator:
|
||||
loaders = {
|
||||
'url': WebLoader,
|
||||
# 'sitemap': SitemapLoader,
|
||||
# 'crawler': CrawlerLoader
|
||||
}
|
||||
|
||||
@classmethod
|
||||
def create_loader(cls, type, *args, **kwargs):
|
||||
loader_class = cls.loaders.get(type.lower())
|
||||
if not loader_class:
|
||||
raise ValueError(f"No LLM class found for type {type}")
|
||||
return loader_class(*args, **kwargs)
|
||||
Reference in new issue
Block a user