Spaces:
Running
Running
Update apps/agent/utils.py
Browse files- apps/agent/utils.py +2 -2
apps/agent/utils.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
import uuid
|
2 |
import logging
|
3 |
from typing import List
|
4 |
-
from langchain_community.document_loaders import
|
5 |
from langchain.text_splitter import RecursiveCharacterTextSplitter
|
6 |
|
7 |
# add logger
|
@@ -22,7 +22,7 @@ def load_and_split_docs(urls: List[str]):
|
|
22 |
"",
|
23 |
]
|
24 |
logger.info("Extracting web loader...")
|
25 |
-
loader =
|
26 |
docs = loader.load()
|
27 |
|
28 |
text_splitter = RecursiveCharacterTextSplitter.from_tiktoken_encoder(
|
|
|
1 |
import uuid
|
2 |
import logging
|
3 |
from typing import List
|
4 |
+
from langchain_community.document_loaders import WebBaseLoader
|
5 |
from langchain.text_splitter import RecursiveCharacterTextSplitter
|
6 |
|
7 |
# add logger
|
|
|
22 |
"",
|
23 |
]
|
24 |
logger.info("Extracting web loader...")
|
25 |
+
loader = WebBaseLoader(urls=urls)
|
26 |
docs = loader.load()
|
27 |
|
28 |
text_splitter = RecursiveCharacterTextSplitter.from_tiktoken_encoder(
|