(self, prompt: str, system='', **kwargs: str)
| 56 | } |
| 57 | |
| 58 | def apply(self, prompt: str, system='', **kwargs: str) -> str: |
| 59 | result = '' |
| 60 | |
| 61 | if system: |
| 62 | result += f'{self.special_tokens["start_system"]}\n{system}{self.special_tokens["end"]}\n' |
| 63 | |
| 64 | result += f'{self.special_tokens["start_user"]}\n{prompt}{self.special_tokens["end"]}\n' |
| 65 | result += f'{self.special_tokens["start_assistant"]}\n' |
| 66 | |
| 67 | return result |
| 68 | |
| 69 | |
| 70 | class Alpaca(PromptStyle): |
no outgoing calls