Skip to content

Commit

Permalink
Merge pull request #121 from tryAGI/bot/update-openapi_202411041825
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Nov 4, 2024
2 parents e2085d5 + 4fd135b commit 6074034
Show file tree
Hide file tree
Showing 28 changed files with 508 additions and 1,399 deletions.
708 changes: 350 additions & 358 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 @@ -141,7 +141,7 @@ partial void ProcessUpdateDatasetResponseContent(
global::LangSmith.AnyOf<object, global::LangSmith.Missing>? inputsSchemaDefinition = default,
global::LangSmith.AnyOf<object, global::LangSmith.Missing>? outputsSchemaDefinition = default,
global::System.Collections.Generic.Dictionary<string, global::LangSmith.ExampleUpdate>? patchExamples = default,
global::System.Collections.Generic.IList<global::LangSmith.DatasetTransformation>? transformations = default,
global::LangSmith.AnyOf<global::System.Collections.Generic.IList<global::LangSmith.DatasetTransformation>, global::LangSmith.Missing>? transformations = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
var __request = new global::LangSmith.DatasetUpdate
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@ namespace LangSmith
public partial class ExamplesClient
{
partial void PrepareCreateExampleArguments(
global::System.Net.Http.HttpClient httpClient,
global::LangSmith.ExampleCreate request);
global::System.Net.Http.HttpClient httpClient);
partial void PrepareCreateExampleRequest(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpRequestMessage httpRequestMessage,
global::LangSmith.ExampleCreate request);
global::System.Net.Http.HttpRequestMessage httpRequestMessage);
partial void ProcessCreateExampleResponse(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage);
Expand All @@ -25,20 +23,15 @@ partial void ProcessCreateExampleResponseContent(
/// Create Example<br/>
/// Create a new example.
/// </summary>
/// <param name="request"></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.Example> CreateExampleAsync(
global::LangSmith.ExampleCreate request,
global::System.Threading.CancellationToken cancellationToken = default)
{
request = request ?? throw new global::System.ArgumentNullException(nameof(request));

PrepareArguments(
client: HttpClient);
PrepareCreateExampleArguments(
httpClient: HttpClient,
request: request);
httpClient: HttpClient);

