Skip to content

Commit e000b24

Browse files
committed
WIP
1 parent 91f9a5b commit e000b24

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

llms_wrapper/llms_wrapper_test.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@
44
Module for the llms_wrapper_test command to perform a simple test to check
55
if one or more LLMs are working.
66
"""
7+
import sys
78
import argparse
89
import re
910
from loguru import logger
1011
from llms_wrapper.log import configure_logging
1112
from llms_wrapper.llms import LLMS
1213
from llms_wrapper.config import read_config_file, update_llm_config
1314
from llms_wrapper.utils import pp_config, dict_except
15+
from llms_wrapper.version import __version__
1416

1517
DEFAULT_PROMPT = """What is the first name of Einstein who developed the theory of relativity?
1618
Only give the name and no additional text?"""
@@ -22,7 +24,6 @@ def get_args() -> dict:
2224
"""
2325
Get the command line arguments
2426
"""
25-
print("ENTERING get_args")
2627
parser = argparse.ArgumentParser(description='Test llms')
2728
parser.add_argument('--llms', '-l', nargs="*", type=str, default=[], help='LLMs to use for the queries (or use config)', required=False)
2829
parser.add_argument('--use', '-u', nargs="*", type=str, default=[], help='Subset of LLMs to use (all)', required=False)
@@ -35,12 +36,14 @@ def get_args() -> dict:
3536
parser.add_argument("--show_response", action="store_true", help="Show thefull response from the LLM", required=False)
3637
parser.add_argument("--show_cost", action="store_true", help="Show token counts and cost", required=False)
3738
parser.add_argument("--logfile", "-f", type=str, help="Log file", required=False)
39+
parser.add_argument("--version", action="store_true", help="Show version and exit")
3840
args = parser.parse_args()
39-
print("after parse_args")
41+
if args.version:
42+
print("llms_wrapper version:", __version__)
43+
sys.exit()
4044
loglevel1 = "INFO"
4145
if args.debug:
4246
loglevel1 = "DEBUG"
43-
print("before configure_logging")
4447
configure_logging(level=loglevel1, logfile=args.logfile)
4548
# logger.enable("llms_wrapper")
4649
# TODO: for testing, remove once logging works properly
@@ -169,14 +172,10 @@ def run(config: dict):
169172

170173

171174
def main():
172-
print("Entering main()")
173175
args = get_args()
174-
print("After get_args()")
175176
run(args)
176177

177178

178179
if __name__ == '__main__':
179-
print("Entering if __main__")
180180
logger.enable("llms_wrapper")
181-
print("Before main()")
182181
main()

llms_wrapper/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
import importlib.metadata
2-
__version__ = "0.1.18"
2+
__version__ = "0.1.19"
33

0 commit comments

Comments
 (0)