Skip to content

Commit

Permalink
feat: Updated OpenAPI spec
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jan 12, 2025
1 parent ac53b27 commit 646c220
Show file tree
Hide file tree
Showing 16 changed files with 427 additions and 216 deletions.
432 changes: 218 additions & 214 deletions src/libs/LangSmith/Generated/JsonSerializerContextTypes.g.cs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ partial void ProcessDatasetHandlerResponseContent(
/// <param name="owner"></param>
/// <param name="commit"></param>
/// <param name="evaluatorRules"></param>
/// <param name="requestsPerSecond"></param>
/// <param name="datasetId"></param>
/// <param name="datasetSplits"></param>
/// <param name="repetitions">
Expand All @@ -221,6 +222,7 @@ partial void ProcessDatasetHandlerResponseContent(
string? owner = default,
string? commit = default,
global::System.Collections.Generic.IList<global::System.Guid>? evaluatorRules = default,
int? requestsPerSecond = default,
global::System.Collections.Generic.IList<string>? datasetSplits = default,
int? repetitions = default,
global::System.Threading.CancellationToken cancellationToken = default)
Expand All @@ -240,6 +242,7 @@ partial void ProcessDatasetHandlerResponseContent(
Owner = owner,
Commit = commit,
EvaluatorRules = evaluatorRules,
RequestsPerSecond = requestsPerSecond,
DatasetId = datasetId,
DatasetSplits = datasetSplits,
Repetitions = repetitions,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ partial void ProcessStreamDatasetHandlerResponseContent(
/// <param name="owner"></param>
/// <param name="commit"></param>
/// <param name="evaluatorRules"></param>
/// <param name="requestsPerSecond"></param>
/// <param name="datasetId"></param>
/// <param name="datasetSplits"></param>
/// <param name="repetitions">
Expand All @@ -221,6 +222,7 @@ partial void ProcessStreamDatasetHandlerResponseContent(
string? owner = default,
string? commit = default,
global::System.Collections.Generic.IList<global::System.Guid>? evaluatorRules = default,
int? requestsPerSecond = default,
global::System.Collections.Generic.IList<string>? datasetSplits = default,
int? repetitions = default,
global::System.Threading.CancellationToken cancellationToken = default)
Expand All @@ -240,6 +242,7 @@ partial void ProcessStreamDatasetHandlerResponseContent(
Owner = owner,
Commit = commit,
EvaluatorRules = evaluatorRules,
RequestsPerSecond = requestsPerSecond,
DatasetId = datasetId,
DatasetSplits = datasetSplits,
Repetitions = repetitions,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public partial interface IDatasetsClient
/// <param name="owner"></param>
/// <param name="commit"></param>
/// <param name="evaluatorRules"></param>
/// <param name="requestsPerSecond"></param>
/// <param name="datasetId"></param>
/// <param name="datasetSplits"></param>
/// <param name="repetitions">
Expand All @@ -54,6 +55,7 @@ public partial interface IDatasetsClient
string? owner = default,
string? commit = default,
global::System.Collections.Generic.IList<global::System.Guid>? evaluatorRules = default,
int? requestsPerSecond = default,
global::System.Collections.Generic.IList<string>? datasetSplits = default,
int? repetitions = default,
global::System.Threading.CancellationToken cancellationToken = default);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public partial interface IDatasetsClient
/// <param name="owner"></param>
/// <param name="commit"></param>
/// <param name="evaluatorRules"></param>
/// <param name="requestsPerSecond"></param>
/// <param name="datasetId"></param>
/// <param name="datasetSplits"></param>
/// <param name="repetitions">
Expand All @@ -54,6 +55,7 @@ public partial interface IDatasetsClient
string? owner = default,
string? commit = default,
global::System.Collections.Generic.IList<global::System.Guid>? evaluatorRules = default,
int? requestsPerSecond = default,
global::System.Collections.Generic.IList<string>? datasetSplits = default,
int? repetitions = default,
global::System.Threading.CancellationToken cancellationToken = default);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@ public partial interface IPlaygroundSettingsClient
/// <param name="name"></param>
/// <param name="description"></param>
/// <param name="settings"></param>
/// <param name="options"></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.PlaygroundSettingsResponse> CreatePlaygroundSettingsAsync(
object settings,
string? name = default,
string? description = default,
global::LangSmith.PlaygroundSavedOptions? options = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,15 @@ public partial interface IPlaygroundSettingsClient
/// <param name="name"></param>
/// <param name="description"></param>
/// <param name="settings"></param>
/// <param name="options"></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.PlaygroundSettingsResponse> UpdatePlaygroundSettingsAsync(
string playgroundSettingsId,
string? name = default,
string? description = default,
object? settings = default,
global::LangSmith.PlaygroundSavedOptions? options = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ public sealed partial class PlaygroundRunOverDatasetRequestSchema
[global::System.Text.Json.Serialization.JsonPropertyName("evaluator_rules")]
public global::System.Collections.Generic.IList<global::System.Guid>? EvaluatorRules { get; set; }

/// <summary>
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("requests_per_second")]
public int? RequestsPerSecond { get; set; }

/// <summary>
///
/// </summary>
Expand Down Expand Up @@ -133,6 +139,7 @@ public sealed partial class PlaygroundRunOverDatasetRequestSchema
/// <param name="owner"></param>
/// <param name="commit"></param>
/// <param name="evaluatorRules"></param>
/// <param name="requestsPerSecond"></param>
/// <param name="datasetId"></param>
/// <param name="datasetSplits"></param>
/// <param name="repetitions">
Expand All @@ -154,6 +161,7 @@ public PlaygroundRunOverDatasetRequestSchema(
string? owner,
string? commit,
global::System.Collections.Generic.IList<global::System.Guid>? evaluatorRules,
int? requestsPerSecond,
global::System.Collections.Generic.IList<string>? datasetSplits,
int? repetitions)
{
Expand All @@ -171,6 +179,7 @@ public PlaygroundRunOverDatasetRequestSchema(
this.Owner = owner;
this.Commit = commit;
this.EvaluatorRules = evaluatorRules;
this.RequestsPerSecond = requestsPerSecond;
this.DatasetSplits = datasetSplits;
this.Repetitions = repetitions;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
#nullable enable

namespace LangSmith
{
public sealed partial class PlaygroundSavedOptions
{
/// <summary>
/// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
/// </summary>
public string ToJson(
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return global::System.Text.Json.JsonSerializer.Serialize(
this,
this.GetType(),
jsonSerializerContext);
}

/// <summary>
/// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
/// </summary>
#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);
}

/// <summary>
/// Deserializes a JSON string using the provided JsonSerializerContext.
/// </summary>
public static global::LangSmith.PlaygroundSavedOptions? FromJson(
string json,
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return global::System.Text.Json.JsonSerializer.Deserialize(
json,
typeof(global::LangSmith.PlaygroundSavedOptions),
jsonSerializerContext) as global::LangSmith.PlaygroundSavedOptions;
}

/// <summary>
/// Deserializes a JSON string using the provided JsonSerializerOptions.
/// </summary>
#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::LangSmith.PlaygroundSavedOptions? FromJson(
string json,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
return global::System.Text.Json.JsonSerializer.Deserialize<global::LangSmith.PlaygroundSavedOptions>(
json,
jsonSerializerOptions);
}

/// <summary>
/// Deserializes a JSON stream using the provided JsonSerializerContext.
/// </summary>
public static async global::System.Threading.Tasks.ValueTask<global::LangSmith.PlaygroundSavedOptions?> FromJsonStreamAsync(
global::System.IO.Stream jsonStream,
global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
{
return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
jsonStream,
typeof(global::LangSmith.PlaygroundSavedOptions),
jsonSerializerContext).ConfigureAwait(false)) as global::LangSmith.PlaygroundSavedOptions;
}

/// <summary>
/// Deserializes a JSON stream using the provided JsonSerializerOptions.
/// </summary>
#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<global::LangSmith.PlaygroundSavedOptions?> FromJsonStreamAsync(
global::System.IO.Stream jsonStream,
global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
{
return global::System.Text.Json.JsonSerializer.DeserializeAsync<global::LangSmith.PlaygroundSavedOptions?>(
jsonStream,
jsonSerializerOptions);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@

#nullable enable

namespace LangSmith
{
/// <summary>
///
/// </summary>
public sealed partial class PlaygroundSavedOptions
{
/// <summary>
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("requests_per_second")]
public int? RequestsPerSecond { get; set; }

/// <summary>
/// Additional properties that are not explicitly defined in the schema
/// </summary>
[global::System.Text.Json.Serialization.JsonExtensionData]
public global::System.Collections.Generic.IDictionary<string, object> AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary<string, object>();

/// <summary>
/// Initializes a new instance of the <see cref="PlaygroundSavedOptions" /> class.
/// </summary>
/// <param name="requestsPerSecond"></param>
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
public PlaygroundSavedOptions(
int? requestsPerSecond)
{
this.RequestsPerSecond = requestsPerSecond;
}

/// <summary>
/// Initializes a new instance of the <see cref="PlaygroundSavedOptions" /> class.
/// </summary>
public PlaygroundSavedOptions()
{
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ public sealed partial class PlaygroundSettingsCreateRequest
[global::System.Text.Json.Serialization.JsonRequired]
public required object Settings { get; set; }

/// <summary>
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("options")]
public global::LangSmith.PlaygroundSavedOptions? Options { get; set; }

/// <summary>
/// Additional properties that are not explicitly defined in the schema
/// </summary>
Expand All @@ -39,15 +45,18 @@ public sealed partial class PlaygroundSettingsCreateRequest
/// <param name="name"></param>
/// <param name="description"></param>
/// <param name="settings"></param>
/// <param name="options"></param>
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
public PlaygroundSettingsCreateRequest(
object settings,
string? name,
string? description)
string? description,
global::LangSmith.PlaygroundSavedOptions? options)
{
this.Settings = settings ?? throw new global::System.ArgumentNullException(nameof(settings));
this.Name = name;
this.Description = description;
this.Options = options;
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ public sealed partial class PlaygroundSettingsResponse
[global::System.Text.Json.Serialization.JsonRequired]
public required object Settings { get; set; }

/// <summary>
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("options")]
public global::LangSmith.PlaygroundSavedOptions? Options { get; set; }

/// <summary>
///
/// </summary>
Expand Down Expand Up @@ -59,6 +65,7 @@ public sealed partial class PlaygroundSettingsResponse
/// </summary>
/// <param name="id"></param>
/// <param name="settings"></param>
/// <param name="options"></param>
/// <param name="name"></param>
/// <param name="createdAt"></param>
/// <param name="updatedAt"></param>
Expand All @@ -69,13 +76,15 @@ public PlaygroundSettingsResponse(
object settings,
global::System.DateTime createdAt,
global::System.DateTime updatedAt,
global::LangSmith.PlaygroundSavedOptions? options,
string? name,
string? description)
{
this.Id = id;
this.Settings = settings ?? throw new global::System.ArgumentNullException(nameof(settings));
this.CreatedAt = createdAt;
this.UpdatedAt = updatedAt;
this.Options = options;
this.Name = name;
this.Description = description;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ public sealed partial class PlaygroundSettingsUpdateRequest
[global::System.Text.Json.Serialization.JsonPropertyName("settings")]
public object? Settings { get; set; }

/// <summary>
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("options")]
public global::LangSmith.PlaygroundSavedOptions? Options { get; set; }

/// <summary>
/// Additional properties that are not explicitly defined in the schema
/// </summary>
Expand All @@ -38,15 +44,18 @@ public sealed partial class PlaygroundSettingsUpdateRequest
/// <param name="name"></param>
/// <param name="description"></param>
/// <param name="settings"></param>
/// <param name="options"></param>
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
public PlaygroundSettingsUpdateRequest(
string? name,
string? description,
object? settings)
object? settings,
global::LangSmith.PlaygroundSavedOptions? options)
{
this.Name = name;
this.Description = description;
this.Settings = settings;
this.Options = options;
}

/// <summary>
Expand Down
Loading

0 comments on commit 646c220

Please sign in to comment.