@@ -515,6 +515,30 @@ public interface IIngestionClient
515
515
/// <returns>TaskUpdateResponse</returns>
516
516
TaskUpdateResponse EnableTaskV1 ( string taskID , RequestOptions options = null , CancellationToken cancellationToken = default ) ;
517
517
518
+ /// <summary>
519
+ /// Generates code for the selected model based on the given prompt.
520
+ /// </summary>
521
+ /// <param name="generateTransformationCodePayload"></param>
522
+ /// <param name="options">Add extra http header or query parameters to Algolia.</param>
523
+ /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
524
+ /// <exception cref="ArgumentException">Thrown when arguments are not correct</exception>
525
+ /// <exception cref="Algolia.Search.Exceptions.AlgoliaApiException">Thrown when the API call was rejected by Algolia</exception>
526
+ /// <exception cref="Algolia.Search.Exceptions.AlgoliaUnreachableHostException">Thrown when the client failed to call the endpoint</exception>
527
+ /// <returns>Task of GenerateTransformationCodeResponse</returns>
528
+ Task < GenerateTransformationCodeResponse > GenerateTransformationCodeAsync ( GenerateTransformationCodePayload generateTransformationCodePayload , RequestOptions options = null , CancellationToken cancellationToken = default ) ;
529
+
530
+ /// <summary>
531
+ /// Generates code for the selected model based on the given prompt. (Synchronous version)
532
+ /// </summary>
533
+ /// <param name="generateTransformationCodePayload"></param>
534
+ /// <param name="options">Add extra http header or query parameters to Algolia.</param>
535
+ /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
536
+ /// <exception cref="ArgumentException">Thrown when arguments are not correct</exception>
537
+ /// <exception cref="Algolia.Search.Exceptions.AlgoliaApiException">Thrown when the API call was rejected by Algolia</exception>
538
+ /// <exception cref="Algolia.Search.Exceptions.AlgoliaUnreachableHostException">Thrown when the client failed to call the endpoint</exception>
539
+ /// <returns>GenerateTransformationCodeResponse</returns>
540
+ GenerateTransformationCodeResponse GenerateTransformationCode ( GenerateTransformationCodePayload generateTransformationCodePayload , RequestOptions options = null , CancellationToken cancellationToken = default ) ;
541
+
518
542
/// <summary>
519
543
/// Retrieves an authentication resource by its ID.
520
544
/// </summary>
@@ -2463,6 +2487,54 @@ public TaskUpdateResponse EnableTaskV1(string taskID, RequestOptions options = n
2463
2487
AsyncHelper . RunSync ( ( ) => EnableTaskV1Async ( taskID , options , cancellationToken ) ) ;
2464
2488
2465
2489
2490
+ /// <summary>
2491
+ /// Generates code for the selected model based on the given prompt.
2492
+ /// </summary>
2493
+ ///
2494
+ /// Required API Key ACLs:
2495
+ /// - addObject
2496
+ /// - deleteIndex
2497
+ /// - editSettings
2498
+ /// <param name="generateTransformationCodePayload"></param>
2499
+ /// <param name="options">Add extra http header or query parameters to Algolia.</param>
2500
+ /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
2501
+ /// <exception cref="ArgumentException">Thrown when arguments are not correct</exception>
2502
+ /// <exception cref="Algolia.Search.Exceptions.AlgoliaApiException">Thrown when the API call was rejected by Algolia</exception>
2503
+ /// <exception cref="Algolia.Search.Exceptions.AlgoliaUnreachableHostException">Thrown when the client failed to call the endpoint</exception>
2504
+ /// <returns>Task of GenerateTransformationCodeResponse</returns>
2505
+ public async Task < GenerateTransformationCodeResponse > GenerateTransformationCodeAsync ( GenerateTransformationCodePayload generateTransformationCodePayload , RequestOptions options = null , CancellationToken cancellationToken = default )
2506
+ {
2507
+
2508
+ if ( generateTransformationCodePayload == null )
2509
+ throw new ArgumentException ( "Parameter `generateTransformationCodePayload` is required when calling `GenerateTransformationCode`." ) ;
2510
+
2511
+ var requestOptions = new InternalRequestOptions ( options ) ;
2512
+
2513
+
2514
+ requestOptions . Data = generateTransformationCodePayload ;
2515
+ return await _transport . ExecuteRequestAsync < GenerateTransformationCodeResponse > ( new HttpMethod ( "POST" ) , "/1/transformations/models" , requestOptions , cancellationToken ) . ConfigureAwait ( false ) ;
2516
+ }
2517
+
2518
+
2519
+ /// <summary>
2520
+ /// Generates code for the selected model based on the given prompt. (Synchronous version)
2521
+ /// </summary>
2522
+ ///
2523
+ /// Required API Key ACLs:
2524
+ /// - addObject
2525
+ /// - deleteIndex
2526
+ /// - editSettings
2527
+ /// <param name="generateTransformationCodePayload"></param>
2528
+ /// <param name="options">Add extra http header or query parameters to Algolia.</param>
2529
+ /// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
2530
+ /// <exception cref="ArgumentException">Thrown when arguments are not correct</exception>
2531
+ /// <exception cref="Algolia.Search.Exceptions.AlgoliaApiException">Thrown when the API call was rejected by Algolia</exception>
2532
+ /// <exception cref="Algolia.Search.Exceptions.AlgoliaUnreachableHostException">Thrown when the client failed to call the endpoint</exception>
2533
+ /// <returns>GenerateTransformationCodeResponse</returns>
2534
+ public GenerateTransformationCodeResponse GenerateTransformationCode ( GenerateTransformationCodePayload generateTransformationCodePayload , RequestOptions options = null , CancellationToken cancellationToken = default ) =>
2535
+ AsyncHelper . RunSync ( ( ) => GenerateTransformationCodeAsync ( generateTransformationCodePayload , options , cancellationToken ) ) ;
2536
+
2537
+
2466
2538
/// <summary>
2467
2539
/// Retrieves an authentication resource by its ID.
2468
2540
/// </summary>
@@ -3323,7 +3395,7 @@ public async Task<TransformationModels> ListTransformationModelsAsync(RequestOpt
3323
3395
var requestOptions = new InternalRequestOptions ( options ) ;
3324
3396
3325
3397
3326
- return await _transport . ExecuteRequestAsync < TransformationModels > ( new HttpMethod ( "GET" ) , "/1/transformations/copilot " , requestOptions , cancellationToken ) . ConfigureAwait ( false ) ;
3398
+ return await _transport . ExecuteRequestAsync < TransformationModels > ( new HttpMethod ( "GET" ) , "/1/transformations/models " , requestOptions , cancellationToken ) . ConfigureAwait ( false ) ;
3327
3399
}
3328
3400
3329
3401
0 commit comments