Skip to content

Commit 1bb0fa7

Browse files
committed
Update DTOs
1 parent cc93f14 commit 1bb0fa7

File tree

4 files changed

+226
-285
lines changed

4 files changed

+226
-285
lines changed

AiServer.ServiceModel/Generations.cs

Lines changed: 39 additions & 105 deletions
Original file line numberDiff line numberDiff line change
@@ -14,28 +14,19 @@ public class ActiveMediaModels : IGet, IReturn<StringsResponse> {}
1414
[Description("Transcribe audio content to text")]
1515
public class SpeechToText : IGeneration, IReturn<GenerationResponse>
1616
{
17-
[ApiMember(Description = "The audio stream containing the speech to be transcribed", ParameterType = "body")]
17+
[ApiMember(Description = "The audio stream containing the speech to be transcribed")]
1818
[Description("The audio stream containing the speech to be transcribed")]
1919
[Required]
2020
[Input(Type = "file")]
2121
public Stream Speech { get; set; }
2222

23-
[ApiMember(Description = "Optional client-provided identifier for the request", ParameterType = "query")]
23+
[ApiMember(Description = "Optional client-provided identifier for the request")]
2424
[Description("Optional client-provided identifier for the request")]
2525
public string? RefId { get; set; }
2626

27-
[ApiMember(Description = "Optional queue or topic to reply to", ParameterType = "query")]
28-
[Description("Optional queue or topic to reply to")]
29-
public string? ReplyTo { get; set; }
30-
31-
[ApiMember(Description = "Tag to identify the request", ParameterType = "query")]
27+
[ApiMember(Description = "Tag to identify the request")]
3228
[Description("Tag to identify the request")]
3329
public string? Tag { get; set; }
34-
35-
[ApiMember(Description = "Optional state to associate with the request", ParameterType = "query")]
36-
[Description("Optional state to associate with the request")]
37-
[Input(Type = "hidden")]
38-
public string? State { get; set; }
3930
}
4031

4132
[ValidateApiKey]
@@ -44,32 +35,23 @@ public class SpeechToText : IGeneration, IReturn<GenerationResponse>
4435
[Description("Generate speech audio from text input")]
4536
public class TextToSpeech : IGeneration, IReturn<GenerationResponse>
4637
{
47-
[ApiMember(Description = "The text to be converted to speech", ParameterType = "body")]
38+
[ApiMember(Description = "The text to be converted to speech")]
4839
[Description("The text to be converted to speech")]
4940
[Required]
5041
public string Text { get; set; }
5142

52-
[ApiMember(Description = "Optional seed for reproducible results in speech generation", ParameterType = "query")]
43+
[ApiMember(Description = "Optional seed for reproducible results in speech generation")]
5344
[Description("Optional seed for reproducible results in speech generation")]
5445
[Range(0, int.MaxValue)]
5546
public int? Seed { get; set; }
5647

57-
[ApiMember(Description = "Optional client-provided identifier for the request", ParameterType = "query")]
48+
[ApiMember(Description = "Optional client-provided identifier for the request")]
5849
[Description("Optional client-provided identifier for the request")]
5950
public string? RefId { get; set; }
6051

61-
[ApiMember(Description = "Optional queue or topic to reply to", ParameterType = "query")]
62-
[Description("Optional queue or topic to reply to")]
63-
public string? ReplyTo { get; set; }
64-
65-
[ApiMember(Description = "Tag to identify the request", ParameterType = "query")]
52+
[ApiMember(Description = "Tag to identify the request")]
6653
[Description("Tag to identify the request")]
6754
public string? Tag { get; set; }
68-
69-
[ApiMember(Description = "Optional state to associate with the request", ParameterType = "query")]
70-
[Description("Optional state to associate with the request")]
71-
[Input(Type = "hidden")]
72-
public string? State { get; set; }
7355
}
7456

