mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-08 22:42:05 +00:00
release(langchain): v1.0.0a1 (#32718)
Also removing globals usage + static version
This commit is contained in:
@@ -1,18 +1,15 @@
|
||||
"""Main entrypoint into package."""
|
||||
"""Main entrypoint into LangChain."""
|
||||
|
||||
from importlib import metadata
|
||||
from typing import Any
|
||||
|
||||
try:
|
||||
__version__ = metadata.version(__package__)
|
||||
except metadata.PackageNotFoundError:
|
||||
# Case where package metadata is not available.
|
||||
__version__ = ""
|
||||
del metadata # optional, avoids polluting the results of dir(__package__)
|
||||
__version__ = "1.0.0a1"
|
||||
|
||||
|
||||
def __getattr__(name: str) -> Any: # noqa: ANN401
|
||||
"""Get an attribute from the package."""
|
||||
"""Get an attribute from the package.
|
||||
|
||||
TODO: will be removed in a future alpha version.
|
||||
"""
|
||||
if name == "verbose":
|
||||
from langchain.globals import _verbose
|
||||
|
||||
|
18
libs/langchain_v1/langchain/globals.py
Normal file
18
libs/langchain_v1/langchain/globals.py
Normal file
@@ -0,0 +1,18 @@
|
||||
"""Global values and configuration that apply to all of LangChain.
|
||||
|
||||
TODO: will be removed in a future alpha version.
|
||||
"""
|
||||
|
||||
from typing import TYPE_CHECKING, Optional
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from langchain_core.caches import BaseCache
|
||||
|
||||
|
||||
# DO NOT USE THESE VALUES DIRECTLY!
|
||||
# Use them only via `get_<X>()` and `set_<X>()` below,
|
||||
# or else your code may behave unexpectedly with other uses of these global settings:
|
||||
# https://github.com/langchain-ai/langchain/pull/11311#issuecomment-1743780004
|
||||
_verbose: bool = False
|
||||
_debug: bool = False
|
||||
_llm_cache: Optional["BaseCache"] = None
|
@@ -12,13 +12,16 @@ dependencies = [
|
||||
"langgraph>=0.6.0",
|
||||
"pydantic>=2.7.4",
|
||||
]
|
||||
|
||||
dynamic = ["version"]
|
||||
|
||||
name = "langchain"
|
||||
version = "1.0.0dev1"
|
||||
description = "Building applications with LLMs through composability"
|
||||
readme = "README.md"
|
||||
|
||||
[tool.pdm.version]
|
||||
source = "file"
|
||||
path = "langchain/__init__.py"
|
||||
|
||||
[project.optional-dependencies]
|
||||
# community = ["langchain-community"]
|
||||
anthropic = ["langchain-anthropic"]
|
||||
|
Reference in New Issue
Block a user