mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-13 21:47:12 +00:00
community[patch]: import flattening fix (#20110)
This PR should make it easier for linters to do type checking and for IDEs to jump to definition of code. See #20050 as a template for this PR. - As a byproduct: Added 3 missed `test_imports`. - Added missed `SolarChat` in to __init___.py Added it into test_import ut. - Added `# type: ignore` to fix linting. It is not clear, why linting errors appear after ^ changes. --------- Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
This commit is contained in:
@@ -16,7 +16,56 @@
|
||||
""" # noqa: E501
|
||||
|
||||
import importlib
|
||||
from typing import Any
|
||||
from typing import TYPE_CHECKING, Any
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from langchain_community.document_transformers.beautiful_soup_transformer import (
|
||||
BeautifulSoupTransformer, # noqa: F401
|
||||
)
|
||||
from langchain_community.document_transformers.doctran_text_extract import (
|
||||
DoctranPropertyExtractor, # noqa: F401
|
||||
)
|
||||
from langchain_community.document_transformers.doctran_text_qa import (
|
||||
DoctranQATransformer, # noqa: F401
|
||||
)
|
||||
from langchain_community.document_transformers.doctran_text_translate import (
|
||||
DoctranTextTranslator, # noqa: F401
|
||||
)
|
||||
from langchain_community.document_transformers.embeddings_redundant_filter import (
|
||||
EmbeddingsClusteringFilter, # noqa: F401
|
||||
EmbeddingsRedundantFilter, # noqa: F401
|
||||
get_stateful_documents, # noqa: F401
|
||||
)
|
||||
from langchain_community.document_transformers.google_translate import (
|
||||
GoogleTranslateTransformer, # noqa: F401
|
||||
)
|
||||
from langchain_community.document_transformers.html2text import (
|
||||
Html2TextTransformer, # noqa: F401
|
||||
)
|
||||
from langchain_community.document_transformers.long_context_reorder import (
|
||||
LongContextReorder, # noqa: F401
|
||||
)
|
||||
from langchain_community.document_transformers.nuclia_text_transform import (
|
||||
NucliaTextTransformer, # noqa: F401
|
||||
)
|
||||
from langchain_community.document_transformers.openai_functions import (
|
||||
OpenAIMetadataTagger, # noqa: F401
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
"BeautifulSoupTransformer",
|
||||
"DoctranPropertyExtractor",
|
||||
"DoctranQATransformer",
|
||||
"DoctranTextTranslator",
|
||||
"EmbeddingsClusteringFilter",
|
||||
"EmbeddingsRedundantFilter",
|
||||
"GoogleTranslateTransformer",
|
||||
"Html2TextTransformer",
|
||||
"LongContextReorder",
|
||||
"NucliaTextTransformer",
|
||||
"OpenAIMetadataTagger",
|
||||
"get_stateful_documents",
|
||||
]
|
||||
|
||||
_module_lookup = {
|
||||
"BeautifulSoupTransformer": "langchain_community.document_transformers.beautiful_soup_transformer", # noqa: E501
|
||||
|
Reference in New Issue
Block a user