mirror of
https://github.com/hwchase17/langchain.git
synced 2026-02-21 14:43:07 +00:00
x
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from langchain.chains.ernie_functions.base import (
|
||||
from langchain_community.chains.ernie_functions.base import (
|
||||
convert_to_ernie_function,
|
||||
create_ernie_fn_chain,
|
||||
create_ernie_fn_runnable,
|
||||
|
||||
@@ -3,20 +3,27 @@ from typing import TYPE_CHECKING, Any
|
||||
from langchain._api import create_importer
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from langchain_community.chains.ernie_functions.base import convert_python_function_to_ernie_function, convert_to_ernie_function, create_ernie_fn_chain, create_ernie_fn_runnable, create_structured_output_chain, create_structured_output_runnable, get_ernie_output_parser
|
||||
from langchain_community.chains.ernie_functions.base import (
|
||||
convert_python_function_to_ernie_function,
|
||||
convert_to_ernie_function,
|
||||
create_ernie_fn_chain,
|
||||
create_ernie_fn_runnable,
|
||||
create_structured_output_chain,
|
||||
create_structured_output_runnable,
|
||||
get_ernie_output_parser,
|
||||
)
|
||||
|
||||
# Create a way to dynamically look up deprecated imports.
|
||||
# Used to consolidate logic for raising deprecation warnings and
|
||||
# handling optional imports.
|
||||
DEPRECATED_LOOKUP = {
|
||||
"convert_python_function_to_ernie_function": "langchain_community.chains.ernie_functions.base",
|
||||
"convert_to_ernie_function": "langchain_community.chains.ernie_functions.base",
|
||||
"create_ernie_fn_chain": "langchain_community.chains.ernie_functions.base",
|
||||
"create_ernie_fn_runnable": "langchain_community.chains.ernie_functions.base",
|
||||
"create_structured_output_chain": "langchain_community.chains.ernie_functions.base",
|
||||
"create_structured_output_runnable": "langchain_community.chains.ernie_functions.base",
|
||||
"get_ernie_output_parser": "langchain_community.chains.ernie_functions.base",
|
||||
|
||||
"convert_python_function_to_ernie_function": "langchain_community.chains.ernie_functions.base",
|
||||
"convert_to_ernie_function": "langchain_community.chains.ernie_functions.base",
|
||||
"create_ernie_fn_chain": "langchain_community.chains.ernie_functions.base",
|
||||
"create_ernie_fn_runnable": "langchain_community.chains.ernie_functions.base",
|
||||
"create_structured_output_chain": "langchain_community.chains.ernie_functions.base",
|
||||
"create_structured_output_runnable": "langchain_community.chains.ernie_functions.base",
|
||||
"get_ernie_output_parser": "langchain_community.chains.ernie_functions.base",
|
||||
}
|
||||
|
||||
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
|
||||
@@ -28,11 +35,11 @@ def __getattr__(name: str) -> Any:
|
||||
|
||||
|
||||
__all__ = [
|
||||
"convert_python_function_to_ernie_function",
|
||||
"convert_to_ernie_function",
|
||||
"create_ernie_fn_chain",
|
||||
"create_ernie_fn_runnable",
|
||||
"create_structured_output_chain",
|
||||
"create_structured_output_runnable",
|
||||
"get_ernie_output_parser"
|
||||
"convert_python_function_to_ernie_function",
|
||||
"convert_to_ernie_function",
|
||||
"create_ernie_fn_chain",
|
||||
"create_ernie_fn_runnable",
|
||||
"create_structured_output_chain",
|
||||
"create_structured_output_runnable",
|
||||
"get_ernie_output_parser",
|
||||
]
|
||||
|
||||
@@ -4,7 +4,7 @@ import numpy as np
|
||||
from langchain_core.callbacks.manager import Callbacks
|
||||
from langchain_core.documents import Document
|
||||
from langchain_core.embeddings import Embeddings
|
||||
from langchain_core.pydantic_v1 import root_validator, Field
|
||||
from langchain_core.pydantic_v1 import Field, root_validator
|
||||
|
||||
from langchain.retrievers.document_compressors.base import (
|
||||
BaseDocumentCompressor,
|
||||
|
||||
Reference in New Issue
Block a user