Append message to the end of the chat template. Args: message: representation of a message to append.
(self, message: MessageLikeRepresentation)
| 1106 | return type(self)(**prompt_dict) |
| 1107 | |
| 1108 | def append(self, message: MessageLikeRepresentation) -> None: |
| 1109 | class="st">"""Append message to the end of the chat template. |
| 1110 | |
| 1111 | Args: |
| 1112 | message: representation of a message to append. |
| 1113 | class="st">""" |
| 1114 | self.messages.append(_convert_to_message(message)) |
| 1115 | |
| 1116 | def extend(self, messages: Sequence[MessageLikeRepresentation]) -> None: |
| 1117 | class="st">""class="st">"Extend the chat template with a sequence of messages."class="st">"" |