Add action -L to list all available models
This commit is contained in:
@@ -9,7 +9,7 @@ import argparse
|
||||
import pathlib
|
||||
from .utils import terminal_width, process_tags, display_chat, display_source_code, display_tags_frequency
|
||||
from .storage import save_answers, create_chat, get_tags, get_tags_unique, read_file, dump_data
|
||||
from .api_client import ai, openai_api_key
|
||||
from .api_client import ai, openai_api_key, display_models
|
||||
from itertools import zip_longest
|
||||
|
||||
|
||||
@@ -97,6 +97,7 @@ def create_parser() -> argparse.ArgumentParser:
|
||||
group.add_argument('-D', '--chat-dump', help="Print chat history as Python structure", action='store_true')
|
||||
group.add_argument('-d', '--chat', help="Print chat history as readable text", action='store_true')
|
||||
group.add_argument('-l', '--list-tags', help="List all tags and their frequency", action='store_true')
|
||||
group.add_argument('-L', '--list-models', help="List all available models", action='store_true')
|
||||
parser.add_argument('-c', '--config', help='Config file name.', default=default_config)
|
||||
parser.add_argument('-m', '--max-tokens', help='Max tokens to use', type=int)
|
||||
parser.add_argument('-T', '--temperature', help='Temperature to use', type=float)
|
||||
@@ -149,6 +150,8 @@ def main() -> int:
|
||||
process_and_display_chat(args, config)
|
||||
elif args.list_tags:
|
||||
process_and_display_tags(args, config)
|
||||
elif args.list_models:
|
||||
display_models()
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user