-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstructures.go
More file actions
58 lines (49 loc) · 1.65 KB
/
structures.go
File metadata and controls
58 lines (49 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
package fusionbrain_api
// Модель
type ModelItem struct {
Id int `json:"id"`
Name string `json:"name"`
Version float64 `json:"version"`
Type string `json:"type"`
}
// Ответ со списком моделей
type ModelsResponse []ModelItem
// Текстовый промпт для генерации
type GenerateParams struct {
Query string `json:"query"`
}
// Запрос генерации
type GenerateRequest struct {
Type string `json:"type"`
Style string `json:"style,omitempty"`
Width int `json:"width,omitempty"`
Height int `json:"height,omitempty"`
NumImages int `json:"num_images,omitempty"`
NegativePromptUnclip string `json:"negativePromptUnclip,omitempty"`
GenerateParams GenerateParams `json:"generateParams"`
}
// Ответ на генерацию
type GenerateResponse struct {
Uuid string `json:"uuid"`
Status string `json:"status"`
StatusTime int `json:"status_time,omitempty"`
Images []string `json:"images,omitempty"`
ErrorDescription string `json:"errorDescription,omitempty"`
Censored bool `json:"censored,omitempty"`
}
// Стиль
type StyleItem struct {
Name string `json:"name"`
Title string `json:"title"`
TitleEn string `json:"titleEn"`
Image string `json:"image"`
}
// Список стилей
type StyleResponse []StyleItem
// Доступность
type AvailabilityResponse struct {
ModelStatus string `json:"model_status"`
}
type StatusResponse struct {
Images []string `json:"images"`
}