"src/vscode:/vscode.git/clone" did not exist on "d5e6af27bcf58111fcd75c376e0e744d327a1586"
Commit 52df595f authored by Konrad's avatar Konrad
Browse files

apply chat template method fix

parent f8771d26
...@@ -114,7 +114,6 @@ class LM(abc.ABC): ...@@ -114,7 +114,6 @@ class LM(abc.ABC):
""" """
pass pass
@abc.abstractmethod
def apply_chat_template(self, chat_history: list[dict[str, str]]) -> str: def apply_chat_template(self, chat_history: list[dict[str, str]]) -> str:
""" """
Defines how to transform few-shot examples provided as chat history into a format that can be used as input to the LM. Defines how to transform few-shot examples provided as chat history into a format that can be used as input to the LM.
...@@ -125,7 +124,9 @@ class LM(abc.ABC): ...@@ -125,7 +124,9 @@ class LM(abc.ABC):
:return: str :return: str
A string representing the chat history in a format that can be used as input to the LM. A string representing the chat history in a format that can be used as input to the LM.
""" """
pass raise NotImplementedError(
"To use this model with chat templates, please implement the 'apply_chat_template' method."
)
@classmethod @classmethod
def create_from_arg_string( def create_from_arg_string(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment