diff --git a/src/libs/Weave/Generated/Weave.EvaluationsClient.RescoreEvaluationEvaluationsRescorePost.g.cs b/src/libs/Weave/Generated/Weave.EvaluationsClient.RescoreEvaluationEvaluationsRescorePost.g.cs new file mode 100644 index 0000000..95646b5 --- /dev/null +++ b/src/libs/Weave/Generated/Weave.EvaluationsClient.RescoreEvaluationEvaluationsRescorePost.g.cs @@ -0,0 +1,518 @@ + +#nullable enable + +namespace Weave +{ + public partial class EvaluationsClient + { + + + private static readonly global::Weave.EndPointSecurityRequirement s_RescoreEvaluationEvaluationsRescorePostSecurityRequirement0 = + new global::Weave.EndPointSecurityRequirement + { + Authorizations = new global::Weave.EndPointAuthorizationRequirement[] + { new global::Weave.EndPointAuthorizationRequirement + { + Type = "Http", + SchemeId = "HTTPBearer", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Weave.EndPointSecurityRequirement[] s_RescoreEvaluationEvaluationsRescorePostSecurityRequirements = + new global::Weave.EndPointSecurityRequirement[] + { s_RescoreEvaluationEvaluationsRescorePostSecurityRequirement0, + }; + partial void PrepareRescoreEvaluationEvaluationsRescorePostArguments( + global::System.Net.Http.HttpClient httpClient, + global::Weave.RescoreReq request); + partial void PrepareRescoreEvaluationEvaluationsRescorePostRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage, + global::Weave.RescoreReq request); + partial void ProcessRescoreEvaluationEvaluationsRescorePostResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessRescoreEvaluationEvaluationsRescorePostResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// Rescore Evaluation
+ /// Rescore an existing evaluation run with different scorer(s).
+ /// Applies the provided scorer(s) to the predictions from source_evaluation_run_id
+ /// and returns a new evaluation_run_id. Original prediction call IDs are preserved. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task RescoreEvaluationEvaluationsRescorePostAsync( + + global::Weave.RescoreReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await RescoreEvaluationEvaluationsRescorePostAsResponseAsync( + + request: request, + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// Rescore Evaluation
+ /// Rescore an existing evaluation run with different scorer(s).
+ /// Applies the provided scorer(s) to the predictions from source_evaluation_run_id
+ /// and returns a new evaluation_run_id. Original prediction call IDs are preserved. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task> RescoreEvaluationEvaluationsRescorePostAsResponseAsync( + + global::Weave.RescoreReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + request = request ?? throw new global::System.ArgumentNullException(nameof(request)); + + PrepareArguments( + client: HttpClient); + PrepareRescoreEvaluationEvaluationsRescorePostArguments( + httpClient: HttpClient, + request: request); + + + var __authorizations = global::Weave.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_RescoreEvaluationEvaluationsRescorePostSecurityRequirements, + operationName: "RescoreEvaluationEvaluationsRescorePostAsync"); + + using var __timeoutCancellationTokenSource = global::Weave.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Weave.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Weave.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Weave.PathBuilder( + path: "/evaluations/rescore", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Weave.AutoSDKRequestOptionsSupport.AppendQueryParameters( + path: __path, + clientParameters: Options.QueryParameters, + requestParameters: requestOptions?.QueryParameters); + 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" || + __authorization.Type == "OpenIdConnect") + { + __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; + global::Weave.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareRescoreEvaluationEvaluationsRescorePostRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest, + request: request); + + return __httpRequest; + } + + global::System.Net.Http.HttpRequestMessage? __httpRequest = null; + global::System.Net.Http.HttpResponseMessage? __response = null; + var __attemptNumber = 0; + try + { + for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++) + { + __attemptNumber = __attempt; + __httpRequest = __CreateHttpRequest(); + await global::Weave.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "RescoreEvaluationEvaluationsRescorePost", + methodName: "RescoreEvaluationEvaluationsRescorePostAsync", + pathTemplate: "\"/evaluations/rescore\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + try + { + __response = await HttpClient.SendAsync( + request: __httpRequest, + completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + } + catch (global::System.Net.Http.HttpRequestException __exception) + { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "RescoreEvaluationEvaluationsRescorePost", + methodName: "RescoreEvaluationEvaluationsRescorePostAsync", + pathTemplate: "\"/evaluations/rescore\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: null, + exception: __exception, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: __willRetry, + retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null, + retryReason: "exception", + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + if (!__willRetry) + { + throw; + } + + __httpRequest.Dispose(); + __httpRequest = null; + await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Weave.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Weave.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "RescoreEvaluationEvaluationsRescorePost", + methodName: "RescoreEvaluationEvaluationsRescorePostAsync", + pathTemplate: "\"/evaluations/rescore\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attempt, + maxAttempts: __maxAttempts, + willRetry: true, + retryDelay: __retryDelay, + retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture), + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + __response.Dispose(); + __response = null; + __httpRequest.Dispose(); + __httpRequest = null; + await global::Weave.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + break; + } + + if (__response == null) + { + throw new global::System.InvalidOperationException("No response received."); + } + + using (__response) + { + + ProcessResponse( + client: HttpClient, + response: __response); + ProcessRescoreEvaluationEvaluationsRescorePostResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Weave.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "RescoreEvaluationEvaluationsRescorePost", + methodName: "RescoreEvaluationEvaluationsRescorePostAsync", + pathTemplate: "\"/evaluations/rescore\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + else + { + await global::Weave.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Weave.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "RescoreEvaluationEvaluationsRescorePost", + methodName: "RescoreEvaluationEvaluationsRescorePostAsync", + pathTemplate: "\"/evaluations/rescore\"", + httpMethod: "POST", + baseUri: BaseUri, + request: __httpRequest!, + response: __response, + exception: null, + clientOptions: Options, + requestOptions: requestOptions, + attempt: __attemptNumber, + maxAttempts: __maxAttempts, + willRetry: false, + retryDelay: null, + retryReason: global::System.String.Empty, + cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false); + } + // Validation Error + if ((int)__response.StatusCode == 422) + { + string? __content_422 = null; + global::System.Exception? __exception_422 = null; + global::Weave.HTTPValidationError? __value_422 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_422 = global::Weave.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + else + { + __content_422 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_422 = global::Weave.HTTPValidationError.FromJson(__content_422, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_422 = __ex; + } + + + throw global::Weave.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_422 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_422, + responseBody: __content_422, + responseObject: __value_422, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + + if (__effectiveReadResponseAsString) + { + var __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + ProcessResponseContent( + client: HttpClient, + response: __response, + content: ref __content); + ProcessRescoreEvaluationEvaluationsRescorePostResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Weave.RescoreRes.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::Weave.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + 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 + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + + var __value = await global::Weave.RescoreRes.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Weave.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Weave.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + string? __content = null; + try + { + __content = await __response.Content.ReadAsStringAsync( + #if NET5_0_OR_GREATER + __effectiveCancellationToken + #endif + ).ConfigureAwait(false); + } + catch (global::System.Exception) + { + } + + throw global::Weave.ApiException.Create( + statusCode: __response.StatusCode, + message: __content ?? __response.ReasonPhrase ?? string.Empty, + innerException: __ex, + responseBody: __content, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + } + + } + } + finally + { + __httpRequest?.Dispose(); + } + } + /// + /// Rescore Evaluation
+ /// Rescore an existing evaluation run with different scorer(s).
+ /// Applies the provided scorer(s) to the predictions from source_evaluation_run_id
+ /// and returns a new evaluation_run_id. Original prediction call IDs are preserved. + ///
+ /// + /// The evaluation run whose predictions will be rescored + /// + /// + /// Scorer references (weave:// URIs) to apply; must be non-empty + /// + /// + /// + /// Do not set directly. Server will automatically populate this field. + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + public async global::System.Threading.Tasks.Task RescoreEvaluationEvaluationsRescorePostAsync( + string sourceEvaluationRunId, + global::System.Collections.Generic.IList scorerRefs, + string projectId, + string? wbUserId = default, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __request = new global::Weave.RescoreReq + { + SourceEvaluationRunId = sourceEvaluationRunId, + ScorerRefs = scorerRefs, + ProjectId = projectId, + WbUserId = wbUserId, + }; + + return await RescoreEvaluationEvaluationsRescorePostAsync( + request: __request, + requestOptions: requestOptions, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + } +} \ No newline at end of file diff --git a/src/libs/Weave/Generated/Weave.IEvaluationsClient.RescoreEvaluationEvaluationsRescorePost.g.cs b/src/libs/Weave/Generated/Weave.IEvaluationsClient.RescoreEvaluationEvaluationsRescorePost.g.cs new file mode 100644 index 0000000..4755eb5 --- /dev/null +++ b/src/libs/Weave/Generated/Weave.IEvaluationsClient.RescoreEvaluationEvaluationsRescorePost.g.cs @@ -0,0 +1,64 @@ +#nullable enable + +namespace Weave +{ + public partial interface IEvaluationsClient + { + /// + /// Rescore Evaluation
+ /// Rescore an existing evaluation run with different scorer(s).
+ /// Applies the provided scorer(s) to the predictions from source_evaluation_run_id
+ /// and returns a new evaluation_run_id. Original prediction call IDs are preserved. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task RescoreEvaluationEvaluationsRescorePostAsync( + + global::Weave.RescoreReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Rescore Evaluation
+ /// Rescore an existing evaluation run with different scorer(s).
+ /// Applies the provided scorer(s) to the predictions from source_evaluation_run_id
+ /// and returns a new evaluation_run_id. Original prediction call IDs are preserved. + ///
+ /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task> RescoreEvaluationEvaluationsRescorePostAsResponseAsync( + + global::Weave.RescoreReq request, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// Rescore Evaluation
+ /// Rescore an existing evaluation run with different scorer(s).
+ /// Applies the provided scorer(s) to the predictions from source_evaluation_run_id
+ /// and returns a new evaluation_run_id. Original prediction call IDs are preserved. + ///
+ /// + /// The evaluation run whose predictions will be rescored + /// + /// + /// Scorer references (weave:// URIs) to apply; must be non-empty + /// + /// + /// + /// Do not set directly. Server will automatically populate this field. + /// + /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. + /// The token to cancel the operation with + /// + global::System.Threading.Tasks.Task RescoreEvaluationEvaluationsRescorePostAsync( + string sourceEvaluationRunId, + global::System.Collections.Generic.IList scorerRefs, + string projectId, + string? wbUserId = default, + global::Weave.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Weave/Generated/Weave.JsonSerializerContext.g.cs b/src/libs/Weave/Generated/Weave.JsonSerializerContext.g.cs index ef5432a..7f6638c 100644 --- a/src/libs/Weave/Generated/Weave.JsonSerializerContext.g.cs +++ b/src/libs/Weave/Generated/Weave.JsonSerializerContext.g.cs @@ -377,6 +377,8 @@ namespace Weave [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Weave.AnyOf), TypeInfoPropertyName = "ContainsOperation_b519b0000bd0c5bf")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Weave.RefsReadBatchReq))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Weave.RefsReadBatchRes))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Weave.RescoreReq))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Weave.RescoreRes))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Weave.RouterOpenRouterModel))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Weave.RouterOpenRouterModelQuantization), TypeInfoPropertyName = "RouterOpenRouterModelQuantization2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] diff --git a/src/libs/Weave/Generated/Weave.JsonSerializerContextTypes.g.cs b/src/libs/Weave/Generated/Weave.JsonSerializerContextTypes.g.cs index b01f86d..1e700c4 100644 --- a/src/libs/Weave/Generated/Weave.JsonSerializerContextTypes.g.cs +++ b/src/libs/Weave/Generated/Weave.JsonSerializerContextTypes.g.cs @@ -988,243 +988,251 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::Weave.RouterOpenRouterModel? Type240 { get; set; } + public global::Weave.RescoreReq? Type240 { get; set; } /// /// /// - public global::Weave.RouterOpenRouterModelQuantization? Type241 { get; set; } + public global::Weave.RescoreRes? Type241 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type242 { get; set; } + public global::Weave.RouterOpenRouterModel? Type242 { get; set; } /// /// /// - public global::Weave.RouterOpenRouterModelSupportedSamplingParameter? Type243 { get; set; } + public global::Weave.RouterOpenRouterModelQuantization? Type243 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type244 { get; set; } + public global::System.Collections.Generic.IList? Type244 { get; set; } /// /// /// - public global::Weave.RouterOpenRouterModelSupportedFeature? Type245 { get; set; } + public global::Weave.RouterOpenRouterModelSupportedSamplingParameter? Type245 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type246 { get; set; } + public global::System.Collections.Generic.IList? Type246 { get; set; } /// /// /// - public global::Weave.RouterOpenRouterModelsRes? Type247 { get; set; } + public global::Weave.RouterOpenRouterModelSupportedFeature? Type247 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type248 { get; set; } + public global::System.Collections.Generic.IList? Type248 { get; set; } /// /// /// - public global::Weave.ScoreCreateBody? Type249 { get; set; } + public global::Weave.RouterOpenRouterModelsRes? Type249 { get; set; } /// /// /// - public global::Weave.ScoreCreateRes? Type250 { get; set; } + public global::System.Collections.Generic.IList? Type250 { get; set; } /// /// /// - public global::Weave.ScoreDeleteRes? Type251 { get; set; } + public global::Weave.ScoreCreateBody? Type251 { get; set; } /// /// /// - public global::Weave.ScoreReadRes? Type252 { get; set; } + public global::Weave.ScoreCreateRes? Type252 { get; set; } /// /// /// - public global::Weave.ScorerCreateBody? Type253 { get; set; } + public global::Weave.ScoreDeleteRes? Type253 { get; set; } /// /// /// - public global::Weave.ScorerCreateRes? Type254 { get; set; } + public global::Weave.ScoreReadRes? Type254 { get; set; } /// /// /// - public global::Weave.ScorerDeleteRes? Type255 { get; set; } + public global::Weave.ScorerCreateBody? Type255 { get; set; } /// /// /// - public global::Weave.ScorerReadRes? Type256 { get; set; } + public global::Weave.ScorerCreateRes? Type256 { get; set; } /// /// /// - public global::Weave.ServerInfoRes? Type257 { get; set; } + public global::Weave.ScorerDeleteRes? Type257 { get; set; } /// /// /// - public global::Weave.SortByDirection? Type258 { get; set; } + public global::Weave.ScorerReadRes? Type258 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type259 { get; set; } + public global::Weave.ServerInfoRes? Type259 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type260 { get; set; } + public global::Weave.SortByDirection? Type260 { get; set; } /// /// /// - public global::Weave.TableAppendSpec? Type261 { get; set; } + public global::System.Collections.Generic.Dictionary? Type261 { get; set; } /// /// /// - public global::Weave.TableAppendSpecPayload? Type262 { get; set; } + public global::System.Collections.Generic.Dictionary? Type262 { get; set; } /// /// /// - public global::Weave.TableCreateFromDigestsReq? Type263 { get; set; } + public global::Weave.TableAppendSpec? Type263 { get; set; } /// /// /// - public global::Weave.TableCreateFromDigestsRes? Type264 { get; set; } + public global::Weave.TableAppendSpecPayload? Type264 { get; set; } /// /// /// - public global::Weave.TableCreateReq? Type265 { get; set; } + public global::Weave.TableCreateFromDigestsReq? Type265 { get; set; } /// /// /// - public global::Weave.TableSchemaForInsert? Type266 { get; set; } + public global::Weave.TableCreateFromDigestsRes? Type266 { get; set; } /// /// /// - public global::Weave.TableCreateRes? Type267 { get; set; } + public global::Weave.TableCreateReq? Type267 { get; set; } /// /// /// - public global::Weave.TableInsertSpec? Type268 { get; set; } + public global::Weave.TableSchemaForInsert? Type268 { get; set; } /// /// /// - public global::Weave.TableInsertSpecPayload? Type269 { get; set; } + public global::Weave.TableCreateRes? Type269 { get; set; } /// /// /// - public global::Weave.TablePopSpec? Type270 { get; set; } + public global::Weave.TableInsertSpec? Type270 { get; set; } /// /// /// - public global::Weave.TablePopSpecPayload? Type271 { get; set; } + public global::Weave.TableInsertSpecPayload? Type271 { get; set; } /// /// /// - public global::Weave.TableQueryReq? Type272 { get; set; } + public global::Weave.TablePopSpec? Type272 { get; set; } /// /// /// - public global::Weave.TableRowFilter? Type273 { get; set; } + public global::Weave.TablePopSpecPayload? Type273 { get; set; } /// /// /// - public global::Weave.TableQueryRes? Type274 { get; set; } + public global::Weave.TableQueryReq? Type274 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type275 { get; set; } + public global::Weave.TableRowFilter? Type275 { get; set; } /// /// /// - public global::Weave.TableRowSchema? Type276 { get; set; } + public global::Weave.TableQueryRes? Type276 { get; set; } /// /// /// - public global::Weave.TableQueryStatsBatchReq? Type277 { get; set; } + public global::System.Collections.Generic.IList? Type277 { get; set; } /// /// /// - public global::Weave.TableQueryStatsBatchRes? Type278 { get; set; } + public global::Weave.TableRowSchema? Type278 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type279 { get; set; } + public global::Weave.TableQueryStatsBatchReq? Type279 { get; set; } /// /// /// - public global::Weave.TableStatsRow? Type280 { get; set; } + public global::Weave.TableQueryStatsBatchRes? Type280 { get; set; } /// /// /// - public global::Weave.TableQueryStatsReq? Type281 { get; set; } + public global::System.Collections.Generic.IList? Type281 { get; set; } /// /// /// - public global::Weave.TableQueryStatsRes? Type282 { get; set; } + public global::Weave.TableStatsRow? Type282 { get; set; } /// /// /// - public global::Weave.TableUpdateReq? Type283 { get; set; } + public global::Weave.TableQueryStatsReq? Type283 { get; set; } /// /// /// - public global::System.Collections.Generic.IList>? Type284 { get; set; } + public global::Weave.TableQueryStatsRes? Type284 { get; set; } /// /// /// - public global::Weave.AnyOf? Type285 { get; set; } + public global::Weave.TableUpdateReq? Type285 { get; set; } /// /// /// - public global::Weave.TableUpdateRes? Type286 { get; set; } + public global::System.Collections.Generic.IList>? Type286 { get; set; } /// /// /// - public global::Weave.TagsListRes? Type287 { get; set; } + public global::Weave.AnyOf? Type287 { get; set; } /// /// /// - public global::Weave.ThreadsQueryFilter? Type288 { get; set; } + public global::Weave.TableUpdateRes? Type288 { get; set; } /// /// /// - public global::Weave.ThreadsQueryReq? Type289 { get; set; } + public global::Weave.TagsListRes? Type289 { get; set; } /// /// /// - public global::Weave.TraceStatus? Type290 { get; set; } + public global::Weave.ThreadsQueryFilter? Type290 { get; set; } /// /// /// - public global::Weave.TraceUsageReq? Type291 { get; set; } + public global::Weave.ThreadsQueryReq? Type291 { get; set; } /// /// /// - public global::Weave.TraceUsageRes? Type292 { get; set; } + public global::Weave.TraceStatus? Type292 { get; set; } /// /// /// - public global::Weave.UsageMetricSpecMetric? Type293 { get; set; } + public global::Weave.TraceUsageReq? Type293 { get; set; } /// /// /// - public global::System.Collections.Generic.IList>? Type294 { get; set; } + public global::Weave.TraceUsageRes? Type294 { get; set; } /// /// /// - public global::Weave.AnyOf? Type295 { get; set; } + public global::Weave.UsageMetricSpecMetric? Type295 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type296 { get; set; } + public global::System.Collections.Generic.IList>? Type296 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type297 { get; set; } + public global::Weave.AnyOf? Type297 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type298 { get; set; } + public global::System.Collections.Generic.IList? Type298 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type299 { get; set; } + public global::System.Collections.Generic.IList? Type299 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type300 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type301 { get; set; } /// /// diff --git a/src/libs/Weave/Generated/Weave.Models.RescoreReq.Json.g.cs b/src/libs/Weave/Generated/Weave.Models.RescoreReq.Json.g.cs new file mode 100644 index 0000000..281d53d --- /dev/null +++ b/src/libs/Weave/Generated/Weave.Models.RescoreReq.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Weave +{ + public sealed partial class RescoreReq + { + /// + /// 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::Weave.RescoreReq? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Weave.RescoreReq), + jsonSerializerContext) as global::Weave.RescoreReq; + } + + /// + /// 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::Weave.RescoreReq? 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::Weave.RescoreReq), + jsonSerializerContext).ConfigureAwait(false)) as global::Weave.RescoreReq; + } + + /// + /// 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/Weave/Generated/Weave.Models.RescoreReq.g.cs b/src/libs/Weave/Generated/Weave.Models.RescoreReq.g.cs new file mode 100644 index 0000000..e97dc0d --- /dev/null +++ b/src/libs/Weave/Generated/Weave.Models.RescoreReq.g.cs @@ -0,0 +1,80 @@ + +#nullable enable + +namespace Weave +{ + /// + /// Full rescore request including server-set fields. + /// + public sealed partial class RescoreReq + { + /// + /// The evaluation run whose predictions will be rescored + /// + [global::System.Text.Json.Serialization.JsonPropertyName("source_evaluation_run_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string SourceEvaluationRunId { get; set; } + + /// + /// Scorer references (weave:// URIs) to apply; must be non-empty + /// + [global::System.Text.Json.Serialization.JsonPropertyName("scorer_refs")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList ScorerRefs { get; set; } + + /// + /// + /// + [global::System.Text.Json.Serialization.JsonPropertyName("project_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ProjectId { get; set; } + + /// + /// Do not set directly. Server will automatically populate this field. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("wb_user_id")] + public string? WbUserId { 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. + /// + /// + /// The evaluation run whose predictions will be rescored + /// + /// + /// Scorer references (weave:// URIs) to apply; must be non-empty + /// + /// + /// + /// Do not set directly. Server will automatically populate this field. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public RescoreReq( + string sourceEvaluationRunId, + global::System.Collections.Generic.IList scorerRefs, + string projectId, + string? wbUserId) + { + this.SourceEvaluationRunId = sourceEvaluationRunId ?? throw new global::System.ArgumentNullException(nameof(sourceEvaluationRunId)); + this.ScorerRefs = scorerRefs ?? throw new global::System.ArgumentNullException(nameof(scorerRefs)); + this.ProjectId = projectId ?? throw new global::System.ArgumentNullException(nameof(projectId)); + this.WbUserId = wbUserId; + } + + /// + /// Initializes a new instance of the class. + /// + public RescoreReq() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Weave/Generated/Weave.Models.RescoreReqWbUserId.Json.g.cs b/src/libs/Weave/Generated/Weave.Models.RescoreReqWbUserId.Json.g.cs new file mode 100644 index 0000000..6d7c018 --- /dev/null +++ b/src/libs/Weave/Generated/Weave.Models.RescoreReqWbUserId.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Weave +{ + public sealed partial class RescoreReqWbUserId + { + /// + /// 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::Weave.RescoreReqWbUserId? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Weave.RescoreReqWbUserId), + jsonSerializerContext) as global::Weave.RescoreReqWbUserId; + } + + /// + /// 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::Weave.RescoreReqWbUserId? 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::Weave.RescoreReqWbUserId), + jsonSerializerContext).ConfigureAwait(false)) as global::Weave.RescoreReqWbUserId; + } + + /// + /// 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/Weave/Generated/Weave.Models.RescoreReqWbUserId.g.cs b/src/libs/Weave/Generated/Weave.Models.RescoreReqWbUserId.g.cs new file mode 100644 index 0000000..7710a1a --- /dev/null +++ b/src/libs/Weave/Generated/Weave.Models.RescoreReqWbUserId.g.cs @@ -0,0 +1,19 @@ + +#nullable enable + +namespace Weave +{ + /// + /// Do not set directly. Server will automatically populate this field. + /// + public sealed partial class RescoreReqWbUserId + { + + /// + /// 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(); + + } +} \ No newline at end of file diff --git a/src/libs/Weave/Generated/Weave.Models.RescoreRes.Json.g.cs b/src/libs/Weave/Generated/Weave.Models.RescoreRes.Json.g.cs new file mode 100644 index 0000000..a0a5d4a --- /dev/null +++ b/src/libs/Weave/Generated/Weave.Models.RescoreRes.Json.g.cs @@ -0,0 +1,92 @@ +#nullable enable + +namespace Weave +{ + public sealed partial class RescoreRes + { + /// + /// 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::Weave.RescoreRes? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Weave.RescoreRes), + jsonSerializerContext) as global::Weave.RescoreRes; + } + + /// + /// 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::Weave.RescoreRes? 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::Weave.RescoreRes), + jsonSerializerContext).ConfigureAwait(false)) as global::Weave.RescoreRes; + } + + /// + /// 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/Weave/Generated/Weave.Models.RescoreRes.g.cs b/src/libs/Weave/Generated/Weave.Models.RescoreRes.g.cs new file mode 100644 index 0000000..a12b3c3 --- /dev/null +++ b/src/libs/Weave/Generated/Weave.Models.RescoreRes.g.cs @@ -0,0 +1,59 @@ + +#nullable enable + +namespace Weave +{ + /// + /// Response for a rescore request. + /// + public sealed partial class RescoreRes + { + /// + /// Call ID for /evaluations/status polling + /// + [global::System.Text.Json.Serialization.JsonPropertyName("call_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string CallId { get; set; } + + /// + /// The newly created EvaluationRun ID + /// + [global::System.Text.Json.Serialization.JsonPropertyName("evaluation_run_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string EvaluationRunId { 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. + /// + /// + /// Call ID for /evaluations/status polling + /// + /// + /// The newly created EvaluationRun ID + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public RescoreRes( + string callId, + string evaluationRunId) + { + this.CallId = callId ?? throw new global::System.ArgumentNullException(nameof(callId)); + this.EvaluationRunId = evaluationRunId ?? throw new global::System.ArgumentNullException(nameof(evaluationRunId)); + } + + /// + /// Initializes a new instance of the class. + /// + public RescoreRes() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Weave/openapi.json b/src/libs/Weave/openapi.json index cc382f2..3b32f69 100644 --- a/src/libs/Weave/openapi.json +++ b/src/libs/Weave/openapi.json @@ -2609,6 +2609,48 @@ } } }, + "/evaluations/rescore": { + "post": { + "tags": [ + "Evaluations" + ], + "summary": "Rescore Evaluation", + "description": "Rescore an existing evaluation run with different scorer(s).\n\nApplies the provided scorer(s) to the predictions from source_evaluation_run_id\nand returns a new evaluation_run_id. Original prediction call IDs are preserved.", + "operationId": "rescore_evaluation_evaluations_rescore_post", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RescoreReq" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Successful Response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RescoreRes" + } + } + } + }, + "422": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/HTTPValidationError" + } + } + } + } + } + } + }, "/calls/score": { "post": { "tags": [ @@ -13259,6 +13301,69 @@ ], "title": "RefsReadBatchRes" }, + "RescoreReq": { + "properties": { + "source_evaluation_run_id": { + "type": "string", + "title": "Source Evaluation Run Id", + "description": "The evaluation run whose predictions will be rescored" + }, + "scorer_refs": { + "items": { + "type": "string" + }, + "type": "array", + "minItems": 1, + "title": "Scorer Refs", + "description": "Scorer references (weave:// URIs) to apply; must be non-empty" + }, + "project_id": { + "type": "string", + "title": "Project Id" + }, + "wb_user_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Wb User Id", + "description": "Do not set directly. Server will automatically populate this field." + } + }, + "type": "object", + "required": [ + "source_evaluation_run_id", + "scorer_refs", + "project_id" + ], + "title": "RescoreReq", + "description": "Full rescore request including server-set fields." + }, + "RescoreRes": { + "properties": { + "call_id": { + "type": "string", + "title": "Call Id", + "description": "Call ID for /evaluations/status polling" + }, + "evaluation_run_id": { + "type": "string", + "title": "Evaluation Run Id", + "description": "The newly created EvaluationRun ID" + } + }, + "type": "object", + "required": [ + "call_id", + "evaluation_run_id" + ], + "title": "RescoreRes", + "description": "Response for a rescore request." + }, "RouterOpenRouterModel": { "properties": { "id": {