Prints the contents of the version.txt file located in the parent directory of this script.
()
| 895 | |
| 896 | |
| 897 | def version(): |
| 898 | """ |
| 899 | Prints the contents of the version.txt file located in the parent directory of this script. |
| 900 | """ |
| 901 | current_dir = os.path.dirname(os.path.abspath(__file__)) |
| 902 | version_file_path = os.path.join(current_dir, "version.txt") |
| 903 | |
| 904 | content = "Unknown" |
| 905 | try: |
| 906 | with open(version_file_path, "r") as f: |
| 907 | content = f.read() |
| 908 | except FileNotFoundError: |
| 909 | llm_logger.error("[version.txt] Not Found!") |
| 910 | return content |
| 911 | |
| 912 | |
| 913 | def get_version_info(): |