Skip to content

Commit

Permalink
Merge pull request #182 from tryAGI/bot/update-openapi_202502140125
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Feb 14, 2025
2 parents 174d56a + b4d5153 commit d2de1b5
Show file tree
Hide file tree
Showing 4 changed files with 231 additions and 35 deletions.
74 changes: 39 additions & 35 deletions src/libs/LangSmith/Generated/JsonSerializerContextTypes.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2090,142 +2090,146 @@ public sealed partial class JsonSerializerContextTypes
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::LangSmith.Dataset>? Type516 { get; set; }
public global::System.Collections.Generic.IList<global::LangSmith.ExampleValidationResult>? Type516 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::LangSmith.DatasetVersion>? Type517 { get; set; }
public global::System.Collections.Generic.IList<global::LangSmith.Dataset>? Type517 { get; set; }
/// <summary>
///
/// </summary>
public global::LangSmith.AnyOf<global::System.Collections.Generic.IList<global::LangSmith.ExampleWithRuns>, global::System.Collections.Generic.IList<global::LangSmith.ExampleWithRunsCH>>? Type518 { get; set; }
public global::System.Collections.Generic.IList<global::LangSmith.DatasetVersion>? Type518 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::LangSmith.ExampleWithRuns>? Type519 { get; set; }
public global::LangSmith.AnyOf<global::System.Collections.Generic.IList<global::LangSmith.ExampleWithRuns>, global::System.Collections.Generic.IList<global::LangSmith.ExampleWithRunsCH>>? Type519 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::LangSmith.ExampleWithRunsCH>? Type520 { get; set; }
public global::System.Collections.Generic.IList<global::LangSmith.ExampleWithRuns>? Type520 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::LangSmith.ComparativeExperiment>? Type521 { get; set; }
public global::System.Collections.Generic.IList<global::LangSmith.ExampleWithRunsCH>? Type521 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::LangSmith.RunRulesSchema>? Type522 { get; set; }
public global::System.Collections.Generic.IList<global::LangSmith.ComparativeExperiment>? Type522 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::LangSmith.RuleLogSchema>? Type523 { get; set; }
public global::System.Collections.Generic.IList<global::LangSmith.RunRulesSchema>? Type523 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::LangSmith.FeedbackSchema>? Type524 { get; set; }
public global::System.Collections.Generic.IList<global::LangSmith.RuleLogSchema>? Type524 { get; set; }
/// <summary>
///
/// </summary>
public global::LangSmith.AnyOf<global::LangSmith.FeedbackIngestTokenSchema, global::System.Collections.Generic.IList<global::LangSmith.FeedbackIngestTokenSchema>>? Type525 { get; set; }
public global::System.Collections.Generic.IList<global::LangSmith.FeedbackSchema>? Type525 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::LangSmith.FeedbackIngestTokenSchema>? Type526 { get; set; }
public global::LangSmith.AnyOf<global::LangSmith.FeedbackIngestTokenSchema, global::System.Collections.Generic.IList<global::LangSmith.FeedbackIngestTokenSchema>>? Type526 { get; set; }
/// <summary>
///
/// </summary>
public global::LangSmith.AnyOf<global::System.Collections.Generic.IList<global::LangSmith.PublicExampleWithRuns>, global::System.Collections.Generic.IList<global::LangSmith.ExampleWithRunsCH>>? Type527 { get; set; }
public global::System.Collections.Generic.IList<global::LangSmith.FeedbackIngestTokenSchema>? Type527 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::LangSmith.PublicExampleWithRuns>? Type528 { get; set; }
public global::LangSmith.AnyOf<global::System.Collections.Generic.IList<global::LangSmith.PublicExampleWithRuns>, global::System.Collections.Generic.IList<global::LangSmith.ExampleWithRunsCH>>? Type528 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::LangSmith.PublicComparativeExperiment>? Type529 { get; set; }
public global::System.Collections.Generic.IList<global::LangSmith.PublicExampleWithRuns>? Type529 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::LangSmith.AnnotationQueueSchemaWithSize>? Type530 { get; set; }
public global::System.Collections.Generic.IList<global::LangSmith.PublicComparativeExperiment>? Type530 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::LangSmith.AnnotationQueueRunSchema>? Type531 { get; set; }
public global::System.Collections.Generic.IList<global::LangSmith.AnnotationQueueSchemaWithSize>? Type531 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::LangSmith.RunSchemaWithAnnotationQueueInfo>? Type532 { get; set; }
public global::System.Collections.Generic.IList<global::LangSmith.AnnotationQueueRunSchema>? Type532 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::LangSmith.AnnotationQueueSchema>? Type533 { get; set; }
public global::System.Collections.Generic.IList<global::LangSmith.RunSchemaWithAnnotationQueueInfo>? Type533 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::LangSmith.BulkExport>? Type534 { get; set; }
public global::System.Collections.Generic.IList<global::LangSmith.AnnotationQueueSchema>? Type534 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::LangSmith.BulkExportDestination>? Type535 { get; set; }
public global::System.Collections.Generic.IList<global::LangSmith.BulkExport>? Type535 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::LangSmith.BulkExportRun>? Type536 { get; set; }
public global::System.Collections.Generic.IList<global::LangSmith.BulkExportDestination>? Type536 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::LangSmith.TenantForUser>? Type537 { get; set; }
public global::System.Collections.Generic.IList<global::LangSmith.BulkExportRun>? Type537 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::LangSmith.AppSchemasTenant>? Type538 { get; set; }
public global::System.Collections.Generic.IList<global::LangSmith.TenantForUser>? Type538 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::LangSmith.SecretKey>? Type539 { get; set; }
public global::System.Collections.Generic.IList<global::LangSmith.AppSchemasTenant>? Type539 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::LangSmith.FeedbackConfigSchema>? Type540 { get; set; }
public global::System.Collections.Generic.IList<global::LangSmith.SecretKey>? Type540 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::LangSmith.UsageLimit>? Type541 { get; set; }
public global::System.Collections.Generic.IList<global::LangSmith.FeedbackConfigSchema>? Type541 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::LangSmith.TagKey>? Type542 { get; set; }
public global::System.Collections.Generic.IList<global::LangSmith.UsageLimit>? Type542 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::LangSmith.TaggingsResponse>? Type543 { get; set; }
public global::System.Collections.Generic.IList<global::LangSmith.TagKey>? Type543 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::LangSmith.TagKeyWithValues>? Type544 { get; set; }
public global::System.Collections.Generic.IList<global::LangSmith.TaggingsResponse>? Type544 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::LangSmith.TagKeyWithValuesAndTaggings>? Type545 { get; set; }
public global::System.Collections.Generic.IList<global::LangSmith.TagKeyWithValues>? Type545 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::LangSmith.PlaygroundSettingsResponse>? Type546 { get; set; }
public global::System.Collections.Generic.IList<global::LangSmith.TagKeyWithValuesAndTaggings>? Type546 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::LangSmith.ServiceAccount>? Type547 { get; set; }
public global::System.Collections.Generic.IList<global::LangSmith.PlaygroundSettingsResponse>? Type547 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::LangSmith.CustomChartsSectionResponse>? Type548 { get; set; }
public global::System.Collections.Generic.IList<global::LangSmith.ServiceAccount>? Type548 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::LangSmith.RepoTag>? Type549 { get; set; }
public global::System.Collections.Generic.IList<global::LangSmith.CustomChartsSectionResponse>? Type549 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::LangSmith.PromptOptimizationJob>? Type550 { get; set; }
public global::System.Collections.Generic.IList<global::LangSmith.RepoTag>? Type550 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::LangSmith.PromptOptimizationJob>? Type551 { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@

#nullable enable

namespace LangSmith
{
public partial class ExamplesClient
{
partial void PrepareValidateExamplesArguments(
global::System.Net.Http.HttpClient httpClient);
partial void PrepareValidateExamplesRequest(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpRequestMessage httpRequestMessage);
partial void ProcessValidateExamplesResponse(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage);

partial void ProcessValidateExamplesResponseContent(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage,
ref string content);

/// <summary>
/// Validate Examples<br/>
/// Validate an example.
/// </summary>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::LangSmith.ApiException"></exception>
public async global::System.Threading.Tasks.Task<global::System.Collections.Generic.IList<global::LangSmith.ExampleValidationResult>> ValidateExamplesAsync(
global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
PrepareValidateExamplesArguments(
httpClient: HttpClient);

var __pathBuilder = new PathBuilder(
path: "/api/v1/examples/validate/bulk",
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);
}
}

PrepareRequest(
client: HttpClient,
request: __httpRequest);
PrepareValidateExamplesRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest);

using var __response = await HttpClient.SendAsync(
request: __httpRequest,
completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
cancellationToken: cancellationToken).ConfigureAwait(false);

ProcessResponse(
client: HttpClient,
response: __response);
ProcessValidateExamplesResponse(
httpClient: HttpClient,
httpResponseMessage: __response);

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);
ProcessValidateExamplesResponseContent(
httpClient: HttpClient,
httpResponseMessage: __response,
content: ref __content);

