diff --git a/src/libs/Together/Generated/Together.FineTuningClient.DeleteFineTunesById.g.cs b/src/libs/Together/Generated/Together.FineTuningClient.DeleteFineTunesById.g.cs new file mode 100644 index 0000000..f299992 --- /dev/null +++ b/src/libs/Together/Generated/Together.FineTuningClient.DeleteFineTunesById.g.cs @@ -0,0 +1,244 @@ + +#nullable enable + +namespace Together +{ + public partial class FineTuningClient + { + partial void PrepareDeleteFineTunesByIdArguments( + global::System.Net.Http.HttpClient httpClient, + ref string id, + ref bool force); + partial void PrepareDeleteFineTunesByIdRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + string id, + bool force); + partial void ProcessDeleteFineTunesByIdResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessDeleteFineTunesByIdResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Delete a fine-tune job
+ /// Delete a fine-tuning job. + ///
+ /// + /// + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task DeleteFineTunesByIdAsync( + string id, + bool force, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareDeleteFineTunesByIdArguments( + httpClient: HttpClient, + id: ref id, + force: ref force); + + var __pathBuilder = new global::Together.PathBuilder( + path: $"/fine-tunes/{id}", + baseUri: HttpClient.BaseAddress); + __pathBuilder + .AddRequiredParameter("force", force.ToString()) + ; + var __path = __pathBuilder.ToString(); + using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( + method: global::System.Net.Http.HttpMethod.Delete, + requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute)); +#if NET6_0_OR_GREATER + __httpRequest.Version = global::System.Net.HttpVersion.Version11; + __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher; +#endif + + foreach (var __authorization in Authorizations) + { + if (__authorization.Type == "Http" || + __authorization.Type == "OAuth2") + { + __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue( + scheme: __authorization.Name, + parameter: __authorization.Value); + } + else if (__authorization.Type == "ApiKey" && + __authorization.Location == "Header") + { + __httpRequest.Headers.Add(__authorization.Name, __authorization.Value); + } + } + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareDeleteFineTunesByIdRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + id: id, + force: force); + + using var __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: cancellationToken).ConfigureAwait(false); + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessDeleteFineTunesByIdResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + // Fine-tune job not found + if ((int)__response.StatusCode == 404) + { + string? __content_404 = null; + global::System.Exception? __exception_404 = null; + global::Together.ErrorData? __value_404 = null; + try + { + if (ReadResponseAsString) + { + __content_404 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_404 = global::Together.ErrorData.FromJson(__content_404, JsonSerializerContext); + } + else + { + var __contentStream_404 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_404 = await global::Together.ErrorData.FromJsonStreamAsync(__contentStream_404, JsonSerializerContext).ConfigureAwait(false); + } + } + catch (global::System.Exception __ex) + { + __exception_404 = __ex; + } + + throw new global::Together.ApiException( + message: __content_404 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_404, + statusCode: __response.StatusCode) + { + ResponseBody = __content_404, + ResponseObject = __value_404, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + // Internal server error + if ((int)__response.StatusCode == 500) + { + string? __content_500 = null; + global::System.Exception? __exception_500 = null; + global::Together.ErrorData? __value_500 = null; + try + { + if (ReadResponseAsString) + { + __content_500 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + __value_500 = global::Together.ErrorData.FromJson(__content_500, JsonSerializerContext); + } + else + { + var __contentStream_500 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); + __value_500 = await global::Together.ErrorData.FromJsonStreamAsync(__contentStream_500, JsonSerializerContext).ConfigureAwait(false); + } + } + catch (global::System.Exception __ex) + { + __exception_500 = __ex; + } + + throw new global::Together.ApiException( + message: __content_500 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_500, + statusCode: __response.StatusCode) + { + ResponseBody = __content_500, + ResponseObject = __value_500, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + + if (ReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessDeleteFineTunesByIdResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + return + global::Together.FinetuneDeleteResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + } + catch (global::System.Exception __ex) + { + throw new global::Together.ApiException( + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseBody = __content, + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + else + { + try + { + __response.EnsureSuccessStatusCode(); + + using var __content = await __response.Content.ReadAsStreamAsync( +#if NET5_0_OR_GREATER + cancellationToken +#endif + ).ConfigureAwait(false); + + return + await global::Together.FinetuneDeleteResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + } + catch (global::System.Exception __ex) + { + throw new global::Together.ApiException( + message: __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + statusCode: __response.StatusCode) + { + ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value), + }; + } + } + } + } +} \ No newline at end of file diff --git a/src/libs/Together/Generated/Together.IFineTuningClient.DeleteFineTunesById.g.cs b/src/libs/Together/Generated/Together.IFineTuningClient.DeleteFineTunesById.g.cs new file mode 100644 index 0000000..d67e64c --- /dev/null +++ b/src/libs/Together/Generated/Together.IFineTuningClient.DeleteFineTunesById.g.cs @@ -0,0 +1,20 @@ +#nullable enable + +namespace Together +{ + public partial interface IFineTuningClient + { + /// + /// Delete a fine-tune job
+ /// Delete a fine-tuning job. + ///
+ /// + /// + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task DeleteFineTunesByIdAsync( + string id, + bool force, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Together/Generated/Together.JsonSerializerContextTypes.g.cs b/src/libs/Together/Generated/Together.JsonSerializerContextTypes.g.cs index 84dc814..e84aea5 100644 --- a/src/libs/Together/Generated/Together.JsonSerializerContextTypes.g.cs +++ b/src/libs/Together/Generated/Together.JsonSerializerContextTypes.g.cs @@ -982,510 +982,514 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::Together.FinetuneDownloadResult? Type239 { get; set; } + public global::Together.FinetuneDeleteResponse? Type239 { get; set; } /// /// /// - public global::Together.FinetuneDownloadResultObject? Type240 { get; set; } + public global::Together.FinetuneDownloadResult? Type240 { get; set; } /// /// /// - public global::Together.FinetuneJobStatus? Type241 { get; set; } + public global::Together.FinetuneDownloadResultObject? Type241 { get; set; } /// /// /// - public global::Together.FinetuneListCheckpoints? Type242 { get; set; } + public global::Together.FinetuneJobStatus? Type242 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type243 { get; set; } + public global::Together.FinetuneListCheckpoints? Type243 { get; set; } /// /// /// - public global::Together.FinetuneListEvents? Type244 { get; set; } + public global::System.Collections.Generic.IList? Type244 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type245 { get; set; } + public global::Together.FinetuneListEvents? Type245 { get; set; } /// /// /// - public global::Together.FinetuneResponse? Type246 { get; set; } + public global::System.Collections.Generic.IList? Type246 { get; set; } /// /// /// - public global::Together.OneOf? Type247 { get; set; } + public global::Together.FinetuneResponse? Type247 { get; set; } /// /// /// - public global::Together.FinetuneResponseBatchSize? Type248 { get; set; } + public global::Together.OneOf? Type248 { get; set; } /// /// /// - public global::Together.LRScheduler? Type249 { get; set; } + public global::Together.FinetuneResponseBatchSize? Type249 { get; set; } /// /// /// - public global::Together.OneOf? Type250 { get; set; } + public global::Together.LRScheduler? Type250 { get; set; } /// /// /// - public global::Together.LinearLRSchedulerArgs? Type251 { get; set; } + public global::Together.OneOf? Type251 { get; set; } /// /// /// - public global::Together.LRSchedulerLrSchedulerType? Type252 { get; set; } + public global::Together.LinearLRSchedulerArgs? Type252 { get; set; } /// /// /// - public global::Together.OneOf? Type253 { get; set; } + public global::Together.LRSchedulerLrSchedulerType? Type253 { get; set; } /// /// /// - public global::Together.FinetuneResponseTrainOnInputs? Type254 { get; set; } + public global::Together.OneOf? Type254 { get; set; } /// /// /// - public global::Together.OneOf? Type255 { get; set; } + public global::Together.FinetuneResponseTrainOnInputs? Type255 { get; set; } /// /// /// - public global::Together.TrainingMethodSFT? Type256 { get; set; } + public global::Together.OneOf? Type256 { get; set; } /// /// /// - public global::Together.TrainingMethodSFTMethod? Type257 { get; set; } + public global::Together.TrainingMethodSFT? Type257 { get; set; } /// /// /// - public global::Together.OneOf? Type258 { get; set; } + public global::Together.TrainingMethodSFTMethod? Type258 { get; set; } /// /// /// - public global::Together.TrainingMethodSFTTrainOnInputs? Type259 { get; set; } + public global::Together.OneOf? Type259 { get; set; } /// /// /// - public global::Together.TrainingMethodDPO? Type260 { get; set; } + public global::Together.TrainingMethodSFTTrainOnInputs? Type260 { get; set; } /// /// /// - public global::Together.TrainingMethodDPOMethod? Type261 { get; set; } + public global::Together.TrainingMethodDPO? Type261 { get; set; } /// /// /// - public global::Together.OneOf? Type262 { get; set; } + public global::Together.TrainingMethodDPOMethod? Type262 { get; set; } /// /// /// - public global::Together.FullTrainingType? Type263 { get; set; } + public global::Together.OneOf? Type263 { get; set; } /// /// /// - public global::Together.FullTrainingTypeType? Type264 { get; set; } + public global::Together.FullTrainingType? Type264 { get; set; } /// /// /// - public global::Together.LoRATrainingType? Type265 { get; set; } + public global::Together.FullTrainingTypeType? Type265 { get; set; } /// /// /// - public global::Together.LoRATrainingTypeType? Type266 { get; set; } + public global::Together.LoRATrainingType? Type266 { get; set; } /// /// /// - public global::Together.FinetuneResponseTruncated? Type267 { get; set; } + public global::Together.LoRATrainingTypeType? Type267 { get; set; } /// /// /// - public global::Together.FinetuneTruncatedList? Type268 { get; set; } + public global::Together.FinetuneResponseTruncated? Type268 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type269 { get; set; } + public global::Together.FinetuneTruncatedList? Type269 { get; set; } /// /// /// - public global::Together.HardwareAvailability? Type270 { get; set; } + public global::System.Collections.Generic.IList? Type270 { get; set; } /// /// /// - public global::Together.HardwareAvailabilityStatus? Type271 { get; set; } + public global::Together.HardwareAvailability? Type271 { get; set; } /// /// /// - public global::Together.HardwareSpec? Type272 { get; set; } + public global::Together.HardwareAvailabilityStatus? Type272 { get; set; } /// /// /// - public global::Together.HardwareWithStatus? Type273 { get; set; } + public global::Together.HardwareSpec? Type273 { get; set; } /// /// /// - public global::Together.HardwareWithStatusObject? Type274 { get; set; } + public global::Together.HardwareWithStatus? Type274 { get; set; } /// /// /// - public global::Together.ImageResponse? Type275 { get; set; } + public global::Together.HardwareWithStatusObject? Type275 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type276 { get; set; } + public global::Together.ImageResponse? Type276 { get; set; } /// /// /// - public global::Together.DataItem? Type277 { get; set; } + public global::System.Collections.Generic.IList? Type277 { get; set; } /// /// /// - public global::Together.ImageResponseDataB64? Type278 { get; set; } + public global::Together.DataItem? Type278 { get; set; } /// /// /// - public global::Together.ImageResponseDataB64Type? Type279 { get; set; } + public global::Together.ImageResponseDataB64? Type279 { get; set; } /// /// /// - public global::Together.ImageResponseDataUrl? Type280 { get; set; } + public global::Together.ImageResponseDataB64Type? Type280 { get; set; } /// /// /// - public global::Together.ImageResponseDataUrlType? Type281 { get; set; } + public global::Together.ImageResponseDataUrl? Type281 { get; set; } /// /// /// - public global::Together.ImageResponseDataItemDiscriminator? Type282 { get; set; } + public global::Together.ImageResponseDataUrlType? Type282 { get; set; } /// /// /// - public global::Together.ImageResponseObject? Type283 { get; set; } + public global::Together.ImageResponseDataItemDiscriminator? Type283 { get; set; } /// /// /// - public global::Together.InterpreterOutput? Type284 { get; set; } + public global::Together.ImageResponseObject? Type284 { get; set; } /// /// /// - public global::Together.InterpreterOutputVariant1? Type285 { get; set; } + public global::Together.InterpreterOutput? Type285 { get; set; } /// /// /// - public global::Together.InterpreterOutputVariant1Type? Type286 { get; set; } + public global::Together.InterpreterOutputVariant1? Type286 { get; set; } /// /// /// - public global::Together.InterpreterOutputVariant2? Type287 { get; set; } + public global::Together.InterpreterOutputVariant1Type? Type287 { get; set; } /// /// /// - public global::Together.InterpreterOutputVariant2Type? Type288 { get; set; } + public global::Together.InterpreterOutputVariant2? Type288 { get; set; } /// /// /// - public global::Together.InterpreterOutputVariant3? Type289 { get; set; } + public global::Together.InterpreterOutputVariant2Type? Type289 { get; set; } /// /// /// - public global::Together.InterpreterOutputVariant3Data? Type290 { get; set; } + public global::Together.InterpreterOutputVariant3? Type290 { get; set; } /// /// /// - public global::Together.InterpreterOutputVariant3Type? Type291 { get; set; } + public global::Together.InterpreterOutputVariant3Data? Type291 { get; set; } /// /// /// - public global::Together.InterpreterOutputDiscriminator? Type292 { get; set; } + public global::Together.InterpreterOutputVariant3Type? Type292 { get; set; } /// /// /// - public global::Together.JobInfoSuccessResponse? Type293 { get; set; } + public global::Together.InterpreterOutputDiscriminator? Type293 { get; set; } /// /// /// - public global::Together.JobInfoSuccessResponseArgs? Type294 { get; set; } + public global::Together.JobInfoSuccessResponse? Type294 { get; set; } /// /// /// - public global::Together.JobInfoSuccessResponseStatus? Type295 { get; set; } + public global::Together.JobInfoSuccessResponseArgs? Type295 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type296 { get; set; } + public global::Together.JobInfoSuccessResponseStatus? Type296 { get; set; } /// /// /// - public global::Together.JobInfoSuccessResponseStatusUpdate? Type297 { get; set; } + public global::System.Collections.Generic.IList? Type297 { get; set; } /// /// /// - public global::Together.JobsInfoSuccessResponse? Type298 { get; set; } + public global::Together.JobInfoSuccessResponseStatusUpdate? Type298 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type299 { get; set; } + public global::Together.JobsInfoSuccessResponse? Type299 { get; set; } /// /// /// - public global::Together.ListEndpoint? Type300 { get; set; } + public global::System.Collections.Generic.IList? Type300 { get; set; } /// /// /// - public global::Together.ListEndpointObject? Type301 { get; set; } + public global::Together.ListEndpoint? Type301 { get; set; } /// /// /// - public global::Together.ListEndpointState? Type302 { get; set; } + public global::Together.ListEndpointObject? Type302 { get; set; } /// /// /// - public global::Together.ListEndpointType? Type303 { get; set; } + public global::Together.ListEndpointState? Type303 { get; set; } /// /// /// - public global::Together.ModelInfo? Type304 { get; set; } + public global::Together.ListEndpointType? Type304 { get; set; } /// /// /// - public global::Together.Pricing? Type305 { get; set; } + public global::Together.ModelInfo? Type305 { get; set; } /// /// /// - public global::Together.ModelInfoType? Type306 { get; set; } + public global::Together.Pricing? Type306 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type307 { get; set; } + public global::Together.ModelInfoType? Type307 { get; set; } /// /// /// - public global::Together.ModelUploadRequest? Type308 { get; set; } + public global::System.Collections.Generic.IList? Type308 { get; set; } /// /// /// - public global::Together.ModelUploadRequestModelType? Type309 { get; set; } + public global::Together.ModelUploadRequest? Type309 { get; set; } /// /// /// - public global::Together.ModelUploadSuccessResponse? Type310 { get; set; } + public global::Together.ModelUploadRequestModelType? Type310 { get; set; } /// /// /// - public global::Together.ModelUploadSuccessResponseData? Type311 { get; set; } + public global::Together.ModelUploadSuccessResponse? Type311 { get; set; } /// /// /// - public global::Together.RerankRequest? Type312 { get; set; } + public global::Together.ModelUploadSuccessResponseData? Type312 { get; set; } /// /// /// - public global::Together.OneOf, global::System.Collections.Generic.IList>? Type313 { get; set; } + public global::Together.RerankRequest? Type313 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type314 { get; set; } + public global::Together.OneOf, global::System.Collections.Generic.IList>? Type314 { get; set; } /// /// /// - public global::Together.AnyOf? Type315 { get; set; } + public global::System.Collections.Generic.IList? Type315 { get; set; } /// /// /// - public global::Together.RerankRequestModel? Type316 { get; set; } + public global::Together.AnyOf? Type316 { get; set; } /// /// /// - public global::Together.RerankResponse? Type317 { get; set; } + public global::Together.RerankRequestModel? Type317 { get; set; } /// /// /// - public global::Together.RerankResponseObject? Type318 { get; set; } + public global::Together.RerankResponse? Type318 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type319 { get; set; } + public global::Together.RerankResponseObject? Type319 { get; set; } /// /// /// - public global::Together.RerankResponseResult? Type320 { get; set; } + public global::System.Collections.Generic.IList? Type320 { get; set; } /// /// /// - public global::Together.RerankResponseResultDocument? Type321 { get; set; } + public global::Together.RerankResponseResult? Type321 { get; set; } /// /// /// - public global::Together.Response? Type322 { get; set; } + public global::Together.RerankResponseResultDocument? Type322 { get; set; } /// /// /// - public global::Together.SessionListResponse? Type323 { get; set; } + public global::Together.Response? Type323 { get; set; } /// /// /// - public global::Together.SessionListResponseVariant1? Type324 { get; set; } + public global::Together.SessionListResponse? Type324 { get; set; } /// /// /// - public global::Together.SessionListResponseVariant2? Type325 { get; set; } + public global::Together.SessionListResponseVariant1? Type325 { get; set; } /// /// /// - public global::Together.SessionListResponseVariant2Data? Type326 { get; set; } + public global::Together.SessionListResponseVariant2? Type326 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type327 { get; set; } + public global::Together.SessionListResponseVariant2Data? Type327 { get; set; } /// /// /// - public global::Together.SessionListResponseVariant2DataSession? Type328 { get; set; } + public global::System.Collections.Generic.IList? Type328 { get; set; } /// /// /// - public global::Together.StreamOutput? Type329 { get; set; } + public global::Together.SessionListResponseVariant2DataSession? Type329 { get; set; } /// /// /// - public global::Together.StreamOutputType? Type330 { get; set; } + public global::Together.StreamOutput? Type330 { get; set; } /// /// /// - public global::Together.UpdateEndpointRequest? Type331 { get; set; } + public global::Together.StreamOutputType? Type331 { get; set; } /// /// /// - public global::Together.UpdateEndpointRequestState? Type332 { get; set; } + public global::Together.UpdateEndpointRequest? Type332 { get; set; } /// /// /// - public global::Together.EvaluationUpdateRequest? Type333 { get; set; } + public global::Together.UpdateEndpointRequestState? Type333 { get; set; } /// /// /// - public global::Together.OneOf? Type334 { get; set; } + public global::Together.EvaluationUpdateRequest? Type334 { get; set; } /// /// /// - public global::Together.EvaluationUpdateRequestStatus? Type335 { get; set; } + public global::Together.OneOf? Type335 { get; set; } /// /// /// - public global::Together.Request? Type336 { get; set; } + public global::Together.EvaluationUpdateRequestStatus? Type336 { get; set; } /// /// /// - public global::Together.Request2? Type337 { get; set; } + public global::Together.Request? Type337 { get; set; } /// /// /// - public global::Together.OneOf? Type338 { get; set; } + public global::Together.Request2? Type338 { get; set; } /// /// /// - public global::Together.RequestBatchSize? Type339 { get; set; } + public global::Together.OneOf? Type339 { get; set; } /// /// /// - public global::Together.OneOf? Type340 { get; set; } + public global::Together.RequestBatchSize? Type340 { get; set; } /// /// /// - public global::Together.RequestTrainOnInputs? Type341 { get; set; } + public global::Together.OneOf? Type341 { get; set; } /// /// /// - public global::Together.Request3? Type342 { get; set; } + public global::Together.RequestTrainOnInputs? Type342 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type343 { get; set; } + public global::Together.Request3? Type343 { get; set; } /// /// /// - public global::Together.RequestImageLora? Type344 { get; set; } + public global::System.Collections.Generic.IList? Type344 { get; set; } /// /// /// - public global::Together.AnyOf? Type345 { get; set; } + public global::Together.RequestImageLora? Type345 { get; set; } /// /// /// - public global::Together.RequestModel? Type346 { get; set; } + public global::Together.AnyOf? Type346 { get; set; } /// /// /// - public global::Together.RequestOutputFormat? Type347 { get; set; } + public global::Together.RequestModel? Type347 { get; set; } /// /// /// - public global::Together.RequestResponseFormat? Type348 { get; set; } + public global::Together.RequestOutputFormat? Type348 { get; set; } /// /// /// - public global::Together.ListEndpointsType? Type349 { get; set; } + public global::Together.RequestResponseFormat? Type349 { get; set; } /// /// /// - public global::Together.EvaluationsListStatus? Type350 { get; set; } + public global::Together.ListEndpointsType? Type350 { get; set; } /// /// /// - public global::Together.Checkpoint? Type351 { get; set; } + public global::Together.EvaluationsListStatus? Type351 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type352 { get; set; } + public global::Together.Checkpoint? Type352 { get; set; } /// /// /// - public global::Together.ListEndpointsResponse? Type353 { get; set; } + public global::System.Collections.Generic.IList? Type353 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type354 { get; set; } + public global::Together.ListEndpointsResponse? Type354 { get; set; } /// /// /// - public global::Together.ListEndpointsResponseObject? Type355 { get; set; } + public global::System.Collections.Generic.IList? Type355 { get; set; } /// /// /// - public global::Together.EvaluationStatusResponse? Type356 { get; set; } + public global::Together.ListEndpointsResponseObject? Type356 { get; set; } /// /// /// - public global::Together.OneOf? Type357 { get; set; } + public global::Together.EvaluationStatusResponse? Type357 { get; set; } /// /// /// - public global::Together.EvaluationStatusResponseResults? Type358 { get; set; } + public global::Together.OneOf? Type358 { get; set; } /// /// /// - public global::Together.EvaluationStatusResponseStatus? Type359 { get; set; } + public global::Together.EvaluationStatusResponseResults? Type359 { get; set; } /// /// /// - public global::Together.EvaluationUpdateResponse? Type360 { get; set; } + public global::Together.EvaluationStatusResponseStatus? Type360 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type361 { get; set; } + public global::Together.EvaluationUpdateResponse? Type361 { get; set; } /// /// /// - public global::Together.EvaluationsModelListResponse? Type362 { get; set; } + public global::System.Collections.Generic.IList? Type362 { get; set; } /// /// /// - public global::Together.ListHardwareResponse? Type363 { get; set; } + public global::Together.EvaluationsModelListResponse? Type363 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type364 { get; set; } + public global::Together.ListHardwareResponse? Type364 { get; set; } /// /// /// - public global::Together.ListHardwareResponseObject? Type365 { get; set; } + public global::System.Collections.Generic.IList? Type365 { get; set; } + /// + /// + /// + public global::Together.ListHardwareResponseObject? Type366 { get; set; } } } \ No newline at end of file diff --git a/src/libs/Together/Generated/Together.Models.FinetuneDeleteResponse.Json.g.cs b/src/libs/Together/Generated/Together.Models.FinetuneDeleteResponse.Json.g.cs new file mode 100644 index 0000000..26295b0 --- /dev/null +++ b/src/libs/Together/Generated/Together.Models.FinetuneDeleteResponse.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Together +{ + public sealed partial class FinetuneDeleteResponse + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Together.FinetuneDeleteResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Together.FinetuneDeleteResponse), + jsonSerializerContext) as global::Together.FinetuneDeleteResponse; + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Together.FinetuneDeleteResponse? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Together.FinetuneDeleteResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::Together.FinetuneDeleteResponse; + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Together/Generated/Together.Models.FinetuneDeleteResponse.g.cs b/src/libs/Together/Generated/Together.Models.FinetuneDeleteResponse.g.cs new file mode 100644 index 0000000..60b9f3f --- /dev/null +++ b/src/libs/Together/Generated/Together.Models.FinetuneDeleteResponse.g.cs @@ -0,0 +1,45 @@ + +#nullable enable + +namespace Together +{ + /// + /// + /// + public sealed partial class FinetuneDeleteResponse + { + /// + /// Message indicating the result of the deletion + /// + [global::System.Text.Json.Serialization.JsonPropertyName("message")] + public string? Message { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Message indicating the result of the deletion + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public FinetuneDeleteResponse( + string? message) + { + this.Message = message; + } + + /// + /// Initializes a new instance of the class. + /// + public FinetuneDeleteResponse() + { + } + } +} \ No newline at end of file diff --git a/src/libs/Together/openapi.yaml b/src/libs/Together/openapi.yaml index 46b318e..44e75e4 100644 --- a/src/libs/Together/openapi.yaml +++ b/src/libs/Together/openapi.yaml @@ -1511,6 +1511,55 @@ paths: lang: Shell source: "curl -X POST \"https://api.together.xyz/v1/fine-tunes\" \\\n -H \"Authorization: Bearer $TOGETHER_API_KEY\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\n \"model\": \"meta-llama/Meta-Llama-3.1-8B-Instruct-Reference\",\n \"training_file\": \"file-id\"\n }'\n" '/fine-tunes/{id}': + delete: + tags: + - Fine-tuning + summary: Delete a fine-tune job + description: Delete a fine-tuning job. + parameters: + - name: id + in: path + required: true + schema: + type: string + - name: force + in: query + required: true + schema: + type: boolean + default: + responses: + '200': + description: Fine-tune job deleted successfully + content: + application/json: + schema: + $ref: '#/components/schemas/FinetuneDeleteResponse' + '404': + description: Fine-tune job not found + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorData' + '500': + description: Internal server error + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorData' + x-codeSamples: + - label: Together AI SDK (Python) + lang: Python + source: "from together import Together\nimport os\n\nclient = Together(\n api_key=os.environ.get(\"TOGETHER_API_KEY\"),\n)\n\nresponse = client.fine_tuning.delete(id=\"ft-id\")\n\nprint(response)\n" + - label: Together AI SDK (TypeScript) + lang: TypeScript + source: "import Together from \"together-ai\";\n\nconst client = new Together({\n apiKey: process.env.TOGETHER_API_KEY,\n});\n\nconst response = await client.fineTune.delete(\"ft-id\");\n\nconsole.log(response);\n" + - label: Together AI SDK (JavaScript) + lang: JavaScript + source: "import Together from \"together-ai\";\n\nconst client = new Together({\n apiKey: process.env.TOGETHER_API_KEY,\n});\n\nconst response = await client.fineTune.delete(\"ft-id\");\n\nconsole.log(response);\n" + - label: cURL + lang: Shell + source: "curl -X \"DELETE\" \"https://api.together.xyz/v1/fine-tunes/ft-id?force=false\" \\\n -H \"Authorization: Bearer $TOGETHER_API_KEY\" \\\n -H \"Content-Type: application/json\"\n" get: tags: - Fine-tuning @@ -4363,6 +4412,12 @@ components: $ref: '#/components/schemas/FinetuneEventType' wandb_url: type: string + FinetuneDeleteResponse: + type: object + properties: + message: + type: string + description: Message indicating the result of the deletion FinetuneDownloadResult: type: object properties: