@@ -1290,6 +1290,70 @@ public CompletableFuture<TaskUpdateResponse> enableTaskV1Async(@Nonnull String t
1290
1290
return this .enableTaskV1Async (taskID , null );
1291
1291
}
1292
1292
1293
+ /**
1294
+ * Generates code for the selected model based on the given prompt.
1295
+ *
1296
+ * @param generateTransformationCodePayload (required)
1297
+ * @param requestOptions The requestOptions to send along with the query, they will be merged with
1298
+ * the transporter requestOptions.
1299
+ * @throws AlgoliaRuntimeException If it fails to process the API call
1300
+ */
1301
+ public GenerateTransformationCodeResponse generateTransformationCode (
1302
+ @ Nonnull GenerateTransformationCodePayload generateTransformationCodePayload ,
1303
+ RequestOptions requestOptions
1304
+ ) throws AlgoliaRuntimeException {
1305
+ return LaunderThrowable .await (generateTransformationCodeAsync (generateTransformationCodePayload , requestOptions ));
1306
+ }
1307
+
1308
+ /**
1309
+ * Generates code for the selected model based on the given prompt.
1310
+ *
1311
+ * @param generateTransformationCodePayload (required)
1312
+ * @throws AlgoliaRuntimeException If it fails to process the API call
1313
+ */
1314
+ public GenerateTransformationCodeResponse generateTransformationCode (
1315
+ @ Nonnull GenerateTransformationCodePayload generateTransformationCodePayload
1316
+ ) throws AlgoliaRuntimeException {
1317
+ return this .generateTransformationCode (generateTransformationCodePayload , null );
1318
+ }
1319
+
1320
+ /**
1321
+ * (asynchronously) Generates code for the selected model based on the given prompt.
1322
+ *
1323
+ * @param generateTransformationCodePayload (required)
1324
+ * @param requestOptions The requestOptions to send along with the query, they will be merged with
1325
+ * the transporter requestOptions.
1326
+ * @throws AlgoliaRuntimeException If it fails to process the API call
1327
+ */
1328
+ public CompletableFuture <GenerateTransformationCodeResponse > generateTransformationCodeAsync (
1329
+ @ Nonnull GenerateTransformationCodePayload generateTransformationCodePayload ,
1330
+ RequestOptions requestOptions
1331
+ ) throws AlgoliaRuntimeException {
1332
+ Parameters .requireNonNull (
1333
+ generateTransformationCodePayload ,
1334
+ "Parameter `generateTransformationCodePayload` is required when calling" + " `generateTransformationCode`."
1335
+ );
1336
+
1337
+ HttpRequest request = HttpRequest .builder ()
1338
+ .setPath ("/1/transformations/models" )
1339
+ .setMethod ("POST" )
1340
+ .setBody (generateTransformationCodePayload )
1341
+ .build ();
1342
+ return executeAsync (request , requestOptions , new TypeReference <GenerateTransformationCodeResponse >() {});
1343
+ }
1344
+
1345
+ /**
1346
+ * (asynchronously) Generates code for the selected model based on the given prompt.
1347
+ *
1348
+ * @param generateTransformationCodePayload (required)
1349
+ * @throws AlgoliaRuntimeException If it fails to process the API call
1350
+ */
1351
+ public CompletableFuture <GenerateTransformationCodeResponse > generateTransformationCodeAsync (
1352
+ @ Nonnull GenerateTransformationCodePayload generateTransformationCodePayload
1353
+ ) throws AlgoliaRuntimeException {
1354
+ return this .generateTransformationCodeAsync (generateTransformationCodePayload , null );
1355
+ }
1356
+
1293
1357
/**
1294
1358
* Retrieves an authentication resource by its ID.
1295
1359
*
@@ -2859,7 +2923,7 @@ public TransformationModels listTransformationModels() throws AlgoliaRuntimeExce
2859
2923
*/
2860
2924
public CompletableFuture <TransformationModels > listTransformationModelsAsync (RequestOptions requestOptions )
2861
2925
throws AlgoliaRuntimeException {
2862
- HttpRequest request = HttpRequest .builder ().setPath ("/1/transformations/copilot " ).setMethod ("GET" ).build ();
2926
+ HttpRequest request = HttpRequest .builder ().setPath ("/1/transformations/models " ).setMethod ("GET" ).build ();
2863
2927
2864
2928
return executeAsync (request , requestOptions , new TypeReference <TransformationModels >() {});
2865
2929
}
0 commit comments