Fix finish reason (#2013)

This commit is contained in:
Lianmin Zheng authored and GitHub committed 2024-11-11 23:24:41 -08:00
1 parent 027e65248f
commit 78c1d6445f
1 file changed
+3 -1
+3 -1
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,
}