From 841233a5227df54e4b9d612037a15b3c132ab4e3 Mon Sep 17 00:00:00 2001 From: juk0de Date: Tue, 5 Sep 2023 08:02:15 +0200 Subject: [PATCH] question fix --- chatmastermind/main.py | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/chatmastermind/main.py b/chatmastermind/main.py index e339e71..7b8725f 100755 --- a/chatmastermind/main.py +++ b/chatmastermind/main.py @@ -101,11 +101,22 @@ def question_cmd(args: argparse.Namespace, config: Config) -> None: if args.create: return elif args.ask: - pass # TODO + # TODO: + # * select the correct AIConfig + # * modify it according to the given arguments + # * create AI instance and make AI request + # * add answer to the message above (and create + # more messages for any additional answers) + pass elif args.repeat: - pass # TODO + # TODO: repeat either the last question or the + # one(s) given in 'args.repeat' (overwrite + # existing ones if 'args.overwrite' is True) + pass elif args.process: - pass # TODO + # TODO: process either all questions without an + # answer or the one(s) given in 'args.process' + pass def ask_cmd(args: argparse.Namespace, config: Config) -> None: @@ -195,6 +206,8 @@ def create_parser() -> argparse.ArgumentParser: question_group.add_argument('-c', '--create', nargs='+', help='Create a question') question_group.add_argument('-r', '--repeat', nargs='*', help='Repeat a question') question_group.add_argument('-p', '--process', nargs='*', help='Process existing questions') + question_cmd_parser.add_argument('-O', '--overwrite', help='Overwrite existing messages when repeating them', + action='store_true') question_cmd_parser.add_argument('-m', '--max-tokens', help='Max tokens to use', type=int) question_cmd_parser.add_argument('-T', '--temperature', help='Temperature to use', type=float) question_cmd_parser.add_argument('-A', '--AI', help='AI to use')