[Doc update] update mistral example (#1012)
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
from pathlib import Path
|
||||
import hashlib
|
||||
import logging
|
||||
from typing import Optional, Dict, Any
|
||||
from pathlib import Path
|
||||
from typing import Any, Dict, Optional
|
||||
|
||||
from embedchain.utils import detect_datatype
|
||||
from embedchain.config import AddConfig
|
||||
from embedchain.data_formatter.data_formatter import DataFormatter
|
||||
from embedchain.helpers.json_serializable import register_deserializable
|
||||
from embedchain.loaders.base_loader import BaseLoader
|
||||
from embedchain.loaders.local_text import LocalTextLoader
|
||||
from embedchain.data_formatter.data_formatter import DataFormatter
|
||||
from embedchain.config import AddConfig
|
||||
from embedchain.utils import detect_datatype
|
||||
|
||||
|
||||
@register_deserializable
|
||||
|
||||
@@ -196,7 +196,8 @@ def detect_datatype(source: Any) -> DataType:
|
||||
formatted_source = format_source(str(source), 30)
|
||||
|
||||
if url:
|
||||
from langchain.document_loaders.youtube import ALLOWED_NETLOCK as YOUTUBE_ALLOWED_NETLOCS
|
||||
from langchain.document_loaders.youtube import \
|
||||
ALLOWED_NETLOCK as YOUTUBE_ALLOWED_NETLOCS
|
||||
|
||||
if url.netloc in YOUTUBE_ALLOWED_NETLOCS:
|
||||
logging.debug(f"Source of `{formatted_source}` detected as `youtube_video`.")
|
||||
|
||||
Reference in New Issue
Block a user