@@ -230,22 +230,22 @@ class AIScope(
230
230
* @param prompt a [PromptTemplate] describing the images you want to generate.
231
231
* @param variables a map of variables to be replaced in the [prompt].
232
232
* @param numberImages number of images to generate.
233
- * @param imageSize size of the images to generate.
233
+ * @param size the size of the images to generate.
234
234
*/
235
235
@AiDsl
236
236
suspend fun images (
237
237
prompt : PromptTemplate <String >,
238
238
variables : Map <String , String >,
239
239
numberImages : Int = 1,
240
- imageSize : String = "1024x1024"
240
+ size : String = "1024x1024"
241
241
): ImagesGenerationResponse =
242
242
with (
243
243
ImageGenerationAgent (
244
244
llm = openAIClient,
245
245
template = prompt,
246
246
context = context,
247
247
numberImages = numberImages,
248
- imageSize = imageSize
248
+ size = size
249
249
)
250
250
) {
251
251
call(variables)
@@ -257,30 +257,29 @@ class AIScope(
257
257
*
258
258
* @param prompt a [PromptTemplate] describing the images you want to generate.
259
259
* @param numberImages number of images to generate.
260
- * @param imageSize size of the images to generate.
260
+ * @param size the size of the images to generate.
261
261
*/
262
262
@AiDsl
263
263
suspend fun images (
264
264
prompt : String ,
265
265
numberImages : Int = 1,
266
- imageSize : String = "1024x1024"
267
- ): ImagesGenerationResponse = images(PromptTemplate (prompt), emptyMap(), numberImages, imageSize )
266
+ size : String = "1024x1024"
267
+ ): ImagesGenerationResponse = images(PromptTemplate (prompt), emptyMap(), numberImages, size )
268
268
269
269
/* *
270
270
* Run a [prompt] describes the images you want to generate within the context of [AIScope].
271
271
* Produces a [ImagesGenerationResponse] which then gets serialized to [A] through [prompt].
272
272
*
273
273
* @param prompt a [PromptTemplate] describing the images you want to generate.
274
- * @param n number of images to generate.
275
- * @param imageSize size of the images to generate.
274
+ * @param size the size of the images to generate.
276
275
*/
277
276
@AiDsl
278
277
suspend inline fun <reified A > Raise<AIError>.image (
279
278
prompt : String ,
280
- imageSize : String = "1024x1024",
279
+ size : String = "1024x1024",
281
280
llmModel : LLMModel = LLMModel .GPT_3_5_TURBO
282
281
): A {
283
- val imageResponse = images(prompt, 1 , imageSize )
282
+ val imageResponse = images(prompt, 1 , size )
284
283
val url = imageResponse.data.firstOrNull() ? : raise(AIError .NoResponse )
285
284
return either {
286
285
PromptTemplate (
0 commit comments