diff options
author | Heiner Lohaus <hlohaus@users.noreply.github.com> | 2024-03-15 11:46:06 +0100 |
---|---|---|
committer | Heiner Lohaus <hlohaus@users.noreply.github.com> | 2024-03-15 11:46:06 +0100 |
commit | 8cc6000ffbf4e12bf6c1d5e5878d376e36857ec0 (patch) | |
tree | ea190c7017d8e8982e63a502da0a828d5ba42f94 /g4f/version.py | |
parent | Add export / import conversations (diff) | |
download | gpt4free-8cc6000ffbf4e12bf6c1d5e5878d376e36857ec0.tar gpt4free-8cc6000ffbf4e12bf6c1d5e5878d376e36857ec0.tar.gz gpt4free-8cc6000ffbf4e12bf6c1d5e5878d376e36857ec0.tar.bz2 gpt4free-8cc6000ffbf4e12bf6c1d5e5878d376e36857ec0.tar.lz gpt4free-8cc6000ffbf4e12bf6c1d5e5878d376e36857ec0.tar.xz gpt4free-8cc6000ffbf4e12bf6c1d5e5878d376e36857ec0.tar.zst gpt4free-8cc6000ffbf4e12bf6c1d5e5878d376e36857ec0.zip |
Diffstat (limited to 'g4f/version.py')
-rw-r--r-- | g4f/version.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/g4f/version.py b/g4f/version.py index 0d85a7f5..eda2b8fe 100644 --- a/g4f/version.py +++ b/g4f/version.py @@ -6,6 +6,7 @@ from functools import cached_property from importlib.metadata import version as get_package_version, PackageNotFoundError from subprocess import check_output, CalledProcessError, PIPE from .errors import VersionNotFoundError +from . import debug PACKAGE_NAME = "g4f" GITHUB_REPOSITORY = "xtekky/gpt4free" @@ -64,6 +65,9 @@ class VersionUtils: VersionNotFoundError: If the version cannot be determined from the package manager, Docker environment, or git repository. """ + if debug.version: + return debug.version + # Read from package manager try: return get_package_version(PACKAGE_NAME) |