Unverified Commit 78c1d644 authored by Lianmin Zheng's avatar Lianmin Zheng Committed by GitHub
Browse files

Fix finish reason (#2013)

parent 027e6524
...@@ -107,12 +107,14 @@ class FINISH_LENGTH(BaseFinishReason): ...@@ -107,12 +107,14 @@ class FINISH_LENGTH(BaseFinishReason):
class FINISH_ABORT(BaseFinishReason): class FINISH_ABORT(BaseFinishReason):
def __init__(self): def __init__(self, message="Unknown error"):
super().__init__(is_error=True) super().__init__(is_error=True)
self.message = message
def to_json(self): def to_json(self):
return { return {
"type": "abort", "type": "abort",
"message": self.message,
} }
......
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