add typehints

This commit is contained in:
Wing Lian
2023-06-11 19:52:34 -04:00
parent aac4b7691e
commit c7dee56b87

View File

@@ -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 (