Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat:Update openapi.yaml: add session_id, start_time, and skip_prev_cursor #187

Merged
merged 1 commit into from
Feb 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ public partial interface IPublicClient
/// <param name="order">
/// Enum for run start date order.
/// </param>
/// <param name="skipPrevCursor">
/// Default Value: false
/// </param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
global::System.Threading.Tasks.Task<global::LangSmith.ListPublicDatasetRunsResponse> QuerySharedDatasetRunsAsync(
Expand All @@ -78,6 +81,7 @@ public partial interface IPublicClient
int? limit = default,
global::System.Collections.Generic.IList<global::LangSmith.RunSelect>? select = default,
global::LangSmith.RunDateOrder? order = default,
bool? skipPrevCursor = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ public partial interface IRunClient
/// <param name="order">
/// Enum for run start date order.
/// </param>
/// <param name="skipPrevCursor">
/// Default Value: false
/// </param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
global::System.Threading.Tasks.Task<global::LangSmith.ListRunsResponse> QueryRunsAsync(
Expand All @@ -72,6 +75,7 @@ public partial interface IRunClient
int? limit = default,
global::System.Collections.Generic.IList<global::LangSmith.RunSelect>? select = default,
global::LangSmith.RunDateOrder? order = default,
bool? skipPrevCursor = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ public partial interface IRunClient
/// Get a specific run.
/// </summary>
/// <param name="runId"></param>
/// <param name="sessionId"></param>
/// <param name="startTime"></param>
/// <param name="excludeS3StoredAttributes">
/// Default Value: false
/// </param>
Expand All @@ -19,6 +21,8 @@ public partial interface IRunClient
/// <exception cref="global::LangSmith.ApiException"></exception>
global::System.Threading.Tasks.Task<global::LangSmith.RunSchema> ReadRunAsync(
global::System.Guid runId,
global::System.Guid? sessionId = default,
global::System.DateTime? startTime = default,
bool? excludeS3StoredAttributes = default,
bool? excludeSerialized = default,
global::System.Threading.CancellationToken cancellationToken = default);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,12 @@ public sealed partial class BodyParamsForRunSchema
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::LangSmith.JsonConverters.RunDateOrderJsonConverter))]
public global::LangSmith.RunDateOrder? Order { get; set; }

/// <summary>
/// Default Value: false
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("skip_prev_cursor")]
public bool? SkipPrevCursor { get; set; }