try
{
__response.EnsureSuccessStatusCode();
}
catch (global::System.Net.Http.HttpRequestException __ex)
{
throw new global::LangSmith.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),
};
}

return
global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList<global::LangSmith.ExampleValidationResult>), JsonSerializerContext) as global::System.Collections.Generic.IList<global::LangSmith.ExampleValidationResult> ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}
else
{
try
{
__response.EnsureSuccessStatusCode();
}
catch (global::System.Net.Http.HttpRequestException __ex)
{
throw new global::LangSmith.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),
};
}

using var __content = await __response.Content.ReadAsStreamAsync(
#if NET5_0_OR_GREATER
cancellationToken
#endif
).ConfigureAwait(false);

return
await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList<global::LangSmith.ExampleValidationResult>), JsonSerializerContext).ConfigureAwait(false) as global::System.Collections.Generic.IList<global::LangSmith.ExampleValidationResult> ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#nullable enable

namespace LangSmith
{
public partial interface IExamplesClient
{
/// <summary>
/// Validate Examples<br/>
/// Validate an example.
/// </summary>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::LangSmith.ApiException"></exception>
global::System.Threading.Tasks.Task<global::System.Collections.Generic.IList<global::LangSmith.ExampleValidationResult>> ValidateExamplesAsync(
global::System.Threading.CancellationToken cancellationToken = default);
}
}
21 changes: 21 additions & 0 deletions src/libs/LangSmith/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2598,6 +2598,27 @@ paths:
- ApiKey: [ ]
- TenantId: [ ]
- BearerAuth: [ ]
/api/v1/examples/validate/bulk:
post:
tags:
- examples
summary: Validate Examples
description: Validate an example.
operationId: validate_examples_api_v1_examples_validate_bulk_post
responses:
'200':
description: Successful Response
content:
application/json:
schema:
title: Response Validate Examples Api V1 Examples Validate Bulk Post
type: array
items:
$ref: '#/components/schemas/ExampleValidationResult'
security:
- ApiKey: [ ]
- TenantId: [ ]
- BearerAuth: [ ]
'/api/v1/datasets/{dataset_id}':
get:
tags:
Expand Down

0 comments on commit d2de1b5

Please sign in to comment.