7557
[ValidateApiKey]
@@ -78,57 +60,48 @@ public class TextToSpeech : IGeneration, IReturn<GenerationResponse>
7860
[Description("Create an image based on a text prompt")]
7961
public class TextToImage : IGeneration, IReturn<GenerationResponse>
8062
{
81-
[ApiMember(Description = "The main prompt describing the desired image", ParameterType = "body")]
63+
[ApiMember(Description = "The main prompt describing the desired image")]
8264
[Description("The main prompt describing the desired image")]
8365
[ValidateNotEmpty]
8466
[Input(Type = "textarea")]
8567
public string PositivePrompt { get; set; }
8668

87-
[ApiMember(Description = "Optional prompt specifying what should not be in the image", ParameterType = "body")]
69+
[ApiMember(Description = "Optional prompt specifying what should not be in the image")]
8870
[Description("Optional prompt specifying what should not be in the image")]
8971
[Input(Type = "textarea")]
9072
public string? NegativePrompt { get; set; }
9173

92-
[ApiMember(Description = "Desired width of the generated image", ParameterType = "query")]
74+
[ApiMember(Description = "Desired width of the generated image")]
9375
[Description("Desired width of the generated image")]
9476
[Range(64, 2048)]
9577
public int? Width { get; set; }
9678

97-
[ApiMember(Description = "Desired height of the generated image", ParameterType = "query")]
79+
[ApiMember(Description = "Desired height of the generated image")]
9880
[Description("Desired height of the generated image")]
9981
[Range(64, 2048)]
10082
public int? Height { get; set; }
10183

102-
[ApiMember(Description = "Number of images to generate in a single batch", ParameterType = "query")]
84+
[ApiMember(Description = "Number of images to generate in a single batch")]
10385
[Description("Number of images to generate in a single batch")]
10486
[Range(1, 10)]
10587
public int? BatchSize { get; set; }
10688

107-
[ApiMember(Description = "The AI model to use for image generation", ParameterType = "query")]
89+
[ApiMember(Description = "The AI model to use for image generation")]
10890
[Description("The AI model to use for image generation")]
10991
public string? Model { get; set; }
11092

111-
[ApiMember(Description = "Optional seed for reproducible results", ParameterType = "query")]
93+
[ApiMember(Description = "Optional seed for reproducible results")]
11294
[Description("Optional seed for reproducible results")]
11395
[Range(0, int.MaxValue)]
11496
public int? Seed { get; set; }
11597

116-
[ApiMember(Description = "Optional client-provided identifier for the request", ParameterType = "query")]
98+
[ApiMember(Description = "Optional client-provided identifier for the request")]
11799
[Description("Optional client-provided identifier for the request")]
118100
public string? RefId { get; set; }
119101

120-
[ApiMember(Description = "Optional queue or topic to reply to", ParameterType = "query")]
121-
[Description("Optional queue or topic to reply to")]
122-
public string? ReplyTo { get; set; }
123-
124-
[ApiMember(Description = "Tag to identify the request", ParameterType = "query")]
102+
[ApiMember(Description = "Tag to identify the request")]
125103
[Description("Tag to identify the request")]
126104
public string? Tag { get; set; }
127-
128-
[ApiMember(Description = "Optional state to associate with the request", ParameterType = "query")]
129-
[Description("Optional state to associate with the request")]
130-
[Input(Type = "hidden")]
131-
public string? State { get; set; }
132105
}
133106

