Skip to content
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 @@ -8,6 +8,7 @@ public partial interface IThreadsClient
/// Query Thread Stats<br/>
/// GET with body payload — no resources created. Returns aggregate statistics for threads in a tracing project.<br/>
/// The response includes the thread counts, run counts, latency percentiles, rates, token totals, and cost totals requested in `select`.<br/>
/// Set `stride` to return the statistics as a time series in `buckets`.<br/>
/// Self-hosted deployments require LangSmith `v0.17` or later.
/// </summary>
/// <param name="request"></param>
Expand All @@ -23,6 +24,7 @@ public partial interface IThreadsClient
/// Query Thread Stats<br/>
/// GET with body payload — no resources created. Returns aggregate statistics for threads in a tracing project.<br/>
/// The response includes the thread counts, run counts, latency percentiles, rates, token totals, and cost totals requested in `select`.<br/>
/// Set `stride` to return the statistics as a time series in `buckets`.<br/>
/// Self-hosted deployments require LangSmith `v0.17` or later.
/// </summary>
/// <param name="request"></param>
Expand All @@ -38,6 +40,7 @@ public partial interface IThreadsClient
/// Query Thread Stats<br/>
/// GET with body payload — no resources created. Returns aggregate statistics for threads in a tracing project.<br/>
/// The response includes the thread counts, run counts, latency percentiles, rates, token totals, and cost totals requested in `select`.<br/>
/// Set `stride` to return the statistics as a time series in `buckets`.<br/>
/// Self-hosted deployments require LangSmith `v0.17` or later.
/// </summary>
/// <param name="filter">
Expand All @@ -62,6 +65,9 @@ public partial interface IThreadsClient
/// `select` lists the aggregate statistics to compute and return. At least one value is required.<br/>
/// Example: [THREAD_COUNT, TRACE_COUNT, TOTAL_TOKENS, TOTAL_COST]
/// </param>
/// <param name="stride">
/// `stride` returns the statistics as a time series in `buckets`. Each thread counts once, in the bucket containing the start of its most recent trace. Omit for a single aggregate over the whole window.
/// </param>
/// <param name="threadFilter">
/// `thread_filter` narrows eligible threads using a LangSmith filter expression evaluated against the complete thread summary.<br/>
/// Example: gte(turn_count, 3)
Expand All @@ -83,6 +89,7 @@ public partial interface IThreadsClient
string? filter = default,
global::System.DateTime? maxStartTime = default,
global::System.DateTime? minStartTime = default,
global::LangSmith.QueryStrideRequestBody? stride = default,
string? threadFilter = default,
string? traceFilter = default,
string? treeFilter = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public partial interface IWorkspacesClient
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::LangSmith.ApiException"></exception>
global::System.Threading.Tasks.Task<string> DeleteTagKeyAsync(
global::System.Threading.Tasks.Task DeleteTagKeyAsync(
global::System.Guid tagKeyId,
global::LangSmith.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
Expand All @@ -22,7 +22,7 @@ public partial interface IWorkspacesClient
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::LangSmith.ApiException"></exception>
global::System.Threading.Tasks.Task<global::LangSmith.AutoSDKHttpResponse<string>> DeleteTagKeyAsResponseAsync(
global::System.Threading.Tasks.Task<global::LangSmith.AutoSDKHttpResponse> DeleteTagKeyAsResponseAsync(
global::System.Guid tagKeyId,
global::LangSmith.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public partial interface IWorkspacesClient
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::LangSmith.ApiException"></exception>
global::System.Threading.Tasks.Task<string> DeleteTagValueAsync(
global::System.Threading.Tasks.Task DeleteTagValueAsync(
global::System.Guid tagKeyId,
global::System.Guid tagValueId,
global::LangSmith.AutoSDKRequestOptions? requestOptions = default,
Expand All @@ -25,7 +25,7 @@ public partial interface IWorkspacesClient
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::LangSmith.ApiException"></exception>
global::System.Threading.Tasks.Task<global::LangSmith.AutoSDKHttpResponse<string>> DeleteTagValueAsResponseAsync(
global::System.Threading.Tasks.Task<global::LangSmith.AutoSDKHttpResponse> DeleteTagValueAsResponseAsync(
global::System.Guid tagKeyId,
global::System.Guid tagValueId,
global::LangSmith.AutoSDKRequestOptions? requestOptions = default,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ namespace LangSmith
public partial interface IWorkspacesClient
{
/// <summary>
/// List Tags
/// List Tags<br/>
/// List the workspace's tag keys, each with its values.<br/>
/// With resource_type, only values applied to at least one resource of that<br/>
/// type are returned, and keys with no such values are left out.
/// </summary>
/// <param name="resourceType"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
Expand All @@ -16,7 +19,10 @@ public partial interface IWorkspacesClient
global::LangSmith.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// List Tags
/// List Tags<br/>
/// List the workspace's tag keys, each with its values.<br/>
/// With resource_type, only values applied to at least one resource of that<br/>
/// type are returned, and keys with no such values are left out.
/// </summary>
/// <param name="resourceType"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#nullable enable

namespace LangSmith.JsonConverters
{
/// <inheritdoc />
public sealed class QueryStrideUnitJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::LangSmith.QueryStrideUnit>
{
/// <inheritdoc />
public override global::LangSmith.QueryStrideUnit Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
switch (reader.TokenType)
{
case global::System.Text.Json.JsonTokenType.String:
{
var stringValue = reader.GetString();
if (stringValue != null)
{
return global::LangSmith.QueryStrideUnitExtensions.ToEnum(stringValue) ?? default;
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::LangSmith.QueryStrideUnit)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
return default(global::LangSmith.QueryStrideUnit);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
}

return default;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::LangSmith.QueryStrideUnit value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));

writer.WriteStringValue(global::LangSmith.QueryStrideUnitExtensions.ToValueString(value));
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#nullable enable

namespace LangSmith.JsonConverters
{
/// <inheritdoc />
public sealed class QueryStrideUnitNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter<global::LangSmith.QueryStrideUnit?>
{
/// <inheritdoc />
public override global::LangSmith.QueryStrideUnit? Read(
ref global::System.Text.Json.Utf8JsonReader reader,
global::System.Type typeToConvert,
global::System.Text.Json.JsonSerializerOptions options)
{
switch (reader.TokenType)
{
case global::System.Text.Json.JsonTokenType.String:
{
var stringValue = reader.GetString();
if (stringValue != null)
{
return global::LangSmith.QueryStrideUnitExtensions.ToEnum(stringValue);
}

break;
}
case global::System.Text.Json.JsonTokenType.Number:
{
var numValue = reader.GetInt32();
return (global::LangSmith.QueryStrideUnit)numValue;
}
case global::System.Text.Json.JsonTokenType.Null:
{
return default(global::LangSmith.QueryStrideUnit?);
}
default:
throw new global::System.ArgumentOutOfRangeException(nameof(reader));
}

return default;
}

/// <inheritdoc />
public override void Write(
global::System.Text.Json.Utf8JsonWriter writer,
global::LangSmith.QueryStrideUnit? value,
global::System.Text.Json.JsonSerializerOptions options)
{
writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));

if (value == null)
{
writer.WriteNullValue();
}
else
{
writer.WriteStringValue(global::LangSmith.QueryStrideUnitExtensions.ToValueString(value.Value));
}
}
}
}
Loading