Skip to content

Commit 4dc20d5

Browse files
author
github-actions[bot]
committed
feat: Updated OpenAPI spec
1 parent 0fa8213 commit 4dc20d5

12 files changed

+1045
-346
lines changed

src/libs/LangSmith/Generated/JsonSerializerContextTypes.g.cs

Lines changed: 350 additions & 346 deletions
Large diffs are not rendered by default.

src/libs/LangSmith/Generated/LangSmith.ExamplesClient.UpdateExample.g.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,9 @@ partial void ProcessUpdateExampleResponseContent(
129129
/// <param name="outputs"></param>
130130
/// <param name="metadata"></param>
131131
/// <param name="split"></param>
132+
/// <param name="overwrite">
133+
/// Default Value: false
134+
/// </param>
132135
/// <param name="cancellationToken">The token to cancel the operation with</param>
133136
/// <exception cref="global::System.InvalidOperationException"></exception>
134137
public async global::System.Threading.Tasks.Task<string> UpdateExampleAsync(
@@ -138,6 +141,7 @@ partial void ProcessUpdateExampleResponseContent(
138141
object? outputs = default,
139142
object? metadata = default,
140143
global::LangSmith.AnyOf<global::System.Collections.Generic.IList<string>, string>? split = default,
144+
bool? overwrite = default,
141145
global::System.Threading.CancellationToken cancellationToken = default)
142146
{
143147
var __request = new global::LangSmith.ExampleUpdate
@@ -147,6 +151,7 @@ partial void ProcessUpdateExampleResponseContent(
147151
Outputs = outputs,
148152
Metadata = metadata,
149153
Split = split,
154+
Overwrite = overwrite,
150155
};
151156

152157
return await UpdateExampleAsync(
Lines changed: 167 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
2+
#nullable enable
3+
4+
namespace LangSmith
5+
{
6+
public partial class ExamplesClient
7+
{
8+
partial void PrepareValidateExampleArguments(
9+
global::System.Net.Http.HttpClient httpClient,
10+
global::LangSmith.ExampleCreate request);
11+
partial void PrepareValidateExampleRequest(
12+
global::System.Net.Http.HttpClient httpClient,
13+
global::System.Net.Http.HttpRequestMessage httpRequestMessage,
14+
global::LangSmith.ExampleCreate request);
15+
partial void ProcessValidateExampleResponse(
16+
global::System.Net.Http.HttpClient httpClient,
17+
global::System.Net.Http.HttpResponseMessage httpResponseMessage);
18+
19+
partial void ProcessValidateExampleResponseContent(
20+
global::System.Net.Http.HttpClient httpClient,
21+
global::System.Net.Http.HttpResponseMessage httpResponseMessage,
22+
ref string content);
23+
24+
/// <summary>
25+
/// Validate Example<br/>
26+
/// Validate an example.
27+
/// </summary>
28+
/// <param name="request"></param>
29+
/// <param name="cancellationToken">The token to cancel the operation with</param>
30+
/// <exception cref="global::System.InvalidOperationException"></exception>
31+
public async global::System.Threading.Tasks.Task<global::LangSmith.ExampleValidationResult> ValidateExampleAsync(
32+
global::LangSmith.ExampleCreate request,
33+
global::System.Threading.CancellationToken cancellationToken = default)
34+
{
35+
request = request ?? throw new global::System.ArgumentNullException(nameof(request));
36+
37+
PrepareArguments(
38+
client: HttpClient);
39+
PrepareValidateExampleArguments(
40+
httpClient: HttpClient,
41+
request: request);
42+
43+
var __pathBuilder = new PathBuilder(
44+
path: "/api/v1/examples/validate",
45+
baseUri: HttpClient.BaseAddress);
46+
var __path = __pathBuilder.ToString();
47+
using var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
48+
method: global::System.Net.Http.HttpMethod.Post,
49+
requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
50+
51+
foreach (var __authorization in Authorizations)
52+
{
53+
if (__authorization.Type == "Http" ||
54+
__authorization.Type == "OAuth2")
55+
{
56+
__httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
57+
scheme: __authorization.Name,
58+
parameter: __authorization.Value);
59+
}
60+
else if (__authorization.Type == "ApiKey" &&
61+
__authorization.Location == "Header")
62+
{
63+
__httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
64+
}
65+
}
66+
var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
67+
var __httpRequestContent = new global::System.Net.Http.StringContent(
68+
content: __httpRequestContentBody,
69+
encoding: global::System.Text.Encoding.UTF8,
70+
mediaType: "application/json");
71+
__httpRequest.Content = __httpRequestContent;
72+
73+
PrepareRequest(
74+
client: HttpClient,
75+
request: __httpRequest);
76+
PrepareValidateExampleRequest(
77+
httpClient: HttpClient,
78+
httpRequestMessage: __httpRequest,
79+
request: request);
80+
81+
using var __response = await HttpClient.SendAsync(
82+
request: __httpRequest,
83+
completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
84+
cancellationToken: cancellationToken).ConfigureAwait(false);
85+
86+
ProcessResponse(
87+
client: HttpClient,
88+
response: __response);
89+
ProcessValidateExampleResponse(
90+
httpClient: HttpClient,
91+
httpResponseMessage: __response);
92+
93+
var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
94+
95+
ProcessResponseContent(
96+
client: HttpClient,
97+
response: __response,
98+
content: ref __content);
99+
ProcessValidateExampleResponseContent(
100+
httpClient: HttpClient,
101+
httpResponseMessage: __response,
102+
content: ref __content);
103+
104+
try
105+
{
106+
__response.EnsureSuccessStatusCode();
107+
}
108+
catch (global::System.Net.Http.HttpRequestException __ex)
109+
{
110+
throw new global::System.InvalidOperationException(__content, __ex);
111+
}
112+
113+
return
114+
global::LangSmith.ExampleValidationResult.FromJson(__content, JsonSerializerContext) ??
115+
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
116+
}
117+
118+
/// <summary>
119+
/// Validate Example<br/>
120+
/// Validate an example.
121+
/// </summary>
122+
/// <param name="outputs"></param>
123+
/// <param name="datasetId"></param>
124+
/// <param name="sourceRunId"></param>
125+
/// <param name="metadata"></param>
126+
/// <param name="inputs"></param>
127+
/// <param name="split">
128+
/// Default Value: base
129+
/// </param>
130+
/// <param name="id"></param>
131+
/// <param name="useSourceRunIo">
132+
/// Default Value: false
133+
/// </param>
134+
/// <param name="createdAt"></param>
135+
/// <param name="cancellationToken">The token to cancel the operation with</param>
136+
/// <exception cref="global::System.InvalidOperationException"></exception>
137+
public async global::System.Threading.Tasks.Task<global::LangSmith.ExampleValidationResult> ValidateExampleAsync(
138+
global::System.Guid datasetId,
139+
object? outputs = default,
140+
global::System.Guid? sourceRunId = default,
141+
object? metadata = default,
142+
object? inputs = default,
143+
global::LangSmith.AnyOf<global::System.Collections.Generic.IList<string>, string>? split = default,
144+
global::System.Guid? id = default,
145+
bool? useSourceRunIo = default,
146+
global::System.DateTime? createdAt = default,
147+
global::System.Threading.CancellationToken cancellationToken = default)
148+
{
149+
var __request = new global::LangSmith.ExampleCreate
150+
{
151+
Outputs = outputs,
152+
DatasetId = datasetId,
153+
SourceRunId = sourceRunId,
154+
Metadata = metadata,
155+
Inputs = inputs,
156+
Split = split,
157+
Id = id,
158+
UseSourceRunIo = useSourceRunIo,
159+
CreatedAt = createdAt,
160+
};
161+
162+
return await ValidateExampleAsync(
163+
request: __request,
164+
cancellationToken: cancellationToken).ConfigureAwait(false);
165+
}
166+
}
167+
}

src/libs/LangSmith/Generated/LangSmith.IExamplesClient.UpdateExample.g.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ public partial interface IExamplesClient
2727
/// <param name="outputs"></param>
2828
/// <param name="metadata"></param>
2929
/// <param name="split"></param>
30+
/// <param name="overwrite">
31+
/// Default Value: false
32+
/// </param>
3033
/// <param name="cancellationToken">The token to cancel the operation with</param>
3134
/// <exception cref="global::System.InvalidOperationException"></exception>
3235
global::System.Threading.Tasks.Task<string> UpdateExampleAsync(
@@ -36,6 +39,7 @@ public partial interface IExamplesClient
3639
object? outputs = default,
3740
object? metadata = default,
3841
global::LangSmith.AnyOf<global::System.Collections.Generic.IList<string>, string>? split = default,
42+
bool? overwrite = default,
3943
global::System.Threading.CancellationToken cancellationToken = default);
4044
}
4145
}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#nullable enable
2+
3+
namespace LangSmith
4+
{
5+
public partial interface IExamplesClient
6+
{
7+
/// <summary>
8+
/// Validate Example<br/>
9+
/// Validate an example.
10+
/// </summary>
11+
/// <param name="request"></param>
12+
/// <param name="cancellationToken">The token to cancel the operation with</param>
13+
/// <exception cref="global::System.InvalidOperationException"></exception>
14+
global::System.Threading.Tasks.Task<global::LangSmith.ExampleValidationResult> ValidateExampleAsync(
15+
global::LangSmith.ExampleCreate request,
16+
global::System.Threading.CancellationToken cancellationToken = default);
17+
18+
/// <summary>
19+
/// Validate Example<br/>
20+
/// Validate an example.
21+
/// </summary>
22+
/// <param name="outputs"></param>
23+
/// <param name="datasetId"></param>
24+
/// <param name="sourceRunId"></param>
25+
/// <param name="metadata"></param>
26+
/// <param name="inputs"></param>
27+
/// <param name="split">
28+
/// Default Value: base
29+
/// </param>
30+
/// <param name="id"></param>
31+
/// <param name="useSourceRunIo">
32+
/// Default Value: false
33+
/// </param>
34+
/// <param name="createdAt"></param>
35+
/// <param name="cancellationToken">The token to cancel the operation with</param>
36+
/// <exception cref="global::System.InvalidOperationException"></exception>
37+
global::System.Threading.Tasks.Task<global::LangSmith.ExampleValidationResult> ValidateExampleAsync(
38+
global::System.Guid datasetId,
39+
object? outputs = default,
40+
global::System.Guid? sourceRunId = default,
41+
object? metadata = default,
42+
object? inputs = default,
43+
global::LangSmith.AnyOf<global::System.Collections.Generic.IList<string>, string>? split = default,
44+
global::System.Guid? id = default,
45+
bool? useSourceRunIo = default,
46+
global::System.DateTime? createdAt = default,
47+
global::System.Threading.CancellationToken cancellationToken = default);
48+
}
49+
}

src/libs/LangSmith/Generated/LangSmith.Models.ExampleUpdate.g.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ public sealed partial class ExampleUpdate
4141
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::LangSmith.JsonConverters.AnyOfJsonConverterFactory2))]
4242
public global::LangSmith.AnyOf<global::System.Collections.Generic.IList<string>, string>? Split { get; set; }
4343

44+
/// <summary>
45+
/// Default Value: false
46+
/// </summary>
47+
[global::System.Text.Json.Serialization.JsonPropertyName("overwrite")]
48+
public bool? Overwrite { get; set; }
49+
4450
/// <summary>
4551
/// Additional properties that are not explicitly defined in the schema
4652
/// </summary>

src/libs/LangSmith/Generated/LangSmith.Models.ExampleUpdateWithID.g.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ public sealed partial class ExampleUpdateWithID
4141
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::LangSmith.JsonConverters.AnyOfJsonConverterFactory2))]
4242
public global::LangSmith.AnyOf<global::System.Collections.Generic.IList<string>, string>? Split { get; set; }
4343

44+
/// <summary>
45+
/// Default Value: false
46+
/// </summary>
47+
[global::System.Text.Json.Serialization.JsonPropertyName("overwrite")]
48+
public bool? Overwrite { get; set; }
49+
4450
/// <summary>
4551
///
4652
/// </summary>

0 commit comments

Comments
 (0)