Skip to content

Commit

Permalink
fixing Usage convention
Browse files Browse the repository at this point in the history
  • Loading branch information
gphorvath committed Apr 29, 2024
1 parent cf7bffb commit 3ec652c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/leapfrogai_api/backend/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@


class Usage(BaseModel):
"""Usage object."""

prompt_tokens: int
completion_tokens: int | None = None
total_tokens: int
Expand All @@ -22,7 +24,7 @@ class Usage(BaseModel):


class ModelResponseModel(BaseModel):
"""Model object for model response."""
"""Response object for models."""

id: str
object: str = "model"
Expand Down Expand Up @@ -69,7 +71,7 @@ class CompletionResponse(BaseModel):
created: int = 0
model: str = ""
choices: list[CompletionChoice]
usage: Usage
usage: Usage | None = None


##########
Expand Down

0 comments on commit 3ec652c

Please sign in to comment.