diff --git a/src/libs/Together/Generated/Together..JsonSerializerContext.g.cs b/src/libs/Together/Generated/Together..JsonSerializerContext.g.cs index 22f9071..a6e30bc 100644 --- a/src/libs/Together/Generated/Together..JsonSerializerContext.g.cs +++ b/src/libs/Together/Generated/Together..JsonSerializerContext.g.cs @@ -209,8 +209,6 @@ namespace Together typeof(global::Together.JsonConverters.StreamOutputTypeNullableJsonConverter), typeof(global::Together.JsonConverters.UpdateEndpointRequestStateJsonConverter), typeof(global::Together.JsonConverters.UpdateEndpointRequestStateNullableJsonConverter), - typeof(global::Together.JsonConverters.EvaluationUpdateRequestStatusJsonConverter), - typeof(global::Together.JsonConverters.EvaluationUpdateRequestStatusNullableJsonConverter), typeof(global::Together.JsonConverters.RequestBatchSizeJsonConverter), typeof(global::Together.JsonConverters.RequestBatchSizeNullableJsonConverter), typeof(global::Together.JsonConverters.RequestTrainOnInputsJsonConverter), @@ -276,7 +274,6 @@ namespace Together typeof(global::Together.JsonConverters.AnyOfJsonConverter), typeof(global::Together.JsonConverters.OneOfJsonConverter), typeof(global::Together.JsonConverters.OneOfJsonConverter), - typeof(global::Together.JsonConverters.OneOfJsonConverter), typeof(global::Together.JsonConverters.OneOfJsonConverter), typeof(global::Together.JsonConverters.OneOfJsonConverter), typeof(global::Together.JsonConverters.OneOfJsonConverter), diff --git a/src/libs/Together/Generated/Together.EvaluationsClient.EvaluationUpdate.g.cs b/src/libs/Together/Generated/Together.EvaluationsClient.EvaluationUpdate.g.cs deleted file mode 100644 index 8a2d6da..0000000 --- a/src/libs/Together/Generated/Together.EvaluationsClient.EvaluationUpdate.g.cs +++ /dev/null @@ -1,320 +0,0 @@ - -#nullable enable - -namespace Together -{ - public partial class EvaluationsClient - { - partial void PrepareEvaluationUpdateArguments( - global::System.Net.Http.HttpClient httpClient, - ref string id, - global::Together.EvaluationUpdateRequest request); - partial void PrepareEvaluationUpdateRequest( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpRequestMessage httpRequestMessage, - string id, - global::Together.EvaluationUpdateRequest request); - partial void ProcessEvaluationUpdateResponse( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage); - - partial void ProcessEvaluationUpdateResponseContent( - global::System.Net.Http.HttpClient httpClient, - global::System.Net.Http.HttpResponseMessage httpResponseMessage, - ref string content); - - /// - /// Update evaluation job status
- /// Internal callback endpoint for workflows to update job status and results - ///
- /// - /// - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task EvaluationUpdateAsync( - string id, - global::Together.EvaluationUpdateRequest request, - global::System.Threading.CancellationToken cancellationToken = default) - { - request = request ?? throw new global::System.ArgumentNullException(nameof(request)); - - PrepareArguments( - client: HttpClient); - PrepareEvaluationUpdateArguments( - httpClient: HttpClient, - id: ref id, - request: request); - - var __pathBuilder = new global::Together.PathBuilder( - path: $"/evaluation/{id}/update", - baseUri: HttpClient.BaseAddress); - var __path = __pathBuilder.ToString(); - using var __httpRequest = new global::System.Net.Http.HttpRequestMessage( - method: global::System.Net.Http.HttpMethod.Post, - 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); - } - } - var __httpRequestContentBody = request.ToJson(JsonSerializerContext); - var __httpRequestContent = new global::System.Net.Http.StringContent( - content: __httpRequestContentBody, - encoding: global::System.Text.Encoding.UTF8, - mediaType: "application/json"); - __httpRequest.Content = __httpRequestContent; - - PrepareRequest( - client: HttpClient, - request: __httpRequest); - PrepareEvaluationUpdateRequest( - httpClient: HttpClient, - httpRequestMessage: __httpRequest, - id: id, - request: request); - - using var __response = await HttpClient.SendAsync( - request: __httpRequest, - completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, - cancellationToken: cancellationToken).ConfigureAwait(false); - - ProcessResponse( - client: HttpClient, - response: __response); - ProcessEvaluationUpdateResponse( - httpClient: HttpClient, - httpResponseMessage: __response); - // Bad request - if ((int)__response.StatusCode == 400) - { - string? __content_400 = null; - global::System.Exception? __exception_400 = null; - global::Together.ErrorData? __value_400 = null; - try - { - if (ReadResponseAsString) - { - __content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - __value_400 = global::Together.ErrorData.FromJson(__content_400, JsonSerializerContext); - } - else - { - var __contentStream_400 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false); - __value_400 = await global::Together.ErrorData.FromJsonStreamAsync(__contentStream_400, JsonSerializerContext).ConfigureAwait(false); - } - } - catch (global::System.Exception __ex) - { - __exception_400 = __ex; - } - - throw new global::Together.ApiException( - message: __content_400 ?? __response.ReasonPhrase ?? string.Empty, - innerException: __exception_400, - statusCode: __response.StatusCode) - { - ResponseBody = __content_400, - ResponseObject = __value_400, - ResponseHeaders = global::System.Linq.Enumerable.ToDictionary( - __response.Headers, - h => h.Key, - h => h.Value), - }; - } - // 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); - ProcessEvaluationUpdateResponseContent( - httpClient: HttpClient, - httpResponseMessage: __response, - content: ref __content); - - try - { - __response.EnsureSuccessStatusCode(); - - return - global::Together.EvaluationUpdateResponse.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.EvaluationUpdateResponse.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), - }; - } - } - } - - /// - /// Update evaluation job status
- /// Internal callback endpoint for workflows to update job status and results - ///
- /// - /// - /// Error message - /// - /// - /// - /// The new status for the job - /// - /// The token to cancel the operation with - /// - public async global::System.Threading.Tasks.Task EvaluationUpdateAsync( - string id, - global::Together.EvaluationUpdateRequestStatus status, - string? error = default, - global::Together.OneOf? results = default, - global::System.Threading.CancellationToken cancellationToken = default) - { - var __request = new global::Together.EvaluationUpdateRequest - { - Error = error, - Results = results, - Status = status, - }; - - return await EvaluationUpdateAsync( - id: id, - request: __request, - cancellationToken: cancellationToken).ConfigureAwait(false); - } - } -} \ No newline at end of file diff --git a/src/libs/Together/Generated/Together.IEvaluationsClient.EvaluationUpdate.g.cs b/src/libs/Together/Generated/Together.IEvaluationsClient.EvaluationUpdate.g.cs deleted file mode 100644 index 6be8f9a..0000000 --- a/src/libs/Together/Generated/Together.IEvaluationsClient.EvaluationUpdate.g.cs +++ /dev/null @@ -1,41 +0,0 @@ -#nullable enable - -namespace Together -{ - public partial interface IEvaluationsClient - { - /// - /// Update evaluation job status
- /// Internal callback endpoint for workflows to update job status and results - ///
- /// - /// - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task EvaluationUpdateAsync( - string id, - global::Together.EvaluationUpdateRequest request, - global::System.Threading.CancellationToken cancellationToken = default); - - /// - /// Update evaluation job status
- /// Internal callback endpoint for workflows to update job status and results - ///
- /// - /// - /// Error message - /// - /// - /// - /// The new status for the job - /// - /// The token to cancel the operation with - /// - global::System.Threading.Tasks.Task EvaluationUpdateAsync( - string id, - global::Together.EvaluationUpdateRequestStatus status, - string? error = default, - global::Together.OneOf? results = default, - global::System.Threading.CancellationToken cancellationToken = default); - } -} \ No newline at end of file diff --git a/src/libs/Together/Generated/Together.JsonConverters.EvaluationUpdateRequestStatus.g.cs b/src/libs/Together/Generated/Together.JsonConverters.EvaluationUpdateRequestStatus.g.cs deleted file mode 100644 index 06e403c..0000000 --- a/src/libs/Together/Generated/Together.JsonConverters.EvaluationUpdateRequestStatus.g.cs +++ /dev/null @@ -1,53 +0,0 @@ -#nullable enable - -namespace Together.JsonConverters -{ - /// - public sealed class EvaluationUpdateRequestStatusJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Together.EvaluationUpdateRequestStatus Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::Together.EvaluationUpdateRequestStatusExtensions.ToEnum(stringValue) ?? default; - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::Together.EvaluationUpdateRequestStatus)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::Together.EvaluationUpdateRequestStatus); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Together.EvaluationUpdateRequestStatus value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - writer.WriteStringValue(global::Together.EvaluationUpdateRequestStatusExtensions.ToValueString(value)); - } - } -} diff --git a/src/libs/Together/Generated/Together.JsonConverters.EvaluationUpdateRequestStatusNullable.g.cs b/src/libs/Together/Generated/Together.JsonConverters.EvaluationUpdateRequestStatusNullable.g.cs deleted file mode 100644 index c671f48..0000000 --- a/src/libs/Together/Generated/Together.JsonConverters.EvaluationUpdateRequestStatusNullable.g.cs +++ /dev/null @@ -1,60 +0,0 @@ -#nullable enable - -namespace Together.JsonConverters -{ - /// - public sealed class EvaluationUpdateRequestStatusNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter - { - /// - public override global::Together.EvaluationUpdateRequestStatus? Read( - ref global::System.Text.Json.Utf8JsonReader reader, - global::System.Type typeToConvert, - global::System.Text.Json.JsonSerializerOptions options) - { - switch (reader.TokenType) - { - case global::System.Text.Json.JsonTokenType.String: - { - var stringValue = reader.GetString(); - if (stringValue != null) - { - return global::Together.EvaluationUpdateRequestStatusExtensions.ToEnum(stringValue); - } - - break; - } - case global::System.Text.Json.JsonTokenType.Number: - { - var numValue = reader.GetInt32(); - return (global::Together.EvaluationUpdateRequestStatus)numValue; - } - case global::System.Text.Json.JsonTokenType.Null: - { - return default(global::Together.EvaluationUpdateRequestStatus?); - } - default: - throw new global::System.ArgumentOutOfRangeException(nameof(reader)); - } - - return default; - } - - /// - public override void Write( - global::System.Text.Json.Utf8JsonWriter writer, - global::Together.EvaluationUpdateRequestStatus? value, - global::System.Text.Json.JsonSerializerOptions options) - { - writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); - - if (value == null) - { - writer.WriteNullValue(); - } - else - { - writer.WriteStringValue(global::Together.EvaluationUpdateRequestStatusExtensions.ToValueString(value.Value)); - } - } - } -} diff --git a/src/libs/Together/Generated/Together.JsonSerializerContextTypes.g.cs b/src/libs/Together/Generated/Together.JsonSerializerContextTypes.g.cs index 07b68b0..fdf4d00 100644 --- a/src/libs/Together/Generated/Together.JsonSerializerContextTypes.g.cs +++ b/src/libs/Together/Generated/Together.JsonSerializerContextTypes.g.cs @@ -1398,138 +1398,122 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::Together.EvaluationUpdateRequest? Type343 { get; set; } + public global::Together.Request? Type343 { get; set; } /// /// /// - public global::Together.OneOf? Type344 { get; set; } + public global::Together.Request2? Type344 { get; set; } /// /// /// - public global::Together.EvaluationUpdateRequestStatus? Type345 { get; set; } + public global::Together.OneOf? Type345 { get; set; } /// /// /// - public global::Together.Request? Type346 { get; set; } + public global::Together.RequestBatchSize? Type346 { get; set; } /// /// /// - public global::Together.Request2? Type347 { get; set; } + public global::Together.OneOf? Type347 { get; set; } /// /// /// - public global::Together.OneOf? Type348 { get; set; } + public global::Together.RequestTrainOnInputs? Type348 { get; set; } /// /// /// - public global::Together.RequestBatchSize? Type349 { get; set; } + public global::Together.Request3? Type349 { get; set; } /// /// /// - public global::Together.OneOf? Type350 { get; set; } + public global::System.Collections.Generic.IList? Type350 { get; set; } /// /// /// - public global::Together.RequestTrainOnInputs? Type351 { get; set; } + public global::Together.RequestImageLora? Type351 { get; set; } /// /// /// - public global::Together.Request3? Type352 { get; set; } + public global::Together.AnyOf? Type352 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type353 { get; set; } + public global::Together.RequestModel? Type353 { get; set; } /// /// /// - public global::Together.RequestImageLora? Type354 { get; set; } + public global::Together.RequestOutputFormat? Type354 { get; set; } /// /// /// - public global::Together.AnyOf? Type355 { get; set; } + public global::Together.RequestResponseFormat? Type355 { get; set; } /// /// /// - public global::Together.RequestModel? Type356 { get; set; } + public global::Together.ListEndpointsType? Type356 { get; set; } /// /// /// - public global::Together.RequestOutputFormat? Type357 { get; set; } + public global::Together.EvaluationsListStatus? Type357 { get; set; } /// /// /// - public global::Together.RequestResponseFormat? Type358 { get; set; } + public global::Together.Checkpoint? Type358 { get; set; } /// /// /// - public global::Together.ListEndpointsType? Type359 { get; set; } + public global::System.Collections.Generic.IList? Type359 { get; set; } /// /// /// - public global::Together.EvaluationsListStatus? Type360 { get; set; } + public global::Together.ListEndpointsResponse? Type360 { get; set; } /// /// /// - public global::Together.Checkpoint? Type361 { get; set; } + public global::System.Collections.Generic.IList? Type361 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type362 { get; set; } + public global::Together.ListEndpointsResponseObject? Type362 { get; set; } /// /// /// - public global::Together.ListEndpointsResponse? Type363 { get; set; } + public global::Together.EvaluationStatusResponse? Type363 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type364 { get; set; } + public global::Together.OneOf? Type364 { get; set; } /// /// /// - public global::Together.ListEndpointsResponseObject? Type365 { get; set; } + public global::Together.EvaluationStatusResponseResults? Type365 { get; set; } /// /// /// - public global::Together.EvaluationStatusResponse? Type366 { get; set; } + public global::Together.EvaluationStatusResponseStatus? Type366 { get; set; } /// /// /// - public global::Together.OneOf? Type367 { get; set; } + public global::System.Collections.Generic.IList? Type367 { get; set; } /// /// /// - public global::Together.EvaluationStatusResponseResults? Type368 { get; set; } + public global::Together.EvaluationsModelListResponse? Type368 { get; set; } /// /// /// - public global::Together.EvaluationStatusResponseStatus? Type369 { get; set; } + public global::Together.Response2? Type369 { get; set; } /// /// /// - public global::Together.EvaluationUpdateResponse? Type370 { get; set; } + public global::Together.ListHardwareResponse? Type370 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type371 { get; set; } + public global::System.Collections.Generic.IList? Type371 { get; set; } /// /// /// - public global::Together.EvaluationsModelListResponse? Type372 { get; set; } - /// - /// - /// - public global::Together.Response2? Type373 { get; set; } - /// - /// - /// - public global::Together.ListHardwareResponse? Type374 { get; set; } - /// - /// - /// - public global::System.Collections.Generic.IList? Type375 { get; set; } - /// - /// - /// - public global::Together.ListHardwareResponseObject? Type376 { get; set; } + public global::Together.ListHardwareResponseObject? Type372 { get; set; } } } \ No newline at end of file diff --git a/src/libs/Together/Generated/Together.Models.EvaluationUpdateRequest.Json.g.cs b/src/libs/Together/Generated/Together.Models.EvaluationUpdateRequest.Json.g.cs deleted file mode 100644 index a4a3b92..0000000 --- a/src/libs/Together/Generated/Together.Models.EvaluationUpdateRequest.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Together -{ - public sealed partial class EvaluationUpdateRequest - { - /// - /// 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.EvaluationUpdateRequest? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Together.EvaluationUpdateRequest), - jsonSerializerContext) as global::Together.EvaluationUpdateRequest; - } - - /// - /// 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.EvaluationUpdateRequest? 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.EvaluationUpdateRequest), - jsonSerializerContext).ConfigureAwait(false)) as global::Together.EvaluationUpdateRequest; - } - - /// - /// 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.EvaluationUpdateRequest.g.cs b/src/libs/Together/Generated/Together.Models.EvaluationUpdateRequest.g.cs deleted file mode 100644 index 95e618d..0000000 --- a/src/libs/Together/Generated/Together.Models.EvaluationUpdateRequest.g.cs +++ /dev/null @@ -1,70 +0,0 @@ - -#pragma warning disable CS0618 // Type or member is obsolete - -#nullable enable - -namespace Together -{ - /// - /// - /// - public sealed partial class EvaluationUpdateRequest - { - /// - /// Error message - /// - [global::System.Text.Json.Serialization.JsonPropertyName("error")] - public string? Error { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("results")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Together.JsonConverters.OneOfJsonConverter))] - public global::Together.OneOf? Results { get; set; } - - /// - /// The new status for the job - /// - [global::System.Text.Json.Serialization.JsonPropertyName("status")] - [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Together.JsonConverters.EvaluationUpdateRequestStatusJsonConverter))] - [global::System.Text.Json.Serialization.JsonRequired] - public required global::Together.EvaluationUpdateRequestStatus Status { 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. - /// - /// - /// Error message - /// - /// - /// - /// The new status for the job - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public EvaluationUpdateRequest( - global::Together.EvaluationUpdateRequestStatus status, - string? error, - global::Together.OneOf? results) - { - this.Status = status; - this.Error = error; - this.Results = results; - } - - /// - /// Initializes a new instance of the class. - /// - public EvaluationUpdateRequest() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Together/Generated/Together.Models.EvaluationUpdateRequestStatus.g.cs b/src/libs/Together/Generated/Together.Models.EvaluationUpdateRequestStatus.g.cs deleted file mode 100644 index 524d4ba..0000000 --- a/src/libs/Together/Generated/Together.Models.EvaluationUpdateRequestStatus.g.cs +++ /dev/null @@ -1,75 +0,0 @@ - -#nullable enable - -namespace Together -{ - /// - /// The new status for the job - /// - public enum EvaluationUpdateRequestStatus - { - /// - /// - /// - Completed, - /// - /// - /// - Error, - /// - /// - /// - Running, - /// - /// - /// - Queued, - /// - /// - /// - UserError, - /// - /// - /// - InferenceError, - } - - /// - /// Enum extensions to do fast conversions without the reflection. - /// - public static class EvaluationUpdateRequestStatusExtensions - { - /// - /// Converts an enum to a string. - /// - public static string ToValueString(this EvaluationUpdateRequestStatus value) - { - return value switch - { - EvaluationUpdateRequestStatus.Completed => "completed", - EvaluationUpdateRequestStatus.Error => "error", - EvaluationUpdateRequestStatus.Running => "running", - EvaluationUpdateRequestStatus.Queued => "queued", - EvaluationUpdateRequestStatus.UserError => "user_error", - EvaluationUpdateRequestStatus.InferenceError => "inference_error", - _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), - }; - } - /// - /// Converts an string to a enum. - /// - public static EvaluationUpdateRequestStatus? ToEnum(string value) - { - return value switch - { - "completed" => EvaluationUpdateRequestStatus.Completed, - "error" => EvaluationUpdateRequestStatus.Error, - "running" => EvaluationUpdateRequestStatus.Running, - "queued" => EvaluationUpdateRequestStatus.Queued, - "user_error" => EvaluationUpdateRequestStatus.UserError, - "inference_error" => EvaluationUpdateRequestStatus.InferenceError, - _ => null, - }; - } - } -} \ No newline at end of file diff --git a/src/libs/Together/Generated/Together.Models.EvaluationUpdateResponse.Json.g.cs b/src/libs/Together/Generated/Together.Models.EvaluationUpdateResponse.Json.g.cs deleted file mode 100644 index 68ac12f..0000000 --- a/src/libs/Together/Generated/Together.Models.EvaluationUpdateResponse.Json.g.cs +++ /dev/null @@ -1,92 +0,0 @@ -#nullable enable - -namespace Together -{ - public sealed partial class EvaluationUpdateResponse - { - /// - /// 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.EvaluationUpdateResponse? FromJson( - string json, - global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) - { - return global::System.Text.Json.JsonSerializer.Deserialize( - json, - typeof(global::Together.EvaluationUpdateResponse), - jsonSerializerContext) as global::Together.EvaluationUpdateResponse; - } - - /// - /// 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.EvaluationUpdateResponse? 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.EvaluationUpdateResponse), - jsonSerializerContext).ConfigureAwait(false)) as global::Together.EvaluationUpdateResponse; - } - - /// - /// 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.EvaluationUpdateResponse.g.cs b/src/libs/Together/Generated/Together.Models.EvaluationUpdateResponse.g.cs deleted file mode 100644 index 5f07df5..0000000 --- a/src/libs/Together/Generated/Together.Models.EvaluationUpdateResponse.g.cs +++ /dev/null @@ -1,52 +0,0 @@ - -#nullable enable - -namespace Together -{ - /// - /// - /// - public sealed partial class EvaluationUpdateResponse - { - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("status")] - public string? Status { get; set; } - - /// - /// - /// - [global::System.Text.Json.Serialization.JsonPropertyName("workflow_id")] - public string? WorkflowId { 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. - /// - /// - /// -#if NET7_0_OR_GREATER - [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] -#endif - public EvaluationUpdateResponse( - string? status, - string? workflowId) - { - this.Status = status; - this.WorkflowId = workflowId; - } - - /// - /// Initializes a new instance of the class. - /// - public EvaluationUpdateResponse() - { - } - } -} \ No newline at end of file diff --git a/src/libs/Together/openapi.yaml b/src/libs/Together/openapi.yaml index 2fa64f1..007d721 100644 --- a/src/libs/Together/openapi.yaml +++ b/src/libs/Together/openapi.yaml @@ -924,77 +924,6 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorData' - '/evaluation/{id}/update': - post: - tags: - - Evaluations - summary: Update evaluation job status - description: Internal callback endpoint for workflows to update job status and results - operationId: evaluation-update - parameters: - - name: id - in: path - description: The evaluation job ID - required: true - schema: - type: string - requestBody: - content: - application/json: - schema: - required: - - status - type: object - properties: - error: - type: string - description: Error message - results: - oneOf: - - $ref: '#/components/schemas/EvaluationClassifyResults' - - $ref: '#/components/schemas/EvaluationScoreResults' - - $ref: '#/components/schemas/EvaluationCompareResults' - status: - enum: - - completed - - error - - running - - queued - - user_error - - inference_error - type: string - description: The new status for the job - required: true - responses: - '200': - description: Successful response - content: - application/json: - schema: - type: object - properties: - status: - type: string - workflow_id: - type: string - '400': - description: Bad request - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorData' - '404': - description: Job not found - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorData' - '500': - description: Internal server error - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorData' /evaluations: get: tags: