mirror of
https://github.com/theroyallab/tabbyAPI.git
synced 2026-04-30 03:01:44 +00:00
Tree: Add generation logging support
Generations can be logged in the console along with sampling parameters if the user enables it in config. Metrics are always logged at the end of each prompt. In addition, the model endpoint tells the user if they're being logged or not for transparancy purposes. Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
from pydantic import BaseModel, Field
|
||||
from time import time
|
||||
from typing import List, Optional
|
||||
from gen_logging import LogConfig
|
||||
|
||||
class ModelCardParameters(BaseModel):
|
||||
max_seq_len: Optional[int] = 4096
|
||||
@@ -14,6 +15,7 @@ class ModelCard(BaseModel):
|
||||
object: str = "model"
|
||||
created: int = Field(default_factory=lambda: int(time()))
|
||||
owned_by: str = "tabbyAPI"
|
||||
logging: Optional[LogConfig] = None
|
||||
parameters: Optional[ModelCardParameters] = None
|
||||
|
||||
class ModelList(BaseModel):
|
||||
|
||||
Reference in New Issue
Block a user