Skip to content
This repository has been archived by the owner on Feb 15, 2025. It is now read-only.

Commit

Permalink
test(api,backend): refactor config.py to be testable
Browse files Browse the repository at this point in the history
  • Loading branch information
jamestexas committed Aug 7, 2024
1 parent ad3ddea commit 9727d5b
Show file tree
Hide file tree
Showing 7 changed files with 586 additions and 61 deletions.
5 changes: 4 additions & 1 deletion src/leapfrogai_api/backend/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
DEFAULT_MAX_COMPLETION_TOKENS = 4096
DEFAULT_MAX_PROMPT_TOKENS = 4096


##########
# GENERIC
##########
Expand Down Expand Up @@ -67,6 +66,10 @@ class ModelMetadataResponse(BaseModel):
default=None,
description="Model precision (e.g., 'float16', 'float32')",
)
capabilities: str | None = Field(
default=None,
description="Model capabilities (e.g., 'embeddings' or 'chat')",
)


class ModelResponseModel(BaseModel):
Expand Down
1 change: 1 addition & 0 deletions src/leapfrogai_api/routers/openai/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ async def models(
type=model_data.metadata.type,
dimensions=model_data.metadata.dimensions,
precision=model_data.metadata.precision,
capabilities=model_data.metadata.capabilities,
)
m = ModelResponseModel(
id=model_name,
Expand Down
Loading

0 comments on commit 9727d5b

Please sign in to comment.