mirror of
https://github.com/theroyallab/tabbyAPI.git
synced 2026-03-15 00:07:28 +00:00
API: Upgrade config declarations
Some were using the old unwrap methods. Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user