From c7dee56b8772830c243c30bd9c062659223eb712 Mon Sep 17 00:00:00 2001 From: Wing Lian Date: Sun, 11 Jun 2023 19:52:34 -0400 Subject: [PATCH] add typehints --- src/axolotl/prompters.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/axolotl/prompters.py b/src/axolotl/prompters.py index 6ec8ad0e0..29cc4446b 100644 --- a/src/axolotl/prompters.py +++ b/src/axolotl/prompters.py @@ -266,12 +266,12 @@ class ShareGPTPrompter: # pylint: disable=too-few-public-methods A prompter that generates prompts for the ShareGPT """ - def __init__(self, prompt_style=None, system_prompt=None): + def __init__(self, prompt_style=None, system_prompt: Optional[str] = None): if prompt_style != PromptStyle.CHAT.value: raise ValueError( f"unsupported prompt_style for ShareGPTPrompter({prompt_style})" ) - system = ( + system: str = ( system_prompt if system_prompt else (