134107
[ValidateApiKey]
@@ -137,54 +110,45 @@ public class TextToImage : IGeneration, IReturn<GenerationResponse>
137110
[Description("Create a new image based on an existing image and a text prompt")]
138111
public class ImageToImage : IGeneration, IReturn<GenerationResponse>
139112
{
140-
[ApiMember(Description = "The image to use as input", ParameterType = "body")]
113+
[ApiMember(Description = "The image to use as input")]
141114
[Description("The image to use as input")]
142115
[Required]
143116
[Input(Type = "file")]
144117
public Stream Image { get; set; }
145118

146-
[ApiMember(Description = "Prompt describing the desired output", ParameterType = "body")]
119+
[ApiMember(Description = "Prompt describing the desired output")]
147120
[Description("Prompt describing the desired output")]
148121
[ValidateNotEmpty]
149122
[Input(Type = "textarea")]
150123
public string PositivePrompt { get; set; }
151124

152-
[ApiMember(Description = "Negative prompt describing what should not be in the image", ParameterType = "body")]
125+
[ApiMember(Description = "Negative prompt describing what should not be in the image")]
153126
[Description("Negative prompt describing what should not be in the image")]
154127
[Input(Type = "textarea")]
155128
public string? NegativePrompt { get; set; }
156129

157-
[ApiMember(Description = "Optional specific amount of denoise to apply", ParameterType = "query")]
130+
[ApiMember(Description = "Optional specific amount of denoise to apply")]
158131
[Description("Optional specific amount of denoise to apply")]
159132
[Range(0, 1)]
160133
public float? Denoise { get; set; }
161134

162-
[ApiMember(Description = "Number of images to generate in a single batch", ParameterType = "query")]
135+
[ApiMember(Description = "Number of images to generate in a single batch")]
163136
[Description("Number of images to generate in a single batch")]
164137
[Range(1, 10)]
165138
public int? BatchSize { get; set; }
166139

167-
[ApiMember(Description = "Optional seed for reproducible results in image generation", ParameterType = "query")]
140+
[ApiMember(Description = "Optional seed for reproducible results in image generation")]
168141
[Description("Optional seed for reproducible results in image generation")]
169142
[Range(0, int.MaxValue)]
170143
public int? Seed { get; set; }
171144

172-
[ApiMember(Description = "Optional client-provided identifier for the request", ParameterType = "query")]
145+
[ApiMember(Description = "Optional client-provided identifier for the request")]
173146
[Description("Optional client-provided identifier for the request")]
174147
public string? RefId { get; set; }
175148

176-
[ApiMember(Description = "Optional queue or topic to reply to", ParameterType = "query")]
177-
[Description("Optional queue or topic to reply to")]
178-
public string? ReplyTo { get; set; }
179-
180-
[ApiMember(Description = "Tag to identify the request", ParameterType = "query")]
149+
[ApiMember(Description = "Tag to identify the request")]
181150
[Description("Tag to identify the request")]
182151
public string? Tag { get; set; }
183-
184-
[ApiMember(Description = "Optional state to associate with the request", ParameterType = "query")]
185-
[Description("Optional state to associate with the request")]
186-
[Input(Type = "hidden")]
187-
public string? State { get; set; }
188152
}
189153

190154
[ValidateApiKey]
@@ -193,33 +157,24 @@ public class ImageToImage : IGeneration, IReturn<GenerationResponse>
193157
[Description("Increase the resolution and quality of an input image")]
194158
public class ImageUpscale : IGeneration, IReturn<GenerationResponse>
195159
{
196-
[ApiMember(Description = "The image to upscale", ParameterType = "body")]
160+
[ApiMember(Description = "The image to upscale")]
197161
[Description("The image to upscale")]
198162
[Required]
199163
[Input(Type = "file")]
200164
public Stream Image { get; set; }
201165

202-
[ApiMember(Description = "Optional seed for reproducible results in image generation", ParameterType = "query")]
166+
[ApiMember(Description = "Optional seed for reproducible results in image generation")]
203167
[Description("Optional seed for reproducible results in image generation")]
204168
[Range(0, int.MaxValue)]
205169
public int? Seed { get; set; }
206170

207-
[ApiMember(Description = "Optional client-provided identifier for the request", ParameterType = "query")]
171+
[ApiMember(Description = "Optional client-provided identifier for the request")]
208172
[Description("Optional client-provided identifier for the request")]
209173
public string? RefId { get; set; }
210174

211-
[ApiMember(Description = "Optional queue or topic to reply to", ParameterType = "query")]
212-
[Description("Optional queue or topic to reply to")]
213-
public string? ReplyTo { get; set; }
214-
215-
[ApiMember(Description = "Tag to identify the request", ParameterType = "query")]
175+
[ApiMember(Description = "Tag to identify the request")]
216176
[Description("Tag to identify the request")]
217177
public string? Tag { get; set; }
218-
219-
[ApiMember(Description = "Optional state to associate with the request", ParameterType = "query")]
220-
[Description("Optional state to associate with the request")]
221-
[Input(Type = "hidden")]
222-
public string? State { get; set; }
223178
}
224179

