mirror of
https://github.com/hiyouga/LlamaFactory.git
synced 2026-02-02 08:33:38 +00:00
[misc] fix constants (#9008)
This commit is contained in:
@@ -98,7 +98,7 @@ class FunctionFormatter(StringFormatter):
|
||||
def apply(self, **kwargs) -> SLOTS:
|
||||
content: str = kwargs.pop("content")
|
||||
thought_words, thought = kwargs.pop("thought_words", None), None
|
||||
if thought_words and len(thought_words)== 2:
|
||||
if thought_words and len(thought_words) == 2:
|
||||
regex = re.compile(rf"{re.escape(thought_words[0])}(.*?){re.escape(thought_words[1])}", re.DOTALL)
|
||||
thought = re.search(regex, content)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user