Implement portrait prompt API and UI enhancements. Added a new endpoint to fetch portrait prompts, updated the client to handle prompt display, and improved localization for prompt-related text. Enhanced styling for prompt elements in the UI.
This commit is contained in:
@@ -376,6 +376,23 @@ at GET. SwarmUI is not configured when `SwarmUi:BaseUrl` is empty — `503` `swa
|
||||
Swarm errors are `502` `swarmui-unavailable`; a slow backend is `504` `swarmui-timeout`. Files
|
||||
land under `saves/{id}.portraits/` and survive until the school is deleted.
|
||||
|
||||
### `GET /api/schools/{id}/people/{personId}/portrait/prompt`
|
||||
|
||||
Returns the positive and negative prompts SwarmUI would receive, without generating an image.
|
||||
Same `kind` query as GET portrait. For `kind=custom`, optional query `promptExtra` is appended to
|
||||
the base prompt; when omitted, the last saved custom prompt is used if one exists. Unknown school
|
||||
is `404` `unknown-school`; unknown person is `404` `unknown-person`. Invalid `kind` is
|
||||
`400` `invalid-query`; custom without a usable prompt is `400` `invalid-body`.
|
||||
|
||||
```json
|
||||
{
|
||||
"kind": "avatar",
|
||||
"positive": "cinematic photo, …, close up, head and shoulders portrait, …, age 12, …",
|
||||
"negative": "(low quality, worst quality:1.4), …",
|
||||
"promptExtra": null
|
||||
}
|
||||
```
|
||||
|
||||
`GET /api/status` includes `swarmUiConfigured` and `swarmUiConnected` (`null` when not configured)
|
||||
so the client can disable generate buttons and show reachability without trying POST first.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user