Dataclass that stores completion parameters for a given chat format and create_chat_completion request. prompt contains the formatted prompt generated from the chat format and messages. stop contains the stop token or list of stop tokens to use for the chat format.
| 166 | |
| 167 | @dataclasses.dataclass |
| 168 | class ChatFormatterResponse: |
| 169 | """Dataclass that stores completion parameters for a given chat format and |
| 170 | create_chat_completion request. |
| 171 | |
| 172 | prompt contains the formatted prompt generated from the chat format and messages. |
| 173 | stop contains the stop token or list of stop tokens to use for the chat format.""" |
| 174 | |
| 175 | prompt: str |
| 176 | stop: Optional[Union[str, List[str]]] = None |
| 177 | stopping_criteria: Optional[llama.StoppingCriteriaList] = None |
| 178 | added_special: bool = False |
| 179 | |
| 180 | |
| 181 | class ChatFormatter(Protocol): |
no outgoing calls
no test coverage detected
searching dependent graphs…