From f3e5d6c6615f1ee623fcda83da671a54fafd128c Mon Sep 17 00:00:00 2001 From: flu0r1ne Date: Fri, 5 May 2023 14:48:37 -0500 Subject: Add interactive mode --- src/gpt_chat_cli/argparsing.py | 5 ++--- 1 file changed, 2 insertions(+), 3 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 e9183a9..04d3645 100644 --- a/src/gpt_chat_cli/argparsing.py +++ b/src/gpt_chat_cli/argparsing.py @@ -57,14 +57,12 @@ class CompletionArguments: frequency_penalty: float max_tokens: int top_p: float - message: str @dataclass class DisplayArguments: adornments: bool color: bool - @dataclass class DebugArguments: save_response_to_file: Optional[str] @@ -77,6 +75,7 @@ class Arguments: version: bool list_models: bool interactive: bool + initial_message: Optional[str] = None debug_args: Optional[DebugArguments] = None def split_arguments(args: argparse.Namespace) -> Arguments: @@ -88,7 +87,6 @@ def split_arguments(args: argparse.Namespace) -> Arguments: frequency_penalty=args.frequency_penalty, max_tokens=args.max_tokens, top_p=args.top_p, - message=args.message ) display_args = DisplayArguments( @@ -102,6 +100,7 @@ def split_arguments(args: argparse.Namespace) -> Arguments: ) return Arguments( + initial_message=args.message, completion_args=completion_args, display_args=display_args, debug_args=debug_args, -- cgit v1.2.3