225180
[ValidateApiKey]
@@ -228,55 +183,46 @@ public class ImageUpscale : IGeneration, IReturn<GenerationResponse>
228183
[Description("Create a new image by applying a mask to an existing image and generating content for the masked area")]
229184
public class ImageWithMask : IGeneration, IReturn<GenerationResponse>
230185
{
231-
[ApiMember(Description = "Prompt describing the desired output in the masked area", ParameterType = "body")]
186+
[ApiMember(Description = "Prompt describing the desired output in the masked area")]
232187
[Description("Prompt describing the desired output in the masked area")]
233188
[ValidateNotEmpty]
234189
[Input(Type = "textarea")]
235190
public string PositivePrompt { get; set; }
236191

237-
[ApiMember(Description = "Negative prompt describing what should not be in the masked area", ParameterType = "body")]
192+
[ApiMember(Description = "Negative prompt describing what should not be in the masked area")]
238193
[Description("Negative prompt describing what should not be in the masked area")]
239194
[Input(Type = "textarea")]
240195
public string? NegativePrompt { get; set; }
241196

242-
[ApiMember(Description = "The image to use as input", ParameterType = "body")]
197+
[ApiMember(Description = "The image to use as input")]
243198
[Description("The image to use as input")]
244199
[Required]
245200
[Input(Type = "file")]
246201
public Stream Image { get; set; }
247202

248-
[ApiMember(Description = "The mask to use as input", ParameterType = "body")]
203+
[ApiMember(Description = "The mask to use as input")]
249204
[Description("The mask to use as input")]
250205
[Required]
251206
[Input(Type = "file")]
252207
public Stream Mask { get; set; }
253208

254-
[ApiMember(Description = "Optional specific amount of denoise to apply", ParameterType = "query")]
209+
[ApiMember(Description = "Optional specific amount of denoise to apply")]
255210
[Description("Optional specific amount of denoise to apply")]
256211
[Range(0, 1)]
257212
public float? Denoise { get; set; }
258213

259-
[ApiMember(Description = "Optional seed for reproducible results in image generation", ParameterType = "query")]
214+
[ApiMember(Description = "Optional seed for reproducible results in image generation")]
260215
[Description("Optional seed for reproducible results in image generation")]
261216
[Range(0, int.MaxValue)]
262217
public int? Seed { get; set; }
263218

264-
[ApiMember(Description = "Optional client-provided identifier for the request", ParameterType = "query")]
219+
[ApiMember(Description = "Optional client-provided identifier for the request")]
265220
[Description("Optional client-provided identifier for the request")]
266221
public string? RefId { get; set; }
267222

268-
[ApiMember(Description = "Optional queue or topic to reply to", ParameterType = "query")]
269-
[Description("Optional queue or topic to reply to")]
270-
public string? ReplyTo { get; set; }
271-
272-
[ApiMember(Description = "Tag to identify the request", ParameterType = "query")]
223+
[ApiMember(Description = "Tag to identify the request")]
273224
[Description("Tag to identify the request")]
274225
public string? Tag { get; set; }
275-
276-
[ApiMember(Description = "Optional state to associate with the request", ParameterType = "query")]
277-
[Description("Optional state to associate with the request")]
278-
[Input(Type = "hidden")]
279-
public string? State { get; set; }
280226
}
281227

282228
[ValidateApiKey]
@@ -285,28 +231,19 @@ public class ImageWithMask : IGeneration, IReturn<GenerationResponse>
285231
[Description("Extract text content from an image")]
286232
public class ImageToText : IGeneration, IReturn<GenerationResponse>
287233
{
288-
[ApiMember(Description = "The image to convert to text", ParameterType = "body")]
234+
[ApiMember(Description = "The image to convert to text")]
289235
[Description("The image to convert to text")]
290236
[Required]
291237
[Input(Type = "file")]
292238
public Stream Image { get; set; }
293239

294-
[ApiMember(Description = "Optional client-provided identifier for the request", ParameterType = "query")]
240+
[ApiMember(Description = "Optional client-provided identifier for the request")]
295241
[Description("Optional client-provided identifier for the request")]
296242
public string? RefId { get; set; }
297243

298-
[ApiMember(Description = "Optional queue or topic to reply to", ParameterType = "query")]
299-
[Description("Optional queue or topic to reply to")]
300-
public string? ReplyTo { get; set; }
301-
302-
[ApiMember(Description = "Tag to identify the request", ParameterType = "query")]
244+
[ApiMember(Description = "Tag to identify the request")]
303245
[Description("Tag to identify the request")]
304246
public string? Tag { get; set; }
305-
306-
[ApiMember(Description = "Optional state to associate with the request", ParameterType = "query")]
307-
[Description("Optional state to associate with the request")]
308-
[Input(Type = "hidden")]
309-
public string? State { get; set; }
310247
}
311248

312249
[Description("Response object for generation requests")]
@@ -328,8 +265,5 @@ public class GenerationResponse
328265
public interface IGeneration
329266
{
330267
string? RefId { get; set; }
331-
string? ReplyTo { get; set; }
332-
string? State { get; set; }
333-
334268
string? Tag { get; set; }
335269
}

0 commit comments

Comments
 (0)