swarm-controller: GET /api/models lists the model names the swarm already knows
This commit is contained in:
parent
36a8b4fa1f
commit
ef817ed5a0
1 changed files with 136 additions and 2 deletions
|
|
@ -51,6 +51,17 @@ pub struct InferenceSettings {
|
|||
pub fresh_session_percent: Option<u8>,
|
||||
}
|
||||
|
||||
/// What `GET /api/models` answers: the model names the swarm already knows,
|
||||
/// for a form to offer.
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
#[cfg_attr(feature = "schema", derive(utoipa::ToSchema))]
|
||||
pub struct KnownModels {
|
||||
/// Every distinct model in any agent's stored inference settings (its model
|
||||
/// and its subagent models) or reported running, sorted. Empty on a swarm
|
||||
/// where no agent has either.
|
||||
pub models: Vec<String>,
|
||||
}
|
||||
|
||||
/// What `GET` answers for one agent.
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
#[cfg_attr(feature = "schema", derive(utoipa::ToSchema))]
|
||||
|
|
|
|||
Loading…
Reference in a new issue