Fix finish reason (#2013)

This commit is contained in:
Lianmin Zheng
2024-11-11 23:24:41 -08:00
committed by GitHub
parent 027e65248f
commit 78c1d6445f

View File

@@ -107,12 +107,14 @@ class FINISH_LENGTH(BaseFinishReason):
class FINISH_ABORT(BaseFinishReason):
def __init__(self):
def __init__(self, message="Unknown error"):
super().__init__(is_error=True)
self.message = message
def to_json(self):
return {
"type": "abort",
"message": self.message,
}