Get lengths of the tokenized strings. Args: prompt (str): Input string. Returns: int: Length of the input tokens
(self, prompt: str)
| 137 | |
| 138 | @abstractmethod |
| 139 | def get_token_len(self, prompt: str) -> int: |
| 140 | """Get lengths of the tokenized strings. |
| 141 | |
| 142 | Args: |
| 143 | prompt (str): Input string. |
| 144 | |
| 145 | Returns: |
| 146 | int: Length of the input tokens |
| 147 | """ |
| 148 | |
| 149 | def parse_template(self, prompt_template: PromptType, mode: str) -> str: |
| 150 | """Parse a prompt template, and wrap it with meta template if |
no outgoing calls
no test coverage detected