mirror of
https://github.com/hwchase17/langchain
synced 2024-11-10 01:10:59 +00:00
d82cbf5e76
Co-authored-by: Nuno Campos <nuno@boringbits.io> Co-authored-by: Bagatur <baskaryan@gmail.com> Co-authored-by: Erick Friis <erick@langchain.dev>
18 lines
481 B
Python
18 lines
481 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",
|
|
"platform": platform.platform(),
|
|
"runtime": "python",
|
|
"runtime_version": platform.python_version(),
|
|
}
|