mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-10-23 01:49:58 +00:00
feat: Run AWEL flow in CLI (#1341)
This commit is contained in:
@@ -161,6 +161,7 @@ class ModelOutput:
|
||||
error_code: int
|
||||
"""The error code of the model inference. If the model inference is successful,
|
||||
the error code is 0."""
|
||||
incremental: bool = False
|
||||
model_context: Optional[Dict] = None
|
||||
finish_reason: Optional[str] = None
|
||||
usage: Optional[Dict[str, Any]] = None
|
||||
@@ -171,6 +172,11 @@ class ModelOutput:
|
||||
"""Convert the model output to dict."""
|
||||
return asdict(self)
|
||||
|
||||
@property
|
||||
def success(self) -> bool:
|
||||
"""Check if the model inference is successful."""
|
||||
return self.error_code == 0
|
||||
|
||||
|
||||
_ModelMessageType = Union[List[ModelMessage], List[Dict[str, Any]]]
|
||||
|
||||
|
Reference in New Issue
Block a user