/// <summary>
/// Additional properties that are not explicitly defined in the schema
/// </summary>
Expand Down Expand Up @@ -177,6 +183,9 @@ public sealed partial class BodyParamsForRunSchema
/// <param name="order">
/// Enum for run start date order.
/// </param>
/// <param name="skipPrevCursor">
/// Default Value: false
/// </param>
#if NET7_0_OR_GREATER
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
Expand All @@ -201,7 +210,8 @@ public BodyParamsForRunSchema(
string? cursor,
int? limit,
global::System.Collections.Generic.IList<global::LangSmith.RunSelect>? select,
global::LangSmith.RunDateOrder? order)
global::LangSmith.RunDateOrder? order,
bool? skipPrevCursor)
{
this.Id = id;
this.Trace = trace;
Expand All @@ -224,6 +234,7 @@ public BodyParamsForRunSchema(
this.Limit = limit;
this.Select = select;
this.Order = order;
this.SkipPrevCursor = skipPrevCursor;
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,9 @@ partial void ProcessQuerySharedDatasetRunsResponseContent(
/// <param name="order">
/// Enum for run start date order.
/// </param>
/// <param name="skipPrevCursor">
/// Default Value: false
/// </param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
public async global::System.Threading.Tasks.Task<global::LangSmith.ListPublicDatasetRunsResponse> QuerySharedDatasetRunsAsync(
Expand All @@ -261,6 +264,7 @@ partial void ProcessQuerySharedDatasetRunsResponseContent(
int? limit = default,
global::System.Collections.Generic.IList<global::LangSmith.RunSelect>? select = default,
global::LangSmith.RunDateOrder? order = default,
bool? skipPrevCursor = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
var __request = new global::LangSmith.BodyParamsForRunSchema
Expand All @@ -286,6 +290,7 @@ partial void ProcessQuerySharedDatasetRunsResponseContent(
Limit = limit,
Select = select,
Order = order,
SkipPrevCursor = skipPrevCursor,
};

return await QuerySharedDatasetRunsAsync(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,9 @@ partial void ProcessQueryRunsResponseContent(
/// <param name="order">
/// Enum for run start date order.
/// </param>
/// <param name="skipPrevCursor">
/// Default Value: false
/// </param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
public async global::System.Threading.Tasks.Task<global::LangSmith.ListRunsResponse> QueryRunsAsync(
Expand All @@ -251,6 +254,7 @@ partial void ProcessQueryRunsResponseContent(
int? limit = default,
global::System.Collections.Generic.IList<global::LangSmith.RunSelect>? select = default,
global::LangSmith.RunDateOrder? order = default,
bool? skipPrevCursor = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
var __request = new global::LangSmith.BodyParamsForRunSchema
Expand All @@ -276,6 +280,7 @@ partial void ProcessQueryRunsResponseContent(
Limit = limit,
Select = select,
Order = order,
SkipPrevCursor = skipPrevCursor,
};

return await QueryRunsAsync(
Expand Down
14 changes: 14 additions & 0 deletions src/libs/LangSmith/Generated/LangSmith.RunClient.ReadRun.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,16 @@ public partial class RunClient
partial void PrepareReadRunArguments(
global::System.Net.Http.HttpClient httpClient,
ref global::System.Guid runId,
ref global::System.Guid? sessionId,
ref global::System.DateTime? startTime,
ref bool? excludeS3StoredAttributes,
ref bool? excludeSerialized);
partial void PrepareReadRunRequest(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpRequestMessage httpRequestMessage,
global::System.Guid runId,
global::System.Guid? sessionId,
global::System.DateTime? startTime,
bool? excludeS3StoredAttributes,
bool? excludeSerialized);
partial void ProcessReadRunResponse(
Expand All @@ -30,6 +34,8 @@ partial void ProcessReadRunResponseContent(
/// Get a specific run.
/// </summary>
/// <param name="runId"></param>
/// <param name="sessionId"></param>
/// <param name="startTime"></param>
/// <param name="excludeS3StoredAttributes">
/// Default Value: false
/// </param>
Expand All @@ -40,6 +46,8 @@ partial void ProcessReadRunResponseContent(
/// <exception cref="global::LangSmith.ApiException"></exception>
public async global::System.Threading.Tasks.Task<global::LangSmith.RunSchema> ReadRunAsync(
global::System.Guid runId,
global::System.Guid? sessionId = default,
global::System.DateTime? startTime = default,
bool? excludeS3StoredAttributes = default,
bool? excludeSerialized = default,
global::System.Threading.CancellationToken cancellationToken = default)
Expand All @@ -49,13 +57,17 @@ partial void ProcessReadRunResponseContent(
PrepareReadRunArguments(
httpClient: HttpClient,
runId: ref runId,
sessionId: ref sessionId,
startTime: ref startTime,
excludeS3StoredAttributes: ref excludeS3StoredAttributes,
excludeSerialized: ref excludeSerialized);

var __pathBuilder = new PathBuilder(
path: $"/api/v1/runs/{runId}",
baseUri: HttpClient.BaseAddress);
__pathBuilder
.AddOptionalParameter("session_id", sessionId?.ToString())
.AddOptionalParameter("start_time", startTime?.ToString("yyyy-MM-ddTHH:mm:ssZ"))
.AddOptionalParameter("exclude_s3_stored_attributes", excludeS3StoredAttributes?.ToString())
.AddOptionalParameter("exclude_serialized", excludeSerialized?.ToString())
;
Expand Down Expand Up @@ -91,6 +103,8 @@ partial void ProcessReadRunResponseContent(
httpClient: HttpClient,
httpRequestMessage: __httpRequest,
runId: runId,
sessionId: sessionId,
startTime: startTime,
excludeS3StoredAttributes: excludeS3StoredAttributes,
excludeSerialized: excludeSerialized);

Expand Down
20 changes: 18 additions & 2 deletions src/libs/LangSmith/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4321,6 +4321,20 @@ paths:
title: Run Id
type: string
format: uuid
- name: session_id
in: query
schema:
title: Session Id
type: string
format: uuid
nullable: true
- name: start_time
in: query
schema:
title: Start Time
type: string
format: date-time
nullable: true
- name: exclude_s3_stored_attributes
in: query
schema:
Expand Down Expand Up @@ -12750,6 +12764,10 @@ components:
- thread_id
order:
$ref: '#/components/schemas/RunDateOrder'
skip_prev_cursor:
title: Skip Prev Cursor
type: boolean
default: false
description: Query params for run endpoints.
Body_clone_dataset_api_v1_datasets_clone_post:
title: Body_clone_dataset_api_v1_datasets_clone_post
Expand Down Expand Up @@ -18299,7 +18317,6 @@ components:
default: 0
limit:
title: Limit
maximum: 100.0
minimum: 1.0
type: integer
default: 10
Expand Down Expand Up @@ -18394,7 +18411,6 @@ components:
default: 0
limit:
title: Limit
maximum: 100.0
minimum: 1.0
type: integer
default: 10
Expand Down
Loading