Skip to content

Commit

Permalink
Merge pull request #168 from tryAGI/bot/update-openapi_202501090337
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Jan 9, 2025
2 parents fd2cc17 + 6bc61e0 commit 9db5e5d
Show file tree
Hide file tree
Showing 4 changed files with 295 additions and 18 deletions.
40 changes: 22 additions & 18 deletions src/libs/LangSmith/Generated/JsonSerializerContextTypes.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2126,74 +2126,78 @@ public sealed partial class JsonSerializerContextTypes
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::LangSmith.AnnotationQueueSchema>? Type525 { get; set; }
public global::System.Collections.Generic.IList<global::LangSmith.RunSchemaWithAnnotationQueueInfo>? Type525 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::LangSmith.BulkExport>? Type526 { get; set; }
public global::System.Collections.Generic.IList<global::LangSmith.AnnotationQueueSchema>? Type526 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::LangSmith.BulkExportDestination>? Type527 { get; set; }
public global::System.Collections.Generic.IList<global::LangSmith.BulkExport>? Type527 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::LangSmith.BulkExportRun>? Type528 { get; set; }
public global::System.Collections.Generic.IList<global::LangSmith.BulkExportDestination>? Type528 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::LangSmith.TenantForUser>? Type529 { get; set; }
public global::System.Collections.Generic.IList<global::LangSmith.BulkExportRun>? Type529 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::LangSmith.AppSchemasTenant>? Type530 { get; set; }
public global::System.Collections.Generic.IList<global::LangSmith.TenantForUser>? Type530 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::LangSmith.SecretKey>? Type531 { get; set; }
public global::System.Collections.Generic.IList<global::LangSmith.AppSchemasTenant>? Type531 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::LangSmith.FeedbackConfigSchema>? Type532 { get; set; }
public global::System.Collections.Generic.IList<global::LangSmith.SecretKey>? Type532 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::LangSmith.UsageLimit>? Type533 { get; set; }
public global::System.Collections.Generic.IList<global::LangSmith.FeedbackConfigSchema>? Type533 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::LangSmith.TagKey>? Type534 { get; set; }
public global::System.Collections.Generic.IList<global::LangSmith.UsageLimit>? Type534 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::LangSmith.TaggingsResponse>? Type535 { get; set; }
public global::System.Collections.Generic.IList<global::LangSmith.TagKey>? Type535 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::LangSmith.TagKeyWithValues>? Type536 { get; set; }
public global::System.Collections.Generic.IList<global::LangSmith.TaggingsResponse>? Type536 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::LangSmith.TagKeyWithValuesAndTaggings>? Type537 { get; set; }
public global::System.Collections.Generic.IList<global::LangSmith.TagKeyWithValues>? Type537 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::LangSmith.PlaygroundSettingsResponse>? Type538 { get; set; }
public global::System.Collections.Generic.IList<global::LangSmith.TagKeyWithValuesAndTaggings>? Type538 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::LangSmith.ServiceAccount>? Type539 { get; set; }
public global::System.Collections.Generic.IList<global::LangSmith.PlaygroundSettingsResponse>? Type539 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::LangSmith.CustomChartsSectionResponse>? Type540 { get; set; }
public global::System.Collections.Generic.IList<global::LangSmith.ServiceAccount>? Type540 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::LangSmith.RepoTag>? Type541 { get; set; }
public global::System.Collections.Generic.IList<global::LangSmith.CustomChartsSectionResponse>? Type541 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::LangSmith.PromptOptimizationJob>? Type542 { get; set; }
public global::System.Collections.Generic.IList<global::LangSmith.RepoTag>? Type542 { get; set; }
/// <summary>
///
/// </summary>
public global::System.Collections.Generic.IList<global::LangSmith.PromptOptimizationJob>? Type543 { get; set; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,200 @@

#nullable enable

namespace LangSmith
{
public partial class AnnotationQueuesClient
{
partial void PrepareGetRunsFromAnnotationQueueArguments(
global::System.Net.Http.HttpClient httpClient,
ref global::System.Guid queueId,
ref int? offset,
ref int? limit);
partial void PrepareGetRunsFromAnnotationQueueRequest(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpRequestMessage httpRequestMessage,
global::System.Guid queueId,
int? offset,
int? limit);
partial void ProcessGetRunsFromAnnotationQueueResponse(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage);

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

/// <summary>
/// Get Runs From Annotation Queue
/// </summary>
/// <param name="queueId"></param>
/// <param name="offset">
/// Default Value: 0
/// </param>
/// <param name="limit">
/// Default Value: 100
/// </param>
/// <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.RunSchemaWithAnnotationQueueInfo>> GetRunsFromAnnotationQueueAsync(
global::System.Guid queueId,
int? offset = default,
int? limit = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
PrepareGetRunsFromAnnotationQueueArguments(
httpClient: HttpClient,
queueId: ref queueId,
offset: ref offset,
limit: ref limit);

var __pathBuilder = new PathBuilder(
path: $"/api/v1/annotation-queues/{queueId}/runs",
baseUri: HttpClient.BaseAddress);
__pathBuilder
.AddOptionalParameter("offset", offset?.ToString())
.AddOptionalParameter("limit", limit?.ToString())
;
var __path = __pathBuilder.ToString();
using var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
method: global::System.Net.Http.HttpMethod.Get,
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);
PrepareGetRunsFromAnnotationQueueRequest(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
queueId: queueId,
offset: offset,
limit: limit);

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

ProcessResponse(
client: HttpClient,
response: __response);
ProcessGetRunsFromAnnotationQueueResponse(
httpClient: HttpClient,
httpResponseMessage: __response);
// Validation Error
if ((int)__response.StatusCode == 422)
{
string? __content_422 = null;
global::LangSmith.HTTPValidationError? __value_422 = null;
if (ReadResponseAsString)
{
__content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
__value_422 = global::LangSmith.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
}
else
{
var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
__value_422 = await global::LangSmith.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false);
}

throw new global::LangSmith.ApiException<global::LangSmith.HTTPValidationError>(
message: __response.ReasonPhrase ?? string.Empty,
statusCode: __response.StatusCode)
{
ResponseBody = __content_422,
ResponseObject = __value_422,
ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
__response.Headers,
h => h.Key,
h => h.Value),
};
}

if (ReadResponseAsString)
{
var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);

ProcessResponseContent(
client: HttpClient,
response: __response,
content: ref __content);
ProcessGetRunsFromAnnotationQueueResponseContent(
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.RunSchemaWithAnnotationQueueInfo>), JsonSerializerContext) as global::System.Collections.Generic.IList<global::LangSmith.RunSchemaWithAnnotationQueueInfo> ??
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(cancellationToken).ConfigureAwait(false);

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

namespace LangSmith
{
public partial interface IAnnotationQueuesClient
{
/// <summary>
/// Get Runs From Annotation Queue
/// </summary>
/// <param name="queueId"></param>
/// <param name="offset">
/// Default Value: 0
/// </param>
/// <param name="limit">
/// Default Value: 100
/// </param>
/// <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.RunSchemaWithAnnotationQueueInfo>> GetRunsFromAnnotationQueueAsync(
global::System.Guid queueId,
int? offset = default,
int? limit = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
48 changes: 48 additions & 0 deletions src/libs/LangSmith/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6359,6 +6359,54 @@ paths:
- ApiKey: [ ]
- TenantId: [ ]
- BearerAuth: [ ]
get:
tags:
- annotation-queues
summary: Get Runs From Annotation Queue
operationId: get_runs_from_annotation_queue_api_v1_annotation_queues__queue_id__runs_get
parameters:
- name: queue_id
in: path
required: true
schema:
title: Queue Id
type: string
format: uuid
- name: offset
in: query
schema:
title: Offset
minimum: 0
type: integer
default: 0
- name: limit
in: query
schema:
title: Limit
maximum: 100
minimum: 1
type: integer
default: 100
responses:
'200':
description: Successful Response
content:
application/json:
schema:
title: Response Get Runs From Annotation Queue Api V1 Annotation Queues Queue Id Runs Get
type: array
items:
$ref: '#/components/schemas/RunSchemaWithAnnotationQueueInfo'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- ApiKey: [ ]
- TenantId: [ ]
- BearerAuth: [ ]
'/api/v1/annotation-queues/{queue_id}/run/{index}':
get:
tags:
Expand Down

0 comments on commit 9db5e5d

Please sign in to comment.