From 280259deb57d8c18f7655e4ecd79ba137ca0a37c Mon Sep 17 00:00:00 2001 From: flu0r1ne Date: Thu, 11 May 2023 01:27:58 -0500 Subject: Add slash command and editing with an arbitrary editor --- src/gpt_chat_cli/argparsing.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/gpt_chat_cli/argparsing.py') diff --git a/src/gpt_chat_cli/argparsing.py b/src/gpt_chat_cli/argparsing.py index a96e81c..703a13b 100644 --- a/src/gpt_chat_cli/argparsing.py +++ b/src/gpt_chat_cli/argparsing.py @@ -124,14 +124,14 @@ def _construct_parser() \ "-n", "--n-completions", type=int, - default=os.getenv('f{_GPT_CLI_ENV_PREFIX}N_COMPLETIONS', 1), + default=os.getenv(f'{_GPT_CLI_ENV_PREFIX}N_COMPLETIONS', 1), help="How many chat completion choices to generate for each input message.", ) parser.add_argument( "--system-message", type=str, - default=os.getenv('f{_GPT_CLI_ENV_PREFIX}SYSTEM_MESSAGE'), + default=os.getenv(f'{_GPT_CLI_ENV_PREFIX}SYSTEM_MESSAGE'), help="Specify an alternative system message.", ) @@ -174,6 +174,13 @@ def _construct_parser() \ help="Start an interactive session" ) + parser.add_argument( + "--interactive-editor", + type=str, + default=os.getenv(f'{_GPT_CLI_ENV_PREFIX}INTERACTIVE_EDITOR'), + help="The editor which is launched by default using the /edit command in interactive mode" + ) + initial_prompt = parser.add_mutually_exclusive_group() initial_prompt.add_argument( -- cgit v1.2.3