diff --git a/langchain/__init__.py b/langchain/__init__.py index 86bf4f7a..a03ce602 100644 --- a/langchain/__init__.py +++ b/langchain/__init__.py @@ -1,5 +1,6 @@ """Main entrypoint into package.""" +from importlib import metadata from typing import Optional from langchain.agents import MRKLChain, ReActChain, SelfAskWithSearchChain @@ -53,6 +54,9 @@ from langchain.utilities.wikipedia import WikipediaAPIWrapper from langchain.utilities.wolfram_alpha import WolframAlphaAPIWrapper from langchain.vectorstores import FAISS, ElasticVectorSearch +__version__ = metadata.version(__package__) +del metadata # optional, avoids polluting the results of dir(__package__) + verbose: bool = False llm_cache: Optional[BaseCache] = None set_default_callback_manager()