mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-07-30 15:21:02 +00:00
feat(model): New metrics param to model API
This commit is contained in:
parent
1240352e54
commit
b45360441d
@ -54,6 +54,8 @@ class ModelOutput:
|
||||
model_context: Dict = None
|
||||
finish_reason: str = None
|
||||
usage: Dict[str, Any] = None
|
||||
metrics: Dict[str, Any] = None
|
||||
"""Some metrics for model inference"""
|
||||
|
||||
def to_dict(self) -> Dict:
|
||||
return asdict(self)
|
||||
|
@ -21,6 +21,8 @@ class PromptRequest(BaseModel):
|
||||
context_len: int = None
|
||||
echo: bool = True
|
||||
span_id: str = None
|
||||
metrics: bool = False
|
||||
"""Whether to return metrics of inference"""
|
||||
|
||||
|
||||
class EmbeddingsRequest(BaseModel):
|
||||
|
Loading…
Reference in New Issue
Block a user