API: Upgrade config declarations

Some were using the old unwrap methods.

Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
kingbri
2024-09-17 00:42:39 -04:00
parent 7fe0dbd62f
commit daa57ceada
2 changed files with 3 additions and 7 deletions

View File

@@ -118,11 +118,7 @@ class EmbeddingModelLoadRequest(BaseModel):
name: str
# Set default from the config
embeddings_device: Optional[str] = Field(
default_factory=lambda: unwrap(
config.embeddings.get("embeddings_device"), "cpu"
)
)
embeddings_device: Optional[str] = Field(config.embeddings.embeddings_device)
class ModelLoadResponse(BaseModel):