API: Add template switching and unload endpoints

Templates can be switched and unloaded without reloading the entire
model.

Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
kingbri
2024-01-22 23:13:52 -05:00
committed by Brian Dashore
parent 6c30f24c83
commit de0ba7214c
4 changed files with 61 additions and 25 deletions

View File

@@ -7,3 +7,9 @@ class TemplateList(BaseModel):
object: str = "list"
data: List[str] = Field(default_factory=list)
class TemplateSwitchRequest(BaseModel):
"""Request to switch a template."""
name: str