langchain/libs/core/langchain_core/env.py
chyroc 57d1eb733f
core[patch]: update langchain-core runtime library name (#14884)
Co-authored-by: Erick Friis <erick@langchain.dev>
2023-12-20 14:35:48 -08:00

18 lines
486 B
Python

import platform
from functools import lru_cache
@lru_cache(maxsize=1)
def get_runtime_environment() -> dict:
"""Get information about the LangChain runtime environment."""
# Lazy import to avoid circular imports
from langchain_core import __version__
return {
"library_version": __version__,
"library": "langchain-core",
"platform": platform.platform(),
"runtime": "python",
"runtime_version": platform.python_version(),
}