var __pathBuilder = new PathBuilder(
path: "/api/v1/examples",
Expand All @@ -63,20 +56,13 @@ partial void ProcessCreateExampleResponseContent(
__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;

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

using var __response = await HttpClient.SendAsync(
request: __httpRequest,
Expand Down Expand Up @@ -114,54 +100,5 @@ partial void ProcessCreateExampleResponseContent(
global::LangSmith.Example.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}

/// <summary>
/// Create Example<br/>
/// Create a new example.
/// </summary>
/// <param name="outputs"></param>
/// <param name="datasetId"></param>
/// <param name="sourceRunId"></param>
/// <param name="metadata"></param>
/// <param name="inputs"></param>
/// <param name="split">
/// Default Value: base
/// </param>
/// <param name="id"></param>
/// <param name="useSourceRunIo">
/// Default Value: false
/// </param>
/// <param name="createdAt"></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.Example> CreateExampleAsync(
global::System.Guid datasetId,
object? outputs = default,
global::System.Guid? sourceRunId = default,
object? metadata = default,
object? inputs = default,
global::LangSmith.AnyOf<global::System.Collections.Generic.IList<string>, string>? split = default,
global::System.Guid? id = default,
bool? useSourceRunIo = default,
global::System.DateTime? createdAt = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
var __request = new global::LangSmith.ExampleCreate
{
Outputs = outputs,
DatasetId = datasetId,
SourceRunId = sourceRunId,
Metadata = metadata,
Inputs = inputs,
Split = split,
Id = id,
UseSourceRunIo = useSourceRunIo,
CreatedAt = createdAt,
};

return await CreateExampleAsync(
request: __request,
cancellationToken: cancellationToken).ConfigureAwait(false);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@ namespace LangSmith
public partial class ExamplesClient
{
partial void PrepareCreateExamplesArguments(
global::System.Net.Http.HttpClient httpClient,
global::System.Collections.Generic.IList<global::LangSmith.ExampleBulkCreate> request);
global::System.Net.Http.HttpClient httpClient);
partial void PrepareCreateExamplesRequest(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpRequestMessage httpRequestMessage,
global::System.Collections.Generic.IList<global::LangSmith.ExampleBulkCreate> request);
global::System.Net.Http.HttpRequestMessage httpRequestMessage);
partial void ProcessCreateExamplesResponse(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage);
Expand All @@ -25,20 +23,15 @@ partial void ProcessCreateExamplesResponseContent(
/// Create Examples<br/>
/// Create a new example.
/// </summary>
/// <param name="request"></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::System.Collections.Generic.IList<global::LangSmith.Example>> CreateExamplesAsync(
global::System.Collections.Generic.IList<global::LangSmith.ExampleBulkCreate> request,
public async global::System.Threading.Tasks.Task<string> CreateExamplesAsync(
global::System.Threading.CancellationToken cancellationToken = default)
{
request = request ?? throw new global::System.ArgumentNullException(nameof(request));

PrepareArguments(
client: HttpClient);
PrepareCreateExamplesArguments(
httpClient: HttpClient,
request: request);
httpClient: HttpClient);

var __pathBuilder = new PathBuilder(
path: "/api/v1/examples/bulk",
Expand All @@ -63,20 +56,13 @@ partial void ProcessCreateExamplesResponseContent(
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
}
}
var __httpRequestContentBody = global::System.Text.Json.JsonSerializer.Serialize(request, request.GetType(), JsonSerializerContext);
var __httpRequestContent = new global::System.Net.Http.StringContent(
content: __httpRequestContentBody,
encoding: global::System.Text.Encoding.UTF8,
mediaType: "application/json");
__httpRequest.Content = __httpRequestContent;

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

using var __response = await HttpClient.SendAsync(
request: __httpRequest,
Expand Down Expand Up @@ -110,9 +96,7 @@ partial void ProcessCreateExamplesResponseContent(
throw new global::System.InvalidOperationException(__content, __ex);
}

return
global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList<global::LangSmith.Example>), JsonSerializerContext) as global::System.Collections.Generic.IList<global::LangSmith.Example> ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
return __content;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@ namespace LangSmith
public partial class ExamplesClient
{
partial void PrepareValidateExampleArguments(
global::System.Net.Http.HttpClient httpClient,
global::LangSmith.ExampleCreate request);
global::System.Net.Http.HttpClient httpClient);
partial void PrepareValidateExampleRequest(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpRequestMessage httpRequestMessage,
global::LangSmith.ExampleCreate request);
global::System.Net.Http.HttpRequestMessage httpRequestMessage);
partial void ProcessValidateExampleResponse(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage);
Expand All @@ -25,20 +23,15 @@ partial void ProcessValidateExampleResponseContent(
/// Validate Example<br/>
/// Validate an example.
/// </summary>
/// <param name="request"></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.ExampleValidationResult> ValidateExampleAsync(
global::LangSmith.ExampleCreate request,
global::System.Threading.CancellationToken cancellationToken = default)
{
request = request ?? throw new global::System.ArgumentNullException(nameof(request));

PrepareArguments(
client: HttpClient);
PrepareValidateExampleArguments(
httpClient: HttpClient,
request: request);
httpClient: HttpClient);

var __pathBuilder = new PathBuilder(
path: "/api/v1/examples/validate",
Expand All @@ -63,20 +56,13 @@ partial void ProcessValidateExampleResponseContent(
__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;

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

using var __response = await HttpClient.SendAsync(
request: __httpRequest,
Expand Down Expand Up @@ -114,54 +100,5 @@ partial void ProcessValidateExampleResponseContent(
global::LangSmith.ExampleValidationResult.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
}

/// <summary>
/// Validate Example<br/>
/// Validate an example.
/// </summary>
/// <param name="outputs"></param>
/// <param name="datasetId"></param>
/// <param name="sourceRunId"></param>
/// <param name="metadata"></param>
/// <param name="inputs"></param>
/// <param name="split">
/// Default Value: base
/// </param>
/// <param name="id"></param>
/// <param name="useSourceRunIo">
/// Default Value: false
/// </param>
/// <param name="createdAt"></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.ExampleValidationResult> ValidateExampleAsync(
global::System.Guid datasetId,
object? outputs = default,
global::System.Guid? sourceRunId = default,
object? metadata = default,
object? inputs = default,
global::LangSmith.AnyOf<global::System.Collections.Generic.IList<string>, string>? split = default,
global::System.Guid? id = default,
bool? useSourceRunIo = default,
global::System.DateTime? createdAt = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
var __request = new global::LangSmith.ExampleCreate
{
Outputs = outputs,
DatasetId = datasetId,
SourceRunId = sourceRunId,
Metadata = metadata,
Inputs = inputs,
Split = split,
Id = id,
UseSourceRunIo = useSourceRunIo,
CreatedAt = createdAt,
};

return await ValidateExampleAsync(
request: __request,
cancellationToken: cancellationToken).ConfigureAwait(false);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public partial interface IDatasetsClient
global::LangSmith.AnyOf<object, global::LangSmith.Missing>? inputsSchemaDefinition = default,
global::LangSmith.AnyOf<object, global::LangSmith.Missing>? outputsSchemaDefinition = default,
global::System.Collections.Generic.Dictionary<string, global::LangSmith.ExampleUpdate>? patchExamples = default,
global::System.Collections.Generic.IList<global::LangSmith.DatasetTransformation>? transformations = default,
global::LangSmith.AnyOf<global::System.Collections.Generic.IList<global::LangSmith.DatasetTransformation>, global::LangSmith.Missing>? transformations = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,42 +8,9 @@ public partial interface IExamplesClient
/// Create Example<br/>
/// Create a new example.
/// </summary>
/// <param name="request"></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.Example> CreateExampleAsync(
global::LangSmith.ExampleCreate request,
global::System.Threading.CancellationToken cancellationToken = default);

/// <summary>
/// Create Example<br/>
/// Create a new example.
/// </summary>
/// <param name="outputs"></param>
/// <param name="datasetId"></param>
/// <param name="sourceRunId"></param>
/// <param name="metadata"></param>
/// <param name="inputs"></param>
/// <param name="split">
/// Default Value: base
/// </param>
/// <param name="id"></param>
/// <param name="useSourceRunIo">
/// Default Value: false
/// </param>
/// <param name="createdAt"></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.Example> CreateExampleAsync(
global::System.Guid datasetId,
object? outputs = default,
global::System.Guid? sourceRunId = default,
object? metadata = default,
object? inputs = default,
global::LangSmith.AnyOf<global::System.Collections.Generic.IList<string>, string>? split = default,
global::System.Guid? id = default,
bool? useSourceRunIo = default,
global::System.DateTime? createdAt = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@ public partial interface IExamplesClient
/// Create Examples<br/>
/// Create a new example.
/// </summary>
/// <param name="request"></param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
global::System.Threading.Tasks.Task<global::System.Collections.Generic.IList<global::LangSmith.Example>> CreateExamplesAsync(
global::System.Collections.Generic.IList<global::LangSmith.ExampleBulkCreate> request,
global::System.Threading.Tasks.Task<string> CreateExamplesAsync(
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Loading

0 comments on commit 6074034

Please sign in to comment.