diff --git a/src/libs/Vectara/Generated/Vectara.AgentAnalyticsClient.GetTrace.g.cs b/src/libs/Vectara/Generated/Vectara.AgentAnalyticsClient.GetTrace.g.cs
index ec549e1e..b43308dd 100644
--- a/src/libs/Vectara/Generated/Vectara.AgentAnalyticsClient.GetTrace.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.AgentAnalyticsClient.GetTrace.g.cs
@@ -79,6 +79,35 @@ partial void ProcessGetTraceResponseContent(
int? requestTimeoutMillis = default,
global::Vectara.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GetTraceAsResponseAsync(
+ traceId: traceId,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Get agent trace
+ /// Retrieve the summary of a specific agent trace by its trace ID.
+ ///
+ ///
+ ///
+ ///
+ /// Example: 0af7651916cd43dd8448eb211c80319c
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> GetTraceAsResponseAsync(
+ string traceId,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -110,6 +139,7 @@ partial void ProcessGetTraceResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: $"/v2/agent_analytics/traces/{traceId}",
baseUri: HttpClient.BaseAddress);
@@ -195,6 +225,8 @@ partial void ProcessGetTraceResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -208,6 +240,11 @@ partial void ProcessGetTraceResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -225,6 +262,8 @@ partial void ProcessGetTraceResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -234,8 +273,7 @@ partial void ProcessGetTraceResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -244,6 +282,11 @@ partial void ProcessGetTraceResponseContent(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -260,14 +303,15 @@ partial void ProcessGetTraceResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -307,6 +351,8 @@ partial void ProcessGetTraceResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -327,6 +373,8 @@ partial void ProcessGetTraceResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Permissions do not allow accessing this trace.
@@ -427,9 +475,13 @@ partial void ProcessGetTraceResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Vectara.AgentTrace.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Vectara.AgentTrace.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -457,9 +509,13 @@ partial void ProcessGetTraceResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Vectara.AgentTrace.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Vectara.AgentTrace.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.AgentAnalyticsClient.GetTraceSpan.g.cs b/src/libs/Vectara/Generated/Vectara.AgentAnalyticsClient.GetTraceSpan.g.cs
index 860ccbf2..5b92ce1f 100644
--- a/src/libs/Vectara/Generated/Vectara.AgentAnalyticsClient.GetTraceSpan.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.AgentAnalyticsClient.GetTraceSpan.g.cs
@@ -87,6 +87,41 @@ partial void ProcessGetTraceSpanResponseContent(
bool? includeContent = default,
global::Vectara.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GetTraceSpanAsResponseAsync(
+ traceId: traceId,
+ spanId: spanId,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ includeContent: includeContent,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Get span in a trace
+ /// Retrieve the details of a specific span within a trace.
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// Default Value: false
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> GetTraceSpanAsResponseAsync(
+ string traceId,
+ string spanId,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ bool? includeContent = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -120,11 +155,12 @@ partial void ProcessGetTraceSpanResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: $"/v2/agent_analytics/traces/{traceId}/spans/{spanId}",
- baseUri: HttpClient.BaseAddress);
+ baseUri: HttpClient.BaseAddress);
__pathBuilder
- .AddOptionalParameter("include_content", includeContent?.ToString().ToLowerInvariant())
+ .AddOptionalParameter("include_content", includeContent?.ToString().ToLowerInvariant())
;
var __path = __pathBuilder.ToString();
__path = global::Vectara.AutoSDKRequestOptionsSupport.AppendQueryParameters(
@@ -210,6 +246,8 @@ partial void ProcessGetTraceSpanResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -223,6 +261,11 @@ partial void ProcessGetTraceSpanResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -240,6 +283,8 @@ partial void ProcessGetTraceSpanResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -249,8 +294,7 @@ partial void ProcessGetTraceSpanResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -259,6 +303,11 @@ partial void ProcessGetTraceSpanResponseContent(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -275,14 +324,15 @@ partial void ProcessGetTraceSpanResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -322,6 +372,8 @@ partial void ProcessGetTraceSpanResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -342,6 +394,8 @@ partial void ProcessGetTraceSpanResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Permissions do not allow accessing this span.
@@ -442,9 +496,13 @@ partial void ProcessGetTraceSpanResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Vectara.AgentTraceSpan.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Vectara.AgentTraceSpan.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -472,9 +530,13 @@ partial void ProcessGetTraceSpanResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Vectara.AgentTraceSpan.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Vectara.AgentTraceSpan.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.AgentAnalyticsClient.ListTraceSpans.g.cs b/src/libs/Vectara/Generated/Vectara.AgentAnalyticsClient.ListTraceSpans.g.cs
index 428d073c..af4c9a08 100644
--- a/src/libs/Vectara/Generated/Vectara.AgentAnalyticsClient.ListTraceSpans.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.AgentAnalyticsClient.ListTraceSpans.g.cs
@@ -97,6 +97,49 @@ partial void ProcessListTraceSpansResponseContent(
string? pageKey = default,
global::Vectara.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await ListTraceSpansAsResponseAsync(
+ traceId: traceId,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ includeContent: includeContent,
+ operation: operation,
+ limit: limit,
+ pageKey: pageKey,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// List spans in a trace
+ /// Retrieve the flat list of spans for a given trace, each with its parent_span_id for reconstructing the tree.
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// Default Value: false
+ ///
+ ///
+ ///
+ /// Default Value: 100
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> ListTraceSpansAsResponseAsync(
+ string traceId,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ bool? includeContent = default,
+ global::Vectara.ListTraceSpansOperation? operation = default,
+ int? limit = default,
+ string? pageKey = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -132,14 +175,15 @@ partial void ProcessListTraceSpansResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: $"/v2/agent_analytics/traces/{traceId}/spans",
- baseUri: HttpClient.BaseAddress);
+ baseUri: HttpClient.BaseAddress);
__pathBuilder
.AddOptionalParameter("include_content", includeContent?.ToString().ToLowerInvariant())
.AddOptionalParameter("operation", operation?.ToValueString())
.AddOptionalParameter("limit", limit?.ToString())
- .AddOptionalParameter("page_key", pageKey)
+ .AddOptionalParameter("page_key", pageKey)
;
var __path = __pathBuilder.ToString();
__path = global::Vectara.AutoSDKRequestOptionsSupport.AppendQueryParameters(
@@ -227,6 +271,8 @@ partial void ProcessListTraceSpansResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -240,6 +286,11 @@ partial void ProcessListTraceSpansResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -257,6 +308,8 @@ partial void ProcessListTraceSpansResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -266,8 +319,7 @@ partial void ProcessListTraceSpansResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -276,6 +328,11 @@ partial void ProcessListTraceSpansResponseContent(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -292,14 +349,15 @@ partial void ProcessListTraceSpansResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -339,6 +397,8 @@ partial void ProcessListTraceSpansResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -359,6 +419,8 @@ partial void ProcessListTraceSpansResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Permissions do not allow accessing this trace.
@@ -459,9 +521,13 @@ partial void ProcessListTraceSpansResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Vectara.ListAgentTraceSpansResponse.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Vectara.ListAgentTraceSpansResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -489,9 +555,13 @@ partial void ProcessListTraceSpansResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Vectara.ListAgentTraceSpansResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Vectara.ListAgentTraceSpansResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.AgentAnalyticsClient.ListTraces.g.cs b/src/libs/Vectara/Generated/Vectara.AgentAnalyticsClient.ListTraces.g.cs
index be4c9360..873ccb04 100644
--- a/src/libs/Vectara/Generated/Vectara.AgentAnalyticsClient.ListTraces.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.AgentAnalyticsClient.ListTraces.g.cs
@@ -127,6 +127,71 @@ partial void ProcessListTracesResponseContent(
string? pageKey = default,
global::Vectara.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await ListTracesAsResponseAsync(
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ agentKey: agentKey,
+ sessionKey: sessionKey,
+ status: status,
+ errorType: errorType,
+ operation: operation,
+ toolName: toolName,
+ toolErrorType: toolErrorType,
+ startedAfter: startedAfter,
+ startedBefore: startedBefore,
+ minDurationMs: minDurationMs,
+ maxDurationMs: maxDurationMs,
+ limit: limit,
+ pageKey: pageKey,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// List agent traces
+ /// List agent traces with optional filtering by agent, session, status, and time range.
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// Default Value: 10
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> ListTracesAsResponseAsync(
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ string? agentKey = default,
+ string? sessionKey = default,
+ global::Vectara.ListTracesStatus? status = default,
+ global::Vectara.ListTracesErrorType? errorType = default,
+ global::Vectara.ListTracesOperation? operation = default,
+ string? toolName = default,
+ global::Vectara.ListTracesToolErrorType? toolErrorType = default,
+ global::System.DateTime? startedAfter = default,
+ global::System.DateTime? startedBefore = default,
+ long? minDurationMs = default,
+ long? maxDurationMs = default,
+ int? limit = default,
+ string? pageKey = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -170,9 +235,10 @@ partial void ProcessListTracesResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: "/v2/agent_analytics/traces",
- baseUri: HttpClient.BaseAddress);
+ baseUri: HttpClient.BaseAddress);
__pathBuilder
.AddOptionalParameter("agent_key", agentKey)
.AddOptionalParameter("session_key", sessionKey)
@@ -186,7 +252,7 @@ partial void ProcessListTracesResponseContent(
.AddOptionalParameter("min_duration_ms", minDurationMs?.ToString())
.AddOptionalParameter("max_duration_ms", maxDurationMs?.ToString())
.AddOptionalParameter("limit", limit?.ToString())
- .AddOptionalParameter("page_key", pageKey)
+ .AddOptionalParameter("page_key", pageKey)
;
var __path = __pathBuilder.ToString();
__path = global::Vectara.AutoSDKRequestOptionsSupport.AppendQueryParameters(
@@ -282,6 +348,8 @@ partial void ProcessListTracesResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -295,6 +363,11 @@ partial void ProcessListTracesResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -312,6 +385,8 @@ partial void ProcessListTracesResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -321,8 +396,7 @@ partial void ProcessListTracesResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -331,6 +405,11 @@ partial void ProcessListTracesResponseContent(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -347,14 +426,15 @@ partial void ProcessListTracesResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -394,6 +474,8 @@ partial void ProcessListTracesResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -414,6 +496,8 @@ partial void ProcessListTracesResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Permissions do not allow listing traces.
@@ -476,9 +560,13 @@ partial void ProcessListTracesResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Vectara.ListAgentTracesResponse.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Vectara.ListAgentTracesResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -506,9 +594,13 @@ partial void ProcessListTracesResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Vectara.ListAgentTracesResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Vectara.ListAgentTracesResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.AgentAnalyticsClient.g.cs b/src/libs/Vectara/Generated/Vectara.AgentAnalyticsClient.g.cs
index 4eb291fe..18814e47 100644
--- a/src/libs/Vectara/Generated/Vectara.AgentAnalyticsClient.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.AgentAnalyticsClient.g.cs
@@ -75,10 +75,10 @@ public AgentAnalyticsClient(
/// Client-wide request defaults such as headers, query parameters, retries, and timeout.
/// Dispose the HttpClient when the instance is disposed. True by default.
public AgentAnalyticsClient(
- global::System.Net.Http.HttpClient? httpClient = null,
- global::System.Uri? baseUri = null,
- global::System.Collections.Generic.List? authorizations = null,
- global::Vectara.AutoSDKClientOptions? options = null,
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Uri? baseUri,
+ global::System.Collections.Generic.List? authorizations,
+ global::Vectara.AutoSDKClientOptions? options,
bool disposeHttpClient = true)
{
diff --git a/src/libs/Vectara/Generated/Vectara.AgentArtifactsClient.Get3.g.cs b/src/libs/Vectara/Generated/Vectara.AgentArtifactsClient.Get3.g.cs
index 7e376e5e..211a9a0e 100644
--- a/src/libs/Vectara/Generated/Vectara.AgentArtifactsClient.Get3.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.AgentArtifactsClient.Get3.g.cs
@@ -93,6 +93,47 @@ partial void ProcessGet3ResponseContent(
int? requestTimeoutMillis = default,
global::Vectara.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await Get3AsResponseAsync(
+ agentKey: agentKey,
+ sessionKey: sessionKey,
+ artifactId: artifactId,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Get session artifact
+ /// Retrieve a specific artifact by its unique `artifact_id`, including metadata and base64-encoded file content.
+ ///
+ ///
+ ///
+ ///
+ /// A unique key that identifies an agent.
+ /// Example: customer_support
+ ///
+ ///
+ /// A unique key that identifies an agent session.
+ /// Example: customer_support_chat
+ ///
+ ///
+ /// Example: art_report_pdf_a3f2
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> Get3AsResponseAsync(
+ string agentKey,
+ string sessionKey,
+ string artifactId,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -126,6 +167,7 @@ partial void ProcessGet3ResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: $"/v2/agents/{agentKey}/sessions/{sessionKey}/artifacts/{artifactId}",
baseUri: HttpClient.BaseAddress);
@@ -213,6 +255,8 @@ partial void ProcessGet3ResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -226,6 +270,11 @@ partial void ProcessGet3ResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -243,6 +292,8 @@ partial void ProcessGet3ResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -252,8 +303,7 @@ partial void ProcessGet3ResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -262,6 +312,11 @@ partial void ProcessGet3ResponseContent(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -278,14 +333,15 @@ partial void ProcessGet3ResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -325,6 +381,8 @@ partial void ProcessGet3ResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -345,6 +403,8 @@ partial void ProcessGet3ResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Permissions do not allow accessing this artifact.
@@ -445,9 +505,13 @@ partial void ProcessGet3ResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Vectara.SessionArtifact.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Vectara.SessionArtifact.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -475,9 +539,13 @@ partial void ProcessGet3ResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Vectara.SessionArtifact.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Vectara.SessionArtifact.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.AgentArtifactsClient.List3.g.cs b/src/libs/Vectara/Generated/Vectara.AgentArtifactsClient.List3.g.cs
index 8bebe1ab..3f384ab9 100644
--- a/src/libs/Vectara/Generated/Vectara.AgentArtifactsClient.List3.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.AgentArtifactsClient.List3.g.cs
@@ -109,6 +109,60 @@ partial void ProcessList3ResponseContent(
global::Vectara.ListSessionArtifactsOrderBy? orderBy = default,
global::Vectara.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await List3AsResponseAsync(
+ agentKey: agentKey,
+ sessionKey: sessionKey,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ limit: limit,
+ pageKey: pageKey,
+ sortBy: sortBy,
+ orderBy: orderBy,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// List session artifacts
+ /// List all artifacts stored in a specific agent session, with cursor-based pagination. Artifacts are files either uploaded by the user, or generated within a session. This endpoint shows you what files exist in a session, but does not include the file content.
+ ///
+ ///
+ ///
+ ///
+ /// A unique key that identifies an agent.
+ /// Example: customer_support
+ ///
+ ///
+ /// A unique key that identifies an agent session.
+ /// Example: customer_support_chat
+ ///
+ ///
+ /// Default Value: 10
+ ///
+ ///
+ ///
+ /// Default Value: created_at
+ ///
+ ///
+ /// Default Value: desc
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> List3AsResponseAsync(
+ string agentKey,
+ string sessionKey,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ int? limit = default,
+ string? pageKey = default,
+ global::Vectara.ListSessionArtifactsSortBy? sortBy = default,
+ global::Vectara.ListSessionArtifactsOrderBy? orderBy = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -145,14 +199,15 @@ partial void ProcessList3ResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: $"/v2/agents/{agentKey}/sessions/{sessionKey}/artifacts",
- baseUri: HttpClient.BaseAddress);
+ baseUri: HttpClient.BaseAddress);
__pathBuilder
.AddOptionalParameter("limit", limit?.ToString())
.AddOptionalParameter("page_key", pageKey)
.AddOptionalParameter("sort_by", sortBy?.ToValueString())
- .AddOptionalParameter("order_by", orderBy?.ToValueString())
+ .AddOptionalParameter("order_by", orderBy?.ToValueString())
;
var __path = __pathBuilder.ToString();
__path = global::Vectara.AutoSDKRequestOptionsSupport.AppendQueryParameters(
@@ -241,6 +296,8 @@ partial void ProcessList3ResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -254,6 +311,11 @@ partial void ProcessList3ResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -271,6 +333,8 @@ partial void ProcessList3ResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -280,8 +344,7 @@ partial void ProcessList3ResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -290,6 +353,11 @@ partial void ProcessList3ResponseContent(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -306,14 +374,15 @@ partial void ProcessList3ResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -353,6 +422,8 @@ partial void ProcessList3ResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -373,6 +444,8 @@ partial void ProcessList3ResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Permissions do not allow listing artifacts in this session.
@@ -473,9 +546,13 @@ partial void ProcessList3ResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Vectara.ListSessionArtifactsResponse.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Vectara.ListSessionArtifactsResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -503,9 +580,13 @@ partial void ProcessList3ResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Vectara.ListSessionArtifactsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Vectara.ListSessionArtifactsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.AgentArtifactsClient.g.cs b/src/libs/Vectara/Generated/Vectara.AgentArtifactsClient.g.cs
index 7533014c..f4d4daf5 100644
--- a/src/libs/Vectara/Generated/Vectara.AgentArtifactsClient.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.AgentArtifactsClient.g.cs
@@ -75,10 +75,10 @@ public AgentArtifactsClient(
/// Client-wide request defaults such as headers, query parameters, retries, and timeout.
/// Dispose the HttpClient when the instance is disposed. True by default.
public AgentArtifactsClient(
- global::System.Net.Http.HttpClient? httpClient = null,
- global::System.Uri? baseUri = null,
- global::System.Collections.Generic.List? authorizations = null,
- global::Vectara.AutoSDKClientOptions? options = null,
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Uri? baseUri,
+ global::System.Collections.Generic.List? authorizations,
+ global::Vectara.AutoSDKClientOptions? options,
bool disposeHttpClient = true)
{
diff --git a/src/libs/Vectara/Generated/Vectara.AgentEventsClient.Create2.g.cs b/src/libs/Vectara/Generated/Vectara.AgentEventsClient.Create2.g.cs
index 452f3c84..6769fc3a 100644
--- a/src/libs/Vectara/Generated/Vectara.AgentEventsClient.Create2.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.AgentEventsClient.Create2.g.cs
@@ -87,6 +87,47 @@ partial void ProcessCreate2ResponseContent(
string agentKey,
string sessionKey,
+ global::Vectara.CreateInputRequest request,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await Create2AsResponseAsync(
+ agentKey: agentKey,
+ sessionKey: sessionKey,
+
+ request: request,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Interact with an agent
+ /// Create a new input to an agent to interact with it.
+ ///
+ ///
+ ///
+ ///
+ /// A unique key that identifies an agent.
+ /// Example: customer_support
+ ///
+ ///
+ /// A unique key that identifies an agent session.
+ /// Example: customer_support_chat
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> Create2AsResponseAsync(
+ string agentKey,
+ string sessionKey,
+
global::Vectara.CreateInputRequest request,
int? requestTimeout = default,
int? requestTimeoutMillis = default,
@@ -125,6 +166,7 @@ partial void ProcessCreate2ResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: $"/v2/agents/{agentKey}/sessions/{sessionKey}/events",
baseUri: HttpClient.BaseAddress);
@@ -218,6 +260,8 @@ partial void ProcessCreate2ResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -231,6 +275,11 @@ partial void ProcessCreate2ResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -248,6 +297,8 @@ partial void ProcessCreate2ResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -257,8 +308,7 @@ partial void ProcessCreate2ResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -267,6 +317,11 @@ partial void ProcessCreate2ResponseContent(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -283,14 +338,15 @@ partial void ProcessCreate2ResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -330,6 +386,8 @@ partial void ProcessCreate2ResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -350,6 +408,8 @@ partial void ProcessCreate2ResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Input event creation request was malformed.
@@ -602,9 +662,13 @@ partial void ProcessCreate2ResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Vectara.AgentResponse.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Vectara.AgentResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -632,9 +696,13 @@ partial void ProcessCreate2ResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Vectara.AgentResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Vectara.AgentResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.AgentEventsClient.Create2AsStream.g.cs b/src/libs/Vectara/Generated/Vectara.AgentEventsClient.Create2AsStream.g.cs
index 064c02a5..1c123aca 100644
--- a/src/libs/Vectara/Generated/Vectara.AgentEventsClient.Create2AsStream.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.AgentEventsClient.Create2AsStream.g.cs
@@ -120,6 +120,7 @@ partial void ProcessCreate2AsStreamResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: $"/v2/agents/{agentKey}/sessions/{sessionKey}/events",
baseUri: HttpClient.BaseAddress);
@@ -213,6 +214,8 @@ partial void ProcessCreate2AsStreamResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -226,6 +229,11 @@ partial void ProcessCreate2AsStreamResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -243,6 +251,8 @@ partial void ProcessCreate2AsStreamResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -252,8 +262,7 @@ partial void ProcessCreate2AsStreamResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -262,6 +271,11 @@ partial void ProcessCreate2AsStreamResponse(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -278,14 +292,15 @@ partial void ProcessCreate2AsStreamResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -325,6 +340,8 @@ partial void ProcessCreate2AsStreamResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -345,6 +362,8 @@ partial void ProcessCreate2AsStreamResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
diff --git a/src/libs/Vectara/Generated/Vectara.AgentEventsClient.Delete2.g.cs b/src/libs/Vectara/Generated/Vectara.AgentEventsClient.Delete2.g.cs
index ebfadca0..420d8f35 100644
--- a/src/libs/Vectara/Generated/Vectara.AgentEventsClient.Delete2.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.AgentEventsClient.Delete2.g.cs
@@ -86,6 +86,43 @@ partial void ProcessDelete2Response(
int? requestTimeoutMillis = default,
global::Vectara.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await Delete2AsResponseAsync(
+ agentKey: agentKey,
+ sessionKey: sessionKey,
+ eventId: eventId,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Delete event
+ /// Permanently delete an event from a session. Removes the event from both the metadata database and the encrypted event store.
+ ///
+ ///
+ ///
+ ///
+ /// A unique key that identifies an agent.
+ /// Example: customer_support
+ ///
+ ///
+ /// A unique key that identifies an agent session.
+ /// Example: customer_support_chat
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task Delete2AsResponseAsync(
+ string agentKey,
+ string sessionKey,
+ string eventId,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -119,6 +156,7 @@ partial void ProcessDelete2Response(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: $"/v2/agents/{agentKey}/sessions/{sessionKey}/events/{eventId}",
baseUri: HttpClient.BaseAddress);
@@ -206,6 +244,8 @@ partial void ProcessDelete2Response(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -219,6 +259,11 @@ partial void ProcessDelete2Response(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -236,6 +281,8 @@ partial void ProcessDelete2Response(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -245,8 +292,7 @@ partial void ProcessDelete2Response(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -255,6 +301,11 @@ partial void ProcessDelete2Response(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -271,14 +322,15 @@ partial void ProcessDelete2Response(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -318,6 +370,8 @@ partial void ProcessDelete2Response(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -338,6 +392,8 @@ partial void ProcessDelete2Response(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Agent, session, or event not found.
@@ -396,6 +452,10 @@ partial void ProcessDelete2Response(
{
__response.EnsureSuccessStatusCode();
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -417,6 +477,10 @@ partial void ProcessDelete2Response(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.AgentEventsClient.Get2.g.cs b/src/libs/Vectara/Generated/Vectara.AgentEventsClient.Get2.g.cs
index affee236..7dc968c9 100644
--- a/src/libs/Vectara/Generated/Vectara.AgentEventsClient.Get2.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.AgentEventsClient.Get2.g.cs
@@ -93,6 +93,47 @@ partial void ProcessGet2ResponseContent(
int? requestTimeoutMillis = default,
global::Vectara.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await Get2AsResponseAsync(
+ agentKey: agentKey,
+ sessionKey: sessionKey,
+ eventId: eventId,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Get event in agent session
+ /// Retrieve the details of a specific event within an agent session.
+ ///
+ ///
+ ///
+ ///
+ /// A unique key that identifies an agent.
+ /// Example: customer_support
+ ///
+ ///
+ /// A unique key that identifies an agent session.
+ /// Example: customer_support_chat
+ ///
+ ///
+ /// Example: aev_user_001
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> Get2AsResponseAsync(
+ string agentKey,
+ string sessionKey,
+ string eventId,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -126,6 +167,7 @@ partial void ProcessGet2ResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: $"/v2/agents/{agentKey}/sessions/{sessionKey}/events/{eventId}",
baseUri: HttpClient.BaseAddress);
@@ -213,6 +255,8 @@ partial void ProcessGet2ResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -226,6 +270,11 @@ partial void ProcessGet2ResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -243,6 +292,8 @@ partial void ProcessGet2ResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -252,8 +303,7 @@ partial void ProcessGet2ResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -262,6 +312,11 @@ partial void ProcessGet2ResponseContent(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -278,14 +333,15 @@ partial void ProcessGet2ResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -325,6 +381,8 @@ partial void ProcessGet2ResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -345,6 +403,8 @@ partial void ProcessGet2ResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Permissions do not allow accessing this event.
@@ -445,9 +505,13 @@ partial void ProcessGet2ResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Vectara.AgentEvent.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Vectara.AgentEvent.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -475,9 +539,13 @@ partial void ProcessGet2ResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Vectara.AgentEvent.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Vectara.AgentEvent.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.AgentEventsClient.Hide.g.cs b/src/libs/Vectara/Generated/Vectara.AgentEventsClient.Hide.g.cs
index 3c917009..0893c006 100644
--- a/src/libs/Vectara/Generated/Vectara.AgentEventsClient.Hide.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.AgentEventsClient.Hide.g.cs
@@ -91,6 +91,45 @@ partial void ProcessHideResponseContent(
int? requestTimeoutMillis = default,
global::Vectara.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await HideAsResponseAsync(
+ agentKey: agentKey,
+ sessionKey: sessionKey,
+ eventId: eventId,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Hide event
+ /// Manually hide an event in a session. Sets hide_reason to 'manual'.
+ ///
+ ///
+ ///
+ ///
+ /// A unique key that identifies an agent.
+ /// Example: customer_support
+ ///
+ ///
+ /// A unique key that identifies an agent session.
+ /// Example: customer_support_chat
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> HideAsResponseAsync(
+ string agentKey,
+ string sessionKey,
+ string eventId,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -124,6 +163,7 @@ partial void ProcessHideResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: $"/v2/agents/{agentKey}/sessions/{sessionKey}/events/{eventId}/hide",
baseUri: HttpClient.BaseAddress);
@@ -211,6 +251,8 @@ partial void ProcessHideResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -224,6 +266,11 @@ partial void ProcessHideResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -241,6 +288,8 @@ partial void ProcessHideResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -250,8 +299,7 @@ partial void ProcessHideResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -260,6 +308,11 @@ partial void ProcessHideResponseContent(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -276,14 +329,15 @@ partial void ProcessHideResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -323,6 +377,8 @@ partial void ProcessHideResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -343,6 +399,8 @@ partial void ProcessHideResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Agent, session, or event not found.
@@ -405,9 +463,13 @@ partial void ProcessHideResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Vectara.AgentEvent.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Vectara.AgentEvent.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -435,9 +497,13 @@ partial void ProcessHideResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Vectara.AgentEvent.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Vectara.AgentEvent.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.AgentEventsClient.List2.g.cs b/src/libs/Vectara/Generated/Vectara.AgentEventsClient.List2.g.cs
index 82c3a9d0..77a6c709 100644
--- a/src/libs/Vectara/Generated/Vectara.AgentEventsClient.List2.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.AgentEventsClient.List2.g.cs
@@ -103,6 +103,55 @@ partial void ProcessList2ResponseContent(
bool? includeHidden = default,
global::Vectara.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await List2AsResponseAsync(
+ agentKey: agentKey,
+ sessionKey: sessionKey,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ limit: limit,
+ pageKey: pageKey,
+ includeHidden: includeHidden,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// List events in agent session
+ /// List all events in a specific agent session, with optional pagination.
+ ///
+ ///
+ ///
+ ///
+ /// A unique key that identifies an agent.
+ /// Example: customer_support
+ ///
+ ///
+ /// A unique key that identifies an agent session.
+ /// Example: customer_support_chat
+ ///
+ ///
+ /// Default Value: 10
+ ///
+ ///
+ ///
+ /// Default Value: false
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> List2AsResponseAsync(
+ string agentKey,
+ string sessionKey,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ int? limit = default,
+ string? pageKey = default,
+ bool? includeHidden = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -138,13 +187,14 @@ partial void ProcessList2ResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: $"/v2/agents/{agentKey}/sessions/{sessionKey}/events",
- baseUri: HttpClient.BaseAddress);
+ baseUri: HttpClient.BaseAddress);
__pathBuilder
.AddOptionalParameter("limit", limit?.ToString())
.AddOptionalParameter("page_key", pageKey)
- .AddOptionalParameter("include_hidden", includeHidden?.ToString().ToLowerInvariant())
+ .AddOptionalParameter("include_hidden", includeHidden?.ToString().ToLowerInvariant())
;
var __path = __pathBuilder.ToString();
__path = global::Vectara.AutoSDKRequestOptionsSupport.AppendQueryParameters(
@@ -232,6 +282,8 @@ partial void ProcessList2ResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -245,6 +297,11 @@ partial void ProcessList2ResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -262,6 +319,8 @@ partial void ProcessList2ResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -271,8 +330,7 @@ partial void ProcessList2ResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -281,6 +339,11 @@ partial void ProcessList2ResponseContent(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -297,14 +360,15 @@ partial void ProcessList2ResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -344,6 +408,8 @@ partial void ProcessList2ResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -364,6 +430,8 @@ partial void ProcessList2ResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Permissions do not allow listing events in this session.
@@ -464,9 +532,13 @@ partial void ProcessList2ResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Vectara.ListAgentEventsResponse.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Vectara.ListAgentEventsResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -494,9 +566,13 @@ partial void ProcessList2ResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Vectara.ListAgentEventsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Vectara.ListAgentEventsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.AgentEventsClient.Unhide.g.cs b/src/libs/Vectara/Generated/Vectara.AgentEventsClient.Unhide.g.cs
index 73b200c9..2525dd47 100644
--- a/src/libs/Vectara/Generated/Vectara.AgentEventsClient.Unhide.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.AgentEventsClient.Unhide.g.cs
@@ -91,6 +91,45 @@ partial void ProcessUnhideResponseContent(
int? requestTimeoutMillis = default,
global::Vectara.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await UnhideAsResponseAsync(
+ agentKey: agentKey,
+ sessionKey: sessionKey,
+ eventId: eventId,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Unhide event
+ /// Unhide a hidden event in a session. Clears the hide_reason.
+ ///
+ ///
+ ///
+ ///
+ /// A unique key that identifies an agent.
+ /// Example: customer_support
+ ///
+ ///
+ /// A unique key that identifies an agent session.
+ /// Example: customer_support_chat
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> UnhideAsResponseAsync(
+ string agentKey,
+ string sessionKey,
+ string eventId,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -124,6 +163,7 @@ partial void ProcessUnhideResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: $"/v2/agents/{agentKey}/sessions/{sessionKey}/events/{eventId}/unhide",
baseUri: HttpClient.BaseAddress);
@@ -211,6 +251,8 @@ partial void ProcessUnhideResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -224,6 +266,11 @@ partial void ProcessUnhideResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -241,6 +288,8 @@ partial void ProcessUnhideResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -250,8 +299,7 @@ partial void ProcessUnhideResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -260,6 +308,11 @@ partial void ProcessUnhideResponseContent(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -276,14 +329,15 @@ partial void ProcessUnhideResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -323,6 +377,8 @@ partial void ProcessUnhideResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -343,6 +399,8 @@ partial void ProcessUnhideResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Agent, session, or event not found.
@@ -405,9 +463,13 @@ partial void ProcessUnhideResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Vectara.AgentEvent.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Vectara.AgentEvent.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -435,9 +497,13 @@ partial void ProcessUnhideResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Vectara.AgentEvent.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Vectara.AgentEvent.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.AgentEventsClient.g.cs b/src/libs/Vectara/Generated/Vectara.AgentEventsClient.g.cs
index 2e5e26fd..708fefa6 100644
--- a/src/libs/Vectara/Generated/Vectara.AgentEventsClient.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.AgentEventsClient.g.cs
@@ -75,10 +75,10 @@ public AgentEventsClient(
/// Client-wide request defaults such as headers, query parameters, retries, and timeout.
/// Dispose the HttpClient when the instance is disposed. True by default.
public AgentEventsClient(
- global::System.Net.Http.HttpClient? httpClient = null,
- global::System.Uri? baseUri = null,
- global::System.Collections.Generic.List? authorizations = null,
- global::Vectara.AutoSDKClientOptions? options = null,
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Uri? baseUri,
+ global::System.Collections.Generic.List? authorizations,
+ global::Vectara.AutoSDKClientOptions? options,
bool disposeHttpClient = true)
{
diff --git a/src/libs/Vectara/Generated/Vectara.AgentSchedulesClient.Create.g.cs b/src/libs/Vectara/Generated/Vectara.AgentSchedulesClient.Create.g.cs
index 130a775c..299d0355 100644
--- a/src/libs/Vectara/Generated/Vectara.AgentSchedulesClient.Create.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.AgentSchedulesClient.Create.g.cs
@@ -100,6 +100,61 @@ partial void ProcessCreateResponseContent(
public async global::System.Threading.Tasks.Task CreateAsync(
string agentKey,
+ global::Vectara.CreateAgentScheduleRequest request,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await CreateAsResponseAsync(
+ agentKey: agentKey,
+
+ request: request,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Create agent schedule
+ /// Create a new schedule for automatically executing an agent at specified intervals. Each execution creates a new session with the configured message and metadata.
+ /// Schedules enable automated agent workflows such as daily reports, periodic monitoring, or regular data processing. The schedule will create sessions tagged with metadata to identify them as scheduled executions.
+ /// ## Example request
+ /// ```json
+ /// \$ curl -X POST https://api.vectara.io/v2/agents/support-agent/schedules \
+ /// -H "Authorization: Bearer YOUR_API_KEY" \c
+ /// -H "Content-Type: application/json" \
+ /// -d '{
+ /// "key": "daily-report",
+ /// "name": "Daily Summary Report",
+ /// "message": [{"type": "text", "content": "Generate a summary of today's activities"}],
+ /// "schedule": {
+ /// "type": "interval",
+ /// "interval": "PT24H"
+ /// },
+ /// "session_metadata": {
+ /// "report_type": "daily"
+ /// }
+ /// }'
+ /// ```
+ /// A successful response includes the unique schedule key, configuration, and creation timestamp.
+ ///
+ ///
+ ///
+ ///
+ /// A unique key that identifies an agent.
+ /// Example: customer_support
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> CreateAsResponseAsync(
+ string agentKey,
+
global::Vectara.CreateAgentScheduleRequest request,
int? requestTimeout = default,
int? requestTimeoutMillis = default,
@@ -139,6 +194,7 @@ partial void ProcessCreateResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: $"/v2/agents/{agentKey}/schedules",
baseUri: HttpClient.BaseAddress);
@@ -231,6 +287,8 @@ partial void ProcessCreateResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -244,6 +302,11 @@ partial void ProcessCreateResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -261,6 +324,8 @@ partial void ProcessCreateResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -270,8 +335,7 @@ partial void ProcessCreateResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -280,6 +344,11 @@ partial void ProcessCreateResponseContent(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -296,14 +365,15 @@ partial void ProcessCreateResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -343,6 +413,8 @@ partial void ProcessCreateResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -363,6 +435,8 @@ partial void ProcessCreateResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Schedule creation request was malformed or invalid.
@@ -539,9 +613,13 @@ partial void ProcessCreateResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Vectara.AgentSchedule.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Vectara.AgentSchedule.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -569,9 +647,13 @@ partial void ProcessCreateResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Vectara.AgentSchedule.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Vectara.AgentSchedule.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.AgentSchedulesClient.Delete.g.cs b/src/libs/Vectara/Generated/Vectara.AgentSchedulesClient.Delete.g.cs
index 79f69d1e..6aaafbff 100644
--- a/src/libs/Vectara/Generated/Vectara.AgentSchedulesClient.Delete.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.AgentSchedulesClient.Delete.g.cs
@@ -84,6 +84,42 @@ partial void ProcessDeleteResponse(
int? requestTimeoutMillis = default,
global::Vectara.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await DeleteAsResponseAsync(
+ agentKey: agentKey,
+ scheduleKey: scheduleKey,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Delete agent schedule
+ /// Delete an agent schedule. This stops all future executions of the schedule.
+ /// Sessions that were previously created by this schedule are not deleted and remain accessible.
+ ///
+ ///
+ ///
+ ///
+ /// A unique key that identifies an agent.
+ /// Example: customer_support
+ ///
+ ///
+ /// A unique key that identifies an agent schedule. Uses "key" terminology (instead of "id")
+ /// for consistency with other Vectara API resources (AgentKey, SessionKey, CorpusKey, etc.).
+ /// Example: daily-report
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task DeleteAsResponseAsync(
+ string agentKey,
+ string scheduleKey,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -116,6 +152,7 @@ partial void ProcessDeleteResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: $"/v2/agents/{agentKey}/schedules/{scheduleKey}",
baseUri: HttpClient.BaseAddress);
@@ -202,6 +239,8 @@ partial void ProcessDeleteResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -215,6 +254,11 @@ partial void ProcessDeleteResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -232,6 +276,8 @@ partial void ProcessDeleteResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -241,8 +287,7 @@ partial void ProcessDeleteResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -251,6 +296,11 @@ partial void ProcessDeleteResponse(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -267,14 +317,15 @@ partial void ProcessDeleteResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -314,6 +365,8 @@ partial void ProcessDeleteResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -334,6 +387,8 @@ partial void ProcessDeleteResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Permissions do not allow deleting this schedule.
@@ -430,6 +485,10 @@ partial void ProcessDeleteResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -451,6 +510,10 @@ partial void ProcessDeleteResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.AgentSchedulesClient.Get.g.cs b/src/libs/Vectara/Generated/Vectara.AgentSchedulesClient.Get.g.cs
index fed2e948..3c00ddd5 100644
--- a/src/libs/Vectara/Generated/Vectara.AgentSchedulesClient.Get.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.AgentSchedulesClient.Get.g.cs
@@ -88,6 +88,43 @@ partial void ProcessGetResponseContent(
int? requestTimeoutMillis = default,
global::Vectara.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GetAsResponseAsync(
+ agentKey: agentKey,
+ scheduleKey: scheduleKey,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Get agent schedule
+ /// Retrieve the full details of a specific agent schedule using its unique schedule key. The response includes the schedule's configuration, execution history, and timestamps.
+ ///
+ ///
+ ///
+ ///
+ /// A unique key that identifies an agent.
+ /// Example: customer_support
+ ///
+ ///
+ /// A unique key that identifies an agent schedule. Uses "key" terminology (instead of "id")
+ /// for consistency with other Vectara API resources (AgentKey, SessionKey, CorpusKey, etc.).
+ /// Example: daily-report
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> GetAsResponseAsync(
+ string agentKey,
+ string scheduleKey,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -120,6 +157,7 @@ partial void ProcessGetResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: $"/v2/agents/{agentKey}/schedules/{scheduleKey}",
baseUri: HttpClient.BaseAddress);
@@ -206,6 +244,8 @@ partial void ProcessGetResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -219,6 +259,11 @@ partial void ProcessGetResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -236,6 +281,8 @@ partial void ProcessGetResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -245,8 +292,7 @@ partial void ProcessGetResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -255,6 +301,11 @@ partial void ProcessGetResponseContent(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -271,14 +322,15 @@ partial void ProcessGetResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -318,6 +370,8 @@ partial void ProcessGetResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -338,6 +392,8 @@ partial void ProcessGetResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Permissions do not allow accessing this schedule.
@@ -438,9 +494,13 @@ partial void ProcessGetResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Vectara.AgentSchedule.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Vectara.AgentSchedule.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -468,9 +528,13 @@ partial void ProcessGetResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Vectara.AgentSchedule.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Vectara.AgentSchedule.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.AgentSchedulesClient.List.g.cs b/src/libs/Vectara/Generated/Vectara.AgentSchedulesClient.List.g.cs
index a5a8d75b..d685b79d 100644
--- a/src/libs/Vectara/Generated/Vectara.AgentSchedulesClient.List.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.AgentSchedulesClient.List.g.cs
@@ -90,6 +90,44 @@ partial void ProcessListResponseContent(
string? pageKey = default,
global::Vectara.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await ListAsResponseAsync(
+ agentKey: agentKey,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ limit: limit,
+ pageKey: pageKey,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// List agent schedules
+ /// List all schedules for the specified agent. This endpoint returns high-level information about each schedule including execution status and next scheduled execution time.
+ ///
+ ///
+ ///
+ ///
+ /// A unique key that identifies an agent.
+ /// Example: customer_support
+ ///
+ ///
+ /// Default Value: 10
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> ListAsResponseAsync(
+ string agentKey,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ int? limit = default,
+ string? pageKey = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -123,12 +161,13 @@ partial void ProcessListResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: $"/v2/agents/{agentKey}/schedules",
- baseUri: HttpClient.BaseAddress);
+ baseUri: HttpClient.BaseAddress);
__pathBuilder
.AddOptionalParameter("limit", limit?.ToString())
- .AddOptionalParameter("page_key", pageKey)
+ .AddOptionalParameter("page_key", pageKey)
;
var __path = __pathBuilder.ToString();
__path = global::Vectara.AutoSDKRequestOptionsSupport.AppendQueryParameters(
@@ -214,6 +253,8 @@ partial void ProcessListResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -227,6 +268,11 @@ partial void ProcessListResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -244,6 +290,8 @@ partial void ProcessListResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -253,8 +301,7 @@ partial void ProcessListResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -263,6 +310,11 @@ partial void ProcessListResponseContent(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -279,14 +331,15 @@ partial void ProcessListResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -326,6 +379,8 @@ partial void ProcessListResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -346,6 +401,8 @@ partial void ProcessListResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Permissions do not allow listing agent schedules.
@@ -446,9 +503,13 @@ partial void ProcessListResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Vectara.ListAgentSchedulesResponse.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Vectara.ListAgentSchedulesResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -476,9 +537,13 @@ partial void ProcessListResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Vectara.ListAgentSchedulesResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Vectara.ListAgentSchedulesResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.AgentSchedulesClient.ListExecutions.g.cs b/src/libs/Vectara/Generated/Vectara.AgentSchedulesClient.ListExecutions.g.cs
index 2cbaf6ea..cc1c9282 100644
--- a/src/libs/Vectara/Generated/Vectara.AgentSchedulesClient.ListExecutions.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.AgentSchedulesClient.ListExecutions.g.cs
@@ -98,6 +98,51 @@ partial void ProcessListExecutionsResponseContent(
string? pageKey = default,
global::Vectara.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await ListExecutionsAsResponseAsync(
+ agentKey: agentKey,
+ scheduleKey: scheduleKey,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ limit: limit,
+ pageKey: pageKey,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// List agent schedule executions
+ /// List all execution attempts for a schedule, ordered by most recent first.
+ ///
+ ///
+ ///
+ ///
+ /// A unique key that identifies an agent.
+ /// Example: customer_support
+ ///
+ ///
+ /// A unique key that identifies an agent schedule. Uses "key" terminology (instead of "id")
+ /// for consistency with other Vectara API resources (AgentKey, SessionKey, CorpusKey, etc.).
+ /// Example: daily-report
+ ///
+ ///
+ /// Default Value: 10
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> ListExecutionsAsResponseAsync(
+ string agentKey,
+ string scheduleKey,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ int? limit = default,
+ string? pageKey = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -132,12 +177,13 @@ partial void ProcessListExecutionsResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: $"/v2/agents/{agentKey}/schedules/{scheduleKey}/executions",
- baseUri: HttpClient.BaseAddress);
+ baseUri: HttpClient.BaseAddress);
__pathBuilder
.AddOptionalParameter("limit", limit?.ToString())
- .AddOptionalParameter("page_key", pageKey)
+ .AddOptionalParameter("page_key", pageKey)
;
var __path = __pathBuilder.ToString();
__path = global::Vectara.AutoSDKRequestOptionsSupport.AppendQueryParameters(
@@ -224,6 +270,8 @@ partial void ProcessListExecutionsResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -237,6 +285,11 @@ partial void ProcessListExecutionsResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -254,6 +307,8 @@ partial void ProcessListExecutionsResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -263,8 +318,7 @@ partial void ProcessListExecutionsResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -273,6 +327,11 @@ partial void ProcessListExecutionsResponseContent(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -289,14 +348,15 @@ partial void ProcessListExecutionsResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -336,6 +396,8 @@ partial void ProcessListExecutionsResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -356,6 +418,8 @@ partial void ProcessListExecutionsResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
@@ -380,9 +444,13 @@ partial void ProcessListExecutionsResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Vectara.ListAgentScheduleExecutionsResponse.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Vectara.ListAgentScheduleExecutionsResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -410,9 +478,13 @@ partial void ProcessListExecutionsResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Vectara.ListAgentScheduleExecutionsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Vectara.ListAgentScheduleExecutionsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.AgentSchedulesClient.Update.g.cs b/src/libs/Vectara/Generated/Vectara.AgentSchedulesClient.Update.g.cs
index e91ee796..1f121fa4 100644
--- a/src/libs/Vectara/Generated/Vectara.AgentSchedulesClient.Update.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.AgentSchedulesClient.Update.g.cs
@@ -89,6 +89,49 @@ partial void ProcessUpdateResponseContent(
string agentKey,
string scheduleKey,
+ global::Vectara.UpdateAgentScheduleRequest request,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await UpdateAsResponseAsync(
+ agentKey: agentKey,
+ scheduleKey: scheduleKey,
+
+ request: request,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Update agent schedule
+ /// Update an existing agent schedule. All fields are optional - only provided fields will be updated (PATCH semantics).
+ /// You can pause/resume a schedule by setting the `enabled` field to `false`/`true`. Updating the schedule configuration (interval or cron) will reschedule future executions but will not affect executions currently in progress.
+ ///
+ ///
+ ///
+ ///
+ /// A unique key that identifies an agent.
+ /// Example: customer_support
+ ///
+ ///
+ /// A unique key that identifies an agent schedule. Uses "key" terminology (instead of "id")
+ /// for consistency with other Vectara API resources (AgentKey, SessionKey, CorpusKey, etc.).
+ /// Example: daily-report
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> UpdateAsResponseAsync(
+ string agentKey,
+ string scheduleKey,
+
global::Vectara.UpdateAgentScheduleRequest request,
int? requestTimeout = default,
int? requestTimeoutMillis = default,
@@ -129,6 +172,7 @@ partial void ProcessUpdateResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: $"/v2/agents/{agentKey}/schedules/{scheduleKey}",
baseUri: HttpClient.BaseAddress);
@@ -222,6 +266,8 @@ partial void ProcessUpdateResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -235,6 +281,11 @@ partial void ProcessUpdateResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -252,6 +303,8 @@ partial void ProcessUpdateResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -261,8 +314,7 @@ partial void ProcessUpdateResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -271,6 +323,11 @@ partial void ProcessUpdateResponseContent(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -287,14 +344,15 @@ partial void ProcessUpdateResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -334,6 +392,8 @@ partial void ProcessUpdateResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -354,6 +414,8 @@ partial void ProcessUpdateResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Update request was malformed or invalid.
@@ -492,9 +554,13 @@ partial void ProcessUpdateResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Vectara.AgentSchedule.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Vectara.AgentSchedule.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -522,9 +588,13 @@ partial void ProcessUpdateResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Vectara.AgentSchedule.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Vectara.AgentSchedule.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.AgentSchedulesClient.g.cs b/src/libs/Vectara/Generated/Vectara.AgentSchedulesClient.g.cs
index 92f6210d..5c30ed24 100644
--- a/src/libs/Vectara/Generated/Vectara.AgentSchedulesClient.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.AgentSchedulesClient.g.cs
@@ -75,10 +75,10 @@ public AgentSchedulesClient(
/// Client-wide request defaults such as headers, query parameters, retries, and timeout.
/// Dispose the HttpClient when the instance is disposed. True by default.
public AgentSchedulesClient(
- global::System.Net.Http.HttpClient? httpClient = null,
- global::System.Uri? baseUri = null,
- global::System.Collections.Generic.List? authorizations = null,
- global::Vectara.AutoSDKClientOptions? options = null,
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Uri? baseUri,
+ global::System.Collections.Generic.List? authorizations,
+ global::Vectara.AutoSDKClientOptions? options,
bool disposeHttpClient = true)
{
diff --git a/src/libs/Vectara/Generated/Vectara.AgentSessionsClient.Create.g.cs b/src/libs/Vectara/Generated/Vectara.AgentSessionsClient.Create.g.cs
index 56db6d1c..e50e6f70 100644
--- a/src/libs/Vectara/Generated/Vectara.AgentSessionsClient.Create.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.AgentSessionsClient.Create.g.cs
@@ -97,6 +97,58 @@ partial void ProcessCreateResponseContent(
public async global::System.Threading.Tasks.Task CreateAsync(
string agentKey,
+ global::Vectara.CreateAgentSessionRequest request,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await CreateAsResponseAsync(
+ agentKey: agentKey,
+
+ request: request,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Create agent session
+ /// Create a new session for interacting with an agent. A session is the conversation container that maintains state across all messages, events, tool use, and agent responses.
+ /// This endpoint initializes the session and enables you to configure its initial properties, including optional metadata. Metadata can influence agent behavior, personalize responses, or apply access controls. Instructions and tools can also reference metadata using `${\session.metadata.field}` or `$\ref` syntax.
+ /// A session also serves as the workspace for artifacts, enabling file uploads and multi-step workflows. For more information, see [Working with artifacts in sessions](https://docs.vectara.com/docs/agent-os/sessions#working-with-artifacts-in-sessions).
+ /// ## Example request
+ /// ```json
+ /// \$ curl -X POST https://api.vectara.io/v2/agents/support-agent/sessions \
+ /// -H "Authorization: Bearer YOUR_API_KEY" \
+ /// -H "Content-Type: application/json" \
+ /// -d '{
+ /// "key": "user_12345_session",
+ /// "name": "Customer Support Session",
+ /// "metadata": {
+ /// "user_role": "premium",
+ /// "language": "en"
+ /// }
+ /// }'
+ /// ```
+ /// A successful response includes the unique session key, configuration metadata, and timestamps for creation and last update.
+ ///
+ ///
+ ///
+ ///
+ /// A unique key that identifies an agent.
+ /// Example: customer_support
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> CreateAsResponseAsync(
+ string agentKey,
+
global::Vectara.CreateAgentSessionRequest request,
int? requestTimeout = default,
int? requestTimeoutMillis = default,
@@ -136,6 +188,7 @@ partial void ProcessCreateResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: $"/v2/agents/{agentKey}/sessions",
baseUri: HttpClient.BaseAddress);
@@ -228,6 +281,8 @@ partial void ProcessCreateResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -241,6 +296,11 @@ partial void ProcessCreateResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -258,6 +318,8 @@ partial void ProcessCreateResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -267,8 +329,7 @@ partial void ProcessCreateResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -277,6 +338,11 @@ partial void ProcessCreateResponseContent(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -293,14 +359,15 @@ partial void ProcessCreateResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -340,6 +407,8 @@ partial void ProcessCreateResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -360,6 +429,8 @@ partial void ProcessCreateResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Session creation request was malformed or references invalid agent.
@@ -498,9 +569,13 @@ partial void ProcessCreateResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Vectara.AgentSession.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Vectara.AgentSession.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -528,9 +603,13 @@ partial void ProcessCreateResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Vectara.AgentSession.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Vectara.AgentSession.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.AgentSessionsClient.Delete.g.cs b/src/libs/Vectara/Generated/Vectara.AgentSessionsClient.Delete.g.cs
index 011cd2cf..be204584 100644
--- a/src/libs/Vectara/Generated/Vectara.AgentSessionsClient.Delete.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.AgentSessionsClient.Delete.g.cs
@@ -82,6 +82,40 @@ partial void ProcessDeleteResponse(
int? requestTimeoutMillis = default,
global::Vectara.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await DeleteAsResponseAsync(
+ agentKey: agentKey,
+ sessionKey: sessionKey,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Delete agent session
+ /// Permanently delete an agent session. This action cannot be undone.
+ ///
+ ///
+ ///
+ ///
+ /// A unique key that identifies an agent.
+ /// Example: customer_support
+ ///
+ ///
+ /// A unique key that identifies an agent session.
+ /// Example: customer_support_chat
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task DeleteAsResponseAsync(
+ string agentKey,
+ string sessionKey,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -114,6 +148,7 @@ partial void ProcessDeleteResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: $"/v2/agents/{agentKey}/sessions/{sessionKey}",
baseUri: HttpClient.BaseAddress);
@@ -200,6 +235,8 @@ partial void ProcessDeleteResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -213,6 +250,11 @@ partial void ProcessDeleteResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -230,6 +272,8 @@ partial void ProcessDeleteResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -239,8 +283,7 @@ partial void ProcessDeleteResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -249,6 +292,11 @@ partial void ProcessDeleteResponse(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -265,14 +313,15 @@ partial void ProcessDeleteResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -312,6 +361,8 @@ partial void ProcessDeleteResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -332,6 +383,8 @@ partial void ProcessDeleteResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Permissions do not allow deleting this agent session.
@@ -428,6 +481,10 @@ partial void ProcessDeleteResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -449,6 +506,10 @@ partial void ProcessDeleteResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.AgentSessionsClient.Get.g.cs b/src/libs/Vectara/Generated/Vectara.AgentSessionsClient.Get.g.cs
index 67536f41..d9a2e41e 100644
--- a/src/libs/Vectara/Generated/Vectara.AgentSessionsClient.Get.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.AgentSessionsClient.Get.g.cs
@@ -87,6 +87,42 @@ partial void ProcessGetResponseContent(
int? requestTimeoutMillis = default,
global::Vectara.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GetAsResponseAsync(
+ agentKey: agentKey,
+ sessionKey: sessionKey,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Get agent session
+ /// Retrieve the full details of a specific agent session using its unique session key. The response includes the session's configuration, metadata, timestamps, and other stored properties. Use this endpoint to inspect the current state of a session or verify its configuration.
+ ///
+ ///
+ ///
+ ///
+ /// A unique key that identifies an agent.
+ /// Example: customer_support
+ ///
+ ///
+ /// A unique key that identifies an agent session.
+ /// Example: customer_support_chat
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> GetAsResponseAsync(
+ string agentKey,
+ string sessionKey,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -119,6 +155,7 @@ partial void ProcessGetResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: $"/v2/agents/{agentKey}/sessions/{sessionKey}",
baseUri: HttpClient.BaseAddress);
@@ -205,6 +242,8 @@ partial void ProcessGetResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -218,6 +257,11 @@ partial void ProcessGetResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -235,6 +279,8 @@ partial void ProcessGetResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -244,8 +290,7 @@ partial void ProcessGetResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -254,6 +299,11 @@ partial void ProcessGetResponseContent(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -270,14 +320,15 @@ partial void ProcessGetResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -317,6 +368,8 @@ partial void ProcessGetResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -337,6 +390,8 @@ partial void ProcessGetResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Permissions do not allow accessing this agent session.
@@ -437,9 +492,13 @@ partial void ProcessGetResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Vectara.AgentSession.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Vectara.AgentSession.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -467,9 +526,13 @@ partial void ProcessGetResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Vectara.AgentSession.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Vectara.AgentSession.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.AgentSessionsClient.List.g.cs b/src/libs/Vectara/Generated/Vectara.AgentSessionsClient.List.g.cs
index 9caea967..932f0261 100644
--- a/src/libs/Vectara/Generated/Vectara.AgentSessionsClient.List.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.AgentSessionsClient.List.g.cs
@@ -96,6 +96,49 @@ partial void ProcessListResponseContent(
string? pageKey = default,
global::Vectara.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await ListAsResponseAsync(
+ agentKey: agentKey,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ filter: filter,
+ limit: limit,
+ pageKey: pageKey,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// List agent sessions
+ /// List all agent sessions for the specified agent. This endpoint returns high-level information about each session, with optional filtering and pagination. Use this operation to browse existing sessions or to locate a specific session key for further inspection or updates.
+ ///
+ ///
+ ///
+ ///
+ /// A unique key that identifies an agent.
+ /// Example: customer_support
+ ///
+ ///
+ /// Example: support.*
+ ///
+ ///
+ /// Default Value: 10
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> ListAsResponseAsync(
+ string agentKey,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ string? filter = default,
+ int? limit = default,
+ string? pageKey = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -130,13 +173,14 @@ partial void ProcessListResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: $"/v2/agents/{agentKey}/sessions",
- baseUri: HttpClient.BaseAddress);
+ baseUri: HttpClient.BaseAddress);
__pathBuilder
.AddOptionalParameter("filter", filter)
.AddOptionalParameter("limit", limit?.ToString())
- .AddOptionalParameter("page_key", pageKey)
+ .AddOptionalParameter("page_key", pageKey)
;
var __path = __pathBuilder.ToString();
__path = global::Vectara.AutoSDKRequestOptionsSupport.AppendQueryParameters(
@@ -223,6 +267,8 @@ partial void ProcessListResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -236,6 +282,11 @@ partial void ProcessListResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -253,6 +304,8 @@ partial void ProcessListResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -262,8 +315,7 @@ partial void ProcessListResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -272,6 +324,11 @@ partial void ProcessListResponseContent(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -288,14 +345,15 @@ partial void ProcessListResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -335,6 +393,8 @@ partial void ProcessListResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -355,6 +415,8 @@ partial void ProcessListResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Permissions do not allow listing agent sessions.
@@ -455,9 +517,13 @@ partial void ProcessListResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Vectara.ListAgentSessionsResponse.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Vectara.ListAgentSessionsResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -485,9 +551,13 @@ partial void ProcessListResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Vectara.ListAgentSessionsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Vectara.ListAgentSessionsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.AgentSessionsClient.Update.g.cs b/src/libs/Vectara/Generated/Vectara.AgentSessionsClient.Update.g.cs
index bdf89a67..9d89e1bb 100644
--- a/src/libs/Vectara/Generated/Vectara.AgentSessionsClient.Update.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.AgentSessionsClient.Update.g.cs
@@ -88,6 +88,48 @@ partial void ProcessUpdateResponseContent(
string agentKey,
string sessionKey,
+ global::Vectara.UpdateAgentSessionRequest request,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await UpdateAsResponseAsync(
+ agentKey: agentKey,
+ sessionKey: sessionKey,
+
+ request: request,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Update agent session
+ /// Update the configuration of an existing agent session. This endpoint enables you to modify fields such as the name, description, or metadata.
+ /// Updated metadata immediately influences agent behavior and becomes available to instructions and tools for the remainder of the session. For more details about configuring the agent session, see [Create agent session](https://docs.vectara.com/docs/rest-api/create-agent-session).
+ ///
+ ///
+ ///
+ ///
+ /// A unique key that identifies an agent.
+ /// Example: customer_support
+ ///
+ ///
+ /// A unique key that identifies an agent session.
+ /// Example: customer_support_chat
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> UpdateAsResponseAsync(
+ string agentKey,
+ string sessionKey,
+
global::Vectara.UpdateAgentSessionRequest request,
int? requestTimeout = default,
int? requestTimeoutMillis = default,
@@ -128,6 +170,7 @@ partial void ProcessUpdateResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: $"/v2/agents/{agentKey}/sessions/{sessionKey}",
baseUri: HttpClient.BaseAddress);
@@ -221,6 +264,8 @@ partial void ProcessUpdateResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -234,6 +279,11 @@ partial void ProcessUpdateResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -251,6 +301,8 @@ partial void ProcessUpdateResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -260,8 +312,7 @@ partial void ProcessUpdateResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -270,6 +321,11 @@ partial void ProcessUpdateResponseContent(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -286,14 +342,15 @@ partial void ProcessUpdateResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -333,6 +390,8 @@ partial void ProcessUpdateResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -353,6 +412,8 @@ partial void ProcessUpdateResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Session update request was malformed.
@@ -491,9 +552,13 @@ partial void ProcessUpdateResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Vectara.AgentSession.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Vectara.AgentSession.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -521,9 +586,13 @@ partial void ProcessUpdateResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Vectara.AgentSession.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Vectara.AgentSession.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.AgentSessionsClient.g.cs b/src/libs/Vectara/Generated/Vectara.AgentSessionsClient.g.cs
index fab41cf0..82e3d2b5 100644
--- a/src/libs/Vectara/Generated/Vectara.AgentSessionsClient.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.AgentSessionsClient.g.cs
@@ -75,10 +75,10 @@ public AgentSessionsClient(
/// Client-wide request defaults such as headers, query parameters, retries, and timeout.
/// Dispose the HttpClient when the instance is disposed. True by default.
public AgentSessionsClient(
- global::System.Net.Http.HttpClient? httpClient = null,
- global::System.Uri? baseUri = null,
- global::System.Collections.Generic.List? authorizations = null,
- global::Vectara.AutoSDKClientOptions? options = null,
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Uri? baseUri,
+ global::System.Collections.Generic.List? authorizations,
+ global::Vectara.AutoSDKClientOptions? options,
bool disposeHttpClient = true)
{
diff --git a/src/libs/Vectara/Generated/Vectara.AgentsClient.Create.g.cs b/src/libs/Vectara/Generated/Vectara.AgentsClient.Create.g.cs
index fb4101e2..5610a6e0 100644
--- a/src/libs/Vectara/Generated/Vectara.AgentsClient.Create.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.AgentsClient.Create.g.cs
@@ -96,6 +96,58 @@ partial void ProcessCreateResponseContent(
///
public async global::System.Threading.Tasks.Task CreateAsync(
+ global::Vectara.CreateAgentRequest request,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await CreateAsResponseAsync(
+
+ request: request,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Create agent
+ /// Create a new agent. An agent is compromised as 3 main things of functionality:
+ /// 1. The **instructions** an agent follows. Known as a system in prompt in other platforms.
+ /// 2. The **steps** an agent follows when receiving an input.
+ /// 3. The **tools** an agent can use to resolve those steps and instructions.
+ /// Instructions are tied to each step, and should be precisely crafted so that the agent can perform the desired actions when given an input.
+ /// :::tip Creating more precise instructions
+ /// Be specific to exactly what you want the agent to do. For emphasis, use CAPS if you want the agent to follow a specific format. Negative prompts also help with precision such as saying **DO NOT DO THIS**.
+ /// :::
+ /// To use an agent, create a new session (called thread or chat in other platforms), and send new inputs to the agent to get responses.
+ /// :::note
+ /// Only a single step is supported with no follow up steps. So the `first_step` will be only the only step. We will add multiple steps and step types to execute complex workflows, but many agents can work well with a single step.
+ /// :::
+ /// ## LLM configuration
+ /// Agents use LLMs for reasoning and response generation. You can configure the following:
+ /// - **Model**: Choose from available models like GPT-4o.
+ /// - **Parameters**: Adjust temperature, max tokens, and other model-specific settings.
+ /// - **Cost optimization**: Balance performance with token usage.
+ /// - **Retry configuration**: Configure automatic retry behavior for transient failures.
+ /// ## Using retries to improve user experience
+ /// When agents interact with LLMs, transient failures like network interruptions can disrupt communication between the agent and the LLM. You can configure your agent to resume disrupted communication to ensure a smooth user experience.
+ /// - `max_retries`: After an error, the agent will retry its request to the LLM this many times.
+ /// - `initial_backoff_ms`: This is how many milliseconds the agent will wait before retrying, to give the cause of the error time to resolve.
+ /// - `backoff_factor`: Every time the agent retries, it can multiply the last retry delay by this number, increasing the wait between retries. This is like giving a toddler a longer and longer timeout if it continues to misbehave.
+ /// - `max_backoff_ms`: The maximum time you want the agent to wait between retries, so the backoff_factor does not create an unreasonably long delay for your users.
+ ///
+ ///
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> CreateAsResponseAsync(
+
global::Vectara.CreateAgentRequest request,
int? requestTimeout = default,
int? requestTimeoutMillis = default,
@@ -134,6 +186,7 @@ partial void ProcessCreateResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: "/v2/agents",
baseUri: HttpClient.BaseAddress);
@@ -225,6 +278,8 @@ partial void ProcessCreateResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -238,6 +293,11 @@ partial void ProcessCreateResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -255,6 +315,8 @@ partial void ProcessCreateResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -264,8 +326,7 @@ partial void ProcessCreateResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -274,6 +335,11 @@ partial void ProcessCreateResponseContent(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -290,14 +356,15 @@ partial void ProcessCreateResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -337,6 +404,8 @@ partial void ProcessCreateResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -357,6 +426,8 @@ partial void ProcessCreateResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Agent creation request was malformed or contains invalid references.
@@ -457,9 +528,13 @@ partial void ProcessCreateResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Vectara.Agent.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Vectara.Agent.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -487,9 +562,13 @@ partial void ProcessCreateResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Vectara.Agent.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Vectara.Agent.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.AgentsClient.CreateConnector.g.cs b/src/libs/Vectara/Generated/Vectara.AgentsClient.CreateConnector.g.cs
index 1d783fb3..4f7214ab 100644
--- a/src/libs/Vectara/Generated/Vectara.AgentsClient.CreateConnector.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.AgentsClient.CreateConnector.g.cs
@@ -80,6 +80,41 @@ partial void ProcessCreateConnectorResponseContent(
public async global::System.Threading.Tasks.Task CreateConnectorAsync(
string agentKey,
+ global::Vectara.CreateAgentConnectorRequest request,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await CreateConnectorAsResponseAsync(
+ agentKey: agentKey,
+
+ request: request,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Create agent connector
+ /// Create a new connector for an agent to receive events from external platforms like Slack.
+ ///
+ ///
+ ///
+ ///
+ /// A unique key that identifies an agent.
+ /// Example: customer_support
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> CreateConnectorAsResponseAsync(
+ string agentKey,
+
global::Vectara.CreateAgentConnectorRequest request,
int? requestTimeout = default,
int? requestTimeoutMillis = default,
@@ -119,6 +154,7 @@ partial void ProcessCreateConnectorResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: $"/v2/agents/{agentKey}/connectors",
baseUri: HttpClient.BaseAddress);
@@ -211,6 +247,8 @@ partial void ProcessCreateConnectorResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -224,6 +262,11 @@ partial void ProcessCreateConnectorResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -241,6 +284,8 @@ partial void ProcessCreateConnectorResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -250,8 +295,7 @@ partial void ProcessCreateConnectorResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -260,6 +304,11 @@ partial void ProcessCreateConnectorResponseContent(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -276,14 +325,15 @@ partial void ProcessCreateConnectorResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -323,6 +373,8 @@ partial void ProcessCreateConnectorResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -343,6 +395,8 @@ partial void ProcessCreateConnectorResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Connector creation request was malformed or contains invalid configuration.
@@ -481,9 +535,13 @@ partial void ProcessCreateConnectorResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Vectara.AgentConnector.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Vectara.AgentConnector.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -511,9 +569,13 @@ partial void ProcessCreateConnectorResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Vectara.AgentConnector.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Vectara.AgentConnector.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.AgentsClient.Delete.g.cs b/src/libs/Vectara/Generated/Vectara.AgentsClient.Delete.g.cs
index d47a8b91..1a3a62d5 100644
--- a/src/libs/Vectara/Generated/Vectara.AgentsClient.Delete.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.AgentsClient.Delete.g.cs
@@ -76,6 +76,35 @@ partial void ProcessDeleteResponse(
int? requestTimeoutMillis = default,
global::Vectara.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await DeleteAsResponseAsync(
+ agentKey: agentKey,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Delete agent
+ /// The Delete Agent API enables you to permanently remove an AI agent and its configuration from the Vectara platform, supporting agent lifecycle management and resource cleanup in enterprise environments.
+ /// Use this API for decommissioning outdated agents, cleaning up development and testing environments, removing agents that are no longer needed, and maintaining organized agent inventories as your AI deployments evolve. The permanent nature of deletion makes this API critical for environments where data governance and resource management are essential.
+ ///
+ ///
+ ///
+ ///
+ /// A unique key that identifies an agent.
+ /// Example: customer_support
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task DeleteAsResponseAsync(
+ string agentKey,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -107,6 +136,7 @@ partial void ProcessDeleteResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: $"/v2/agents/{agentKey}",
baseUri: HttpClient.BaseAddress);
@@ -192,6 +222,8 @@ partial void ProcessDeleteResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -205,6 +237,11 @@ partial void ProcessDeleteResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -222,6 +259,8 @@ partial void ProcessDeleteResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -231,8 +270,7 @@ partial void ProcessDeleteResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -241,6 +279,11 @@ partial void ProcessDeleteResponse(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -257,14 +300,15 @@ partial void ProcessDeleteResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -304,6 +348,8 @@ partial void ProcessDeleteResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -324,6 +370,8 @@ partial void ProcessDeleteResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Permissions do not allow deleting this agent.
@@ -420,6 +468,10 @@ partial void ProcessDeleteResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -441,6 +493,10 @@ partial void ProcessDeleteResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.AgentsClient.DeleteConnector.g.cs b/src/libs/Vectara/Generated/Vectara.AgentsClient.DeleteConnector.g.cs
index 34c3a2a2..92d95497 100644
--- a/src/libs/Vectara/Generated/Vectara.AgentsClient.DeleteConnector.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.AgentsClient.DeleteConnector.g.cs
@@ -81,6 +81,39 @@ partial void ProcessDeleteConnectorResponse(
int? requestTimeoutMillis = default,
global::Vectara.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await DeleteConnectorAsResponseAsync(
+ agentKey: agentKey,
+ connectorId: connectorId,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Delete agent connector
+ /// Permanently delete an agent connector and all its associated configuration. This action cannot be undone.
+ ///
+ ///
+ ///
+ ///
+ /// A unique key that identifies an agent.
+ /// Example: customer_support
+ ///
+ ///
+ /// Example: con_slack_support
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task DeleteConnectorAsResponseAsync(
+ string agentKey,
+ string connectorId,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -113,6 +146,7 @@ partial void ProcessDeleteConnectorResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: $"/v2/agents/{agentKey}/connectors/{connectorId}",
baseUri: HttpClient.BaseAddress);
@@ -199,6 +233,8 @@ partial void ProcessDeleteConnectorResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -212,6 +248,11 @@ partial void ProcessDeleteConnectorResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -229,6 +270,8 @@ partial void ProcessDeleteConnectorResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -238,8 +281,7 @@ partial void ProcessDeleteConnectorResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -248,6 +290,11 @@ partial void ProcessDeleteConnectorResponse(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -264,14 +311,15 @@ partial void ProcessDeleteConnectorResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -311,6 +359,8 @@ partial void ProcessDeleteConnectorResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -331,6 +381,8 @@ partial void ProcessDeleteConnectorResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Permissions do not allow deleting this connector.
@@ -427,6 +479,10 @@ partial void ProcessDeleteConnectorResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -448,6 +504,10 @@ partial void ProcessDeleteConnectorResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.AgentsClient.Get.g.cs b/src/libs/Vectara/Generated/Vectara.AgentsClient.Get.g.cs
index 9f38381b..d83fa3aa 100644
--- a/src/libs/Vectara/Generated/Vectara.AgentsClient.Get.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.AgentsClient.Get.g.cs
@@ -81,6 +81,37 @@ partial void ProcessGetResponseContent(
int? requestTimeoutMillis = default,
global::Vectara.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GetAsResponseAsync(
+ agentKey: agentKey,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Get agent
+ /// The Get Agent API enables you to retrieve the complete configuration and operational details of a specific AI agent, providing comprehensive visibility into agent capabilities, tool integrations, behavioral instructions, and metadata.
+ /// Use this API to inspect agent configurations before creating sessions, troubleshoot agent behavior issues, clone agent configurations for new deployments, and maintain documentation of agent capabilities across your enterprise AI infrastructure.
+ ///
+ ///
+ ///
+ ///
+ /// A unique key that identifies an agent.
+ /// Example: customer_support
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> GetAsResponseAsync(
+ string agentKey,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -112,6 +143,7 @@ partial void ProcessGetResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: $"/v2/agents/{agentKey}",
baseUri: HttpClient.BaseAddress);
@@ -197,6 +229,8 @@ partial void ProcessGetResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -210,6 +244,11 @@ partial void ProcessGetResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -227,6 +266,8 @@ partial void ProcessGetResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -236,8 +277,7 @@ partial void ProcessGetResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -246,6 +286,11 @@ partial void ProcessGetResponseContent(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -262,14 +307,15 @@ partial void ProcessGetResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -309,6 +355,8 @@ partial void ProcessGetResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -329,6 +377,8 @@ partial void ProcessGetResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Permissions do not allow accessing this agent.
@@ -429,9 +479,13 @@ partial void ProcessGetResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Vectara.Agent.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Vectara.Agent.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -459,9 +513,13 @@ partial void ProcessGetResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Vectara.Agent.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Vectara.Agent.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.AgentsClient.GetConnector.g.cs b/src/libs/Vectara/Generated/Vectara.AgentsClient.GetConnector.g.cs
index e1d20b1e..55ebc157 100644
--- a/src/libs/Vectara/Generated/Vectara.AgentsClient.GetConnector.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.AgentsClient.GetConnector.g.cs
@@ -86,6 +86,41 @@ partial void ProcessGetConnectorResponseContent(
int? requestTimeoutMillis = default,
global::Vectara.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GetConnectorAsResponseAsync(
+ agentKey: agentKey,
+ connectorId: connectorId,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Get agent connector
+ /// Retrieve the details of a specific agent connector by its ID, including its configuration and status.
+ ///
+ ///
+ ///
+ ///
+ /// A unique key that identifies an agent.
+ /// Example: customer_support
+ ///
+ ///
+ /// Example: con_slack_support
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> GetConnectorAsResponseAsync(
+ string agentKey,
+ string connectorId,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -118,6 +153,7 @@ partial void ProcessGetConnectorResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: $"/v2/agents/{agentKey}/connectors/{connectorId}",
baseUri: HttpClient.BaseAddress);
@@ -204,6 +240,8 @@ partial void ProcessGetConnectorResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -217,6 +255,11 @@ partial void ProcessGetConnectorResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -234,6 +277,8 @@ partial void ProcessGetConnectorResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -243,8 +288,7 @@ partial void ProcessGetConnectorResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -253,6 +297,11 @@ partial void ProcessGetConnectorResponseContent(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -269,14 +318,15 @@ partial void ProcessGetConnectorResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -316,6 +366,8 @@ partial void ProcessGetConnectorResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -336,6 +388,8 @@ partial void ProcessGetConnectorResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Permissions do not allow accessing this connector.
@@ -436,9 +490,13 @@ partial void ProcessGetConnectorResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Vectara.AgentConnector.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Vectara.AgentConnector.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -466,9 +524,13 @@ partial void ProcessGetConnectorResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Vectara.AgentConnector.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Vectara.AgentConnector.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.AgentsClient.GetIdentity.g.cs b/src/libs/Vectara/Generated/Vectara.AgentsClient.GetIdentity.g.cs
index bd23ed14..64b0f51f 100644
--- a/src/libs/Vectara/Generated/Vectara.AgentsClient.GetIdentity.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.AgentsClient.GetIdentity.g.cs
@@ -82,6 +82,38 @@ partial void ProcessGetIdentityResponseContent(
int? requestTimeoutMillis = default,
global::Vectara.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GetIdentityAsResponseAsync(
+ agentKey: agentKey,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Get agent identity
+ /// Retrieve the identity associated with an agent. The identity is the service account the agent uses when executing tools.
+ /// In `auto` mode (the default), the platform keeps the identity's roles in sync with the agent's tool configuration.
+ /// In `manual` mode, the roles are frozen and the platform will not modify them when the agent is updated.
+ ///
+ ///
+ ///
+ ///
+ /// A unique key that identifies an agent.
+ /// Example: customer_support
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> GetIdentityAsResponseAsync(
+ string agentKey,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -113,6 +145,7 @@ partial void ProcessGetIdentityResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: $"/v2/agents/{agentKey}/identity",
baseUri: HttpClient.BaseAddress);
@@ -198,6 +231,8 @@ partial void ProcessGetIdentityResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -211,6 +246,11 @@ partial void ProcessGetIdentityResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -228,6 +268,8 @@ partial void ProcessGetIdentityResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -237,8 +279,7 @@ partial void ProcessGetIdentityResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -247,6 +288,11 @@ partial void ProcessGetIdentityResponseContent(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -263,14 +309,15 @@ partial void ProcessGetIdentityResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -310,6 +357,8 @@ partial void ProcessGetIdentityResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -330,6 +379,8 @@ partial void ProcessGetIdentityResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Permissions do not allow accessing this agent.
@@ -430,9 +481,13 @@ partial void ProcessGetIdentityResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Vectara.AgentIdentity.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Vectara.AgentIdentity.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -460,9 +515,13 @@ partial void ProcessGetIdentityResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Vectara.AgentIdentity.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Vectara.AgentIdentity.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.AgentsClient.List.g.cs b/src/libs/Vectara/Generated/Vectara.AgentsClient.List.g.cs
index b76df1dd..2c6182cb 100644
--- a/src/libs/Vectara/Generated/Vectara.AgentsClient.List.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.AgentsClient.List.g.cs
@@ -95,6 +95,48 @@ partial void ProcessListResponseContent(
string? pageKey = default,
global::Vectara.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await ListAsResponseAsync(
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ filter: filter,
+ enabled: enabled,
+ limit: limit,
+ pageKey: pageKey,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// List agents
+ /// The List Agents API enables you to retrieve a paginated list of all agents available to the authenticated user. This is useful for managing and monitoring agent deployments across use cases and environments.
+ ///
+ ///
+ ///
+ ///
+ /// Example: support.*
+ ///
+ ///
+ /// Example: true
+ ///
+ ///
+ /// Default Value: 10
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> ListAsResponseAsync(
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ string? filter = default,
+ bool? enabled = default,
+ int? limit = default,
+ string? pageKey = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -129,14 +171,15 @@ partial void ProcessListResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: "/v2/agents",
- baseUri: HttpClient.BaseAddress);
+ baseUri: HttpClient.BaseAddress);
__pathBuilder
.AddOptionalParameter("filter", filter)
.AddOptionalParameter("enabled", enabled?.ToString().ToLowerInvariant())
.AddOptionalParameter("limit", limit?.ToString())
- .AddOptionalParameter("page_key", pageKey)
+ .AddOptionalParameter("page_key", pageKey)
;
var __path = __pathBuilder.ToString();
__path = global::Vectara.AutoSDKRequestOptionsSupport.AppendQueryParameters(
@@ -223,6 +266,8 @@ partial void ProcessListResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -236,6 +281,11 @@ partial void ProcessListResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -253,6 +303,8 @@ partial void ProcessListResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -262,8 +314,7 @@ partial void ProcessListResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -272,6 +323,11 @@ partial void ProcessListResponseContent(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -288,14 +344,15 @@ partial void ProcessListResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -335,6 +392,8 @@ partial void ProcessListResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -355,6 +414,8 @@ partial void ProcessListResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Permissions do not allow listing agents.
@@ -417,9 +478,13 @@ partial void ProcessListResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Vectara.ListAgentsResponse.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Vectara.ListAgentsResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -447,9 +512,13 @@ partial void ProcessListResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Vectara.ListAgentsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Vectara.ListAgentsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.AgentsClient.ListConnectors.g.cs b/src/libs/Vectara/Generated/Vectara.AgentsClient.ListConnectors.g.cs
index 967f222c..669126ad 100644
--- a/src/libs/Vectara/Generated/Vectara.AgentsClient.ListConnectors.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.AgentsClient.ListConnectors.g.cs
@@ -102,6 +102,54 @@ partial void ProcessListConnectorsResponseContent(
string? pageKey = default,
global::Vectara.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await ListConnectorsAsResponseAsync(
+ agentKey: agentKey,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ type: type,
+ enabled: enabled,
+ limit: limit,
+ pageKey: pageKey,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// List agent connectors
+ /// List all connectors for a specific agent, with optional filtering and pagination.
+ ///
+ ///
+ ///
+ ///
+ /// A unique key that identifies an agent.
+ /// Example: customer_support
+ ///
+ ///
+ /// Example: slack
+ ///
+ ///
+ /// Example: true
+ ///
+ ///
+ /// Default Value: 10
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> ListConnectorsAsResponseAsync(
+ string agentKey,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ global::Vectara.ListAgentConnectorsType? type = default,
+ bool? enabled = default,
+ int? limit = default,
+ string? pageKey = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -137,14 +185,15 @@ partial void ProcessListConnectorsResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: $"/v2/agents/{agentKey}/connectors",
- baseUri: HttpClient.BaseAddress);
+ baseUri: HttpClient.BaseAddress);
__pathBuilder
.AddOptionalParameter("type", type?.ToValueString())
.AddOptionalParameter("enabled", enabled?.ToString().ToLowerInvariant())
.AddOptionalParameter("limit", limit?.ToString())
- .AddOptionalParameter("page_key", pageKey)
+ .AddOptionalParameter("page_key", pageKey)
;
var __path = __pathBuilder.ToString();
__path = global::Vectara.AutoSDKRequestOptionsSupport.AppendQueryParameters(
@@ -232,6 +281,8 @@ partial void ProcessListConnectorsResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -245,6 +296,11 @@ partial void ProcessListConnectorsResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -262,6 +318,8 @@ partial void ProcessListConnectorsResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -271,8 +329,7 @@ partial void ProcessListConnectorsResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -281,6 +338,11 @@ partial void ProcessListConnectorsResponseContent(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -297,14 +359,15 @@ partial void ProcessListConnectorsResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -344,6 +407,8 @@ partial void ProcessListConnectorsResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -364,6 +429,8 @@ partial void ProcessListConnectorsResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Permissions do not allow listing connectors for this agent.
@@ -464,9 +531,13 @@ partial void ProcessListConnectorsResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Vectara.ListAgentConnectorsResponse.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Vectara.ListAgentConnectorsResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -494,9 +565,13 @@ partial void ProcessListConnectorsResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Vectara.ListAgentConnectorsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Vectara.ListAgentConnectorsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.AgentsClient.Replace.g.cs b/src/libs/Vectara/Generated/Vectara.AgentsClient.Replace.g.cs
index 1c4e7676..74322c80 100644
--- a/src/libs/Vectara/Generated/Vectara.AgentsClient.Replace.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.AgentsClient.Replace.g.cs
@@ -80,6 +80,41 @@ partial void ProcessReplaceResponseContent(
public async global::System.Threading.Tasks.Task ReplaceAsync(
string agentKey,
+ global::Vectara.CreateAgentRequest request,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await ReplaceAsResponseAsync(
+ agentKey: agentKey,
+
+ request: request,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Replace agent
+ /// The Replace Agent API enables you to completely replace an existing agent configuration, including its corpora, tools, and generation presets. This endpoint performs a full replacement of the agent definition, unlike the Update Agent API which only modifies specified fields.
+ ///
+ ///
+ ///
+ ///
+ /// A unique key that identifies an agent.
+ /// Example: customer_support
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> ReplaceAsResponseAsync(
+ string agentKey,
+
global::Vectara.CreateAgentRequest request,
int? requestTimeout = default,
int? requestTimeoutMillis = default,
@@ -119,6 +154,7 @@ partial void ProcessReplaceResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: $"/v2/agents/{agentKey}",
baseUri: HttpClient.BaseAddress);
@@ -211,6 +247,8 @@ partial void ProcessReplaceResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -224,6 +262,11 @@ partial void ProcessReplaceResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -241,6 +284,8 @@ partial void ProcessReplaceResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -250,8 +295,7 @@ partial void ProcessReplaceResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -260,6 +304,11 @@ partial void ProcessReplaceResponseContent(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -276,14 +325,15 @@ partial void ProcessReplaceResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -323,6 +373,8 @@ partial void ProcessReplaceResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -343,6 +395,8 @@ partial void ProcessReplaceResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Agent replacement request was malformed or contains invalid references.
@@ -481,9 +535,13 @@ partial void ProcessReplaceResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Vectara.Agent.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Vectara.Agent.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -511,9 +569,13 @@ partial void ProcessReplaceResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Vectara.Agent.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Vectara.Agent.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.AgentsClient.Update.g.cs b/src/libs/Vectara/Generated/Vectara.AgentsClient.Update.g.cs
index 3f850ffc..9795ac3c 100644
--- a/src/libs/Vectara/Generated/Vectara.AgentsClient.Update.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.AgentsClient.Update.g.cs
@@ -81,6 +81,42 @@ partial void ProcessUpdateResponseContent(
public async global::System.Threading.Tasks.Task UpdateAsync(
string agentKey,
+ global::Vectara.UpdateAgentRequest request,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await UpdateAsResponseAsync(
+ agentKey: agentKey,
+
+ request: request,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Update agent
+ /// The Update Agent API enables you to modify an existing agent configuration, including tool assignments, behavioral instructions, model parameters, and operational metadata.
+ /// Use this API to evolve agent capabilities over time, adding new tools as they become available, refining behavioral instructions based on user feedback, adjusting model parameters for optimal performance, and updating metadata for better organization across your agent ecosystem.
+ ///
+ ///
+ ///
+ ///
+ /// A unique key that identifies an agent.
+ /// Example: customer_support
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> UpdateAsResponseAsync(
+ string agentKey,
+
global::Vectara.UpdateAgentRequest request,
int? requestTimeout = default,
int? requestTimeoutMillis = default,
@@ -120,6 +156,7 @@ partial void ProcessUpdateResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: $"/v2/agents/{agentKey}",
baseUri: HttpClient.BaseAddress);
@@ -212,6 +249,8 @@ partial void ProcessUpdateResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -225,6 +264,11 @@ partial void ProcessUpdateResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -242,6 +286,8 @@ partial void ProcessUpdateResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -251,8 +297,7 @@ partial void ProcessUpdateResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -261,6 +306,11 @@ partial void ProcessUpdateResponseContent(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -277,14 +327,15 @@ partial void ProcessUpdateResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -324,6 +375,8 @@ partial void ProcessUpdateResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -344,6 +397,8 @@ partial void ProcessUpdateResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Agent update request was malformed or contains invalid references.
@@ -482,9 +537,13 @@ partial void ProcessUpdateResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Vectara.Agent.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Vectara.Agent.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -512,9 +571,13 @@ partial void ProcessUpdateResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Vectara.Agent.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Vectara.Agent.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.AgentsClient.UpdateConnector.g.cs b/src/libs/Vectara/Generated/Vectara.AgentsClient.UpdateConnector.g.cs
index bee8cdd6..f94d520c 100644
--- a/src/libs/Vectara/Generated/Vectara.AgentsClient.UpdateConnector.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.AgentsClient.UpdateConnector.g.cs
@@ -86,6 +86,46 @@ partial void ProcessUpdateConnectorResponseContent(
string agentKey,
string connectorId,
+ global::Vectara.UpdateAgentConnectorRequest request,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await UpdateConnectorAsResponseAsync(
+ agentKey: agentKey,
+ connectorId: connectorId,
+
+ request: request,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Update agent connector
+ /// Update an existing agent connector's configuration, status, or other properties.
+ ///
+ ///
+ ///
+ ///
+ /// A unique key that identifies an agent.
+ /// Example: customer_support
+ ///
+ ///
+ /// Example: con_slack_support
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> UpdateConnectorAsResponseAsync(
+ string agentKey,
+ string connectorId,
+
global::Vectara.UpdateAgentConnectorRequest request,
int? requestTimeout = default,
int? requestTimeoutMillis = default,
@@ -126,6 +166,7 @@ partial void ProcessUpdateConnectorResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: $"/v2/agents/{agentKey}/connectors/{connectorId}",
baseUri: HttpClient.BaseAddress);
@@ -219,6 +260,8 @@ partial void ProcessUpdateConnectorResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -232,6 +275,11 @@ partial void ProcessUpdateConnectorResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -249,6 +297,8 @@ partial void ProcessUpdateConnectorResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -258,8 +308,7 @@ partial void ProcessUpdateConnectorResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -268,6 +317,11 @@ partial void ProcessUpdateConnectorResponseContent(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -284,14 +338,15 @@ partial void ProcessUpdateConnectorResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -331,6 +386,8 @@ partial void ProcessUpdateConnectorResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -351,6 +408,8 @@ partial void ProcessUpdateConnectorResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Connector update request was malformed or contains invalid configuration.
@@ -489,9 +548,13 @@ partial void ProcessUpdateConnectorResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Vectara.AgentConnector.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Vectara.AgentConnector.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -519,9 +582,13 @@ partial void ProcessUpdateConnectorResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Vectara.AgentConnector.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Vectara.AgentConnector.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.AgentsClient.UpdateIdentity.g.cs b/src/libs/Vectara/Generated/Vectara.AgentsClient.UpdateIdentity.g.cs
index 09a4c969..2f3bd299 100644
--- a/src/libs/Vectara/Generated/Vectara.AgentsClient.UpdateIdentity.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.AgentsClient.UpdateIdentity.g.cs
@@ -82,6 +82,43 @@ partial void ProcessUpdateIdentityResponseContent(
public async global::System.Threading.Tasks.Task UpdateIdentityAsync(
string agentKey,
+ global::Vectara.UpdateAgentIdentityRequest request,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await UpdateIdentityAsResponseAsync(
+ agentKey: agentKey,
+
+ request: request,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Update agent identity
+ /// Update the agent's identity role management mode and/or roles.
+ /// Setting mode to `manual` freezes the current roles. The platform will no longer recompute roles when the agent's tool configuration changes. This is useful when you need to grant the agent additional permissions beyond what its tools require.
+ /// Setting mode to `auto` resumes platform-managed roles. The platform will immediately resync the roles to match the current tool configuration.
+ ///
+ ///
+ ///
+ ///
+ /// A unique key that identifies an agent.
+ /// Example: customer_support
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> UpdateIdentityAsResponseAsync(
+ string agentKey,
+
global::Vectara.UpdateAgentIdentityRequest request,
int? requestTimeout = default,
int? requestTimeoutMillis = default,
@@ -121,6 +158,7 @@ partial void ProcessUpdateIdentityResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: $"/v2/agents/{agentKey}/identity",
baseUri: HttpClient.BaseAddress);
@@ -213,6 +251,8 @@ partial void ProcessUpdateIdentityResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -226,6 +266,11 @@ partial void ProcessUpdateIdentityResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -243,6 +288,8 @@ partial void ProcessUpdateIdentityResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -252,8 +299,7 @@ partial void ProcessUpdateIdentityResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -262,6 +308,11 @@ partial void ProcessUpdateIdentityResponseContent(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -278,14 +329,15 @@ partial void ProcessUpdateIdentityResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -325,6 +377,8 @@ partial void ProcessUpdateIdentityResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -345,6 +399,8 @@ partial void ProcessUpdateIdentityResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Invalid request.
@@ -483,9 +539,13 @@ partial void ProcessUpdateIdentityResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Vectara.AgentIdentity.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Vectara.AgentIdentity.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -513,9 +573,13 @@ partial void ProcessUpdateIdentityResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Vectara.AgentIdentity.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Vectara.AgentIdentity.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.AgentsClient.g.cs b/src/libs/Vectara/Generated/Vectara.AgentsClient.g.cs
index edce6ee4..ef49f1c8 100644
--- a/src/libs/Vectara/Generated/Vectara.AgentsClient.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.AgentsClient.g.cs
@@ -75,10 +75,10 @@ public AgentsClient(
/// Client-wide request defaults such as headers, query parameters, retries, and timeout.
/// Dispose the HttpClient when the instance is disposed. True by default.
public AgentsClient(
- global::System.Net.Http.HttpClient? httpClient = null,
- global::System.Uri? baseUri = null,
- global::System.Collections.Generic.List? authorizations = null,
- global::Vectara.AutoSDKClientOptions? options = null,
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Uri? baseUri,
+ global::System.Collections.Generic.List? authorizations,
+ global::Vectara.AutoSDKClientOptions? options,
bool disposeHttpClient = true)
{
diff --git a/src/libs/Vectara/Generated/Vectara.ApiKeysClient.Create.g.cs b/src/libs/Vectara/Generated/Vectara.ApiKeysClient.Create.g.cs
index 28024b12..4cabfd94 100644
--- a/src/libs/Vectara/Generated/Vectara.ApiKeysClient.Create.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.ApiKeysClient.Create.g.cs
@@ -79,6 +79,39 @@ partial void ProcessCreateResponseContent(
///
public async global::System.Threading.Tasks.Task CreateAsync(
+ global::Vectara.CreateApiKeyRequest request,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await CreateAsResponseAsync(
+
+ request: request,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Create an API key
+ /// The Create API Key API lets you create new API keys, which you can bind to one or multiple corpora. You can also decide whether to designate each key for specific access like personal API keys, only querying (read-only) or both querying and indexing (read-write).
+ /// This capability is useful in scenarios where you have applications that require different levels of access to corpora data. For example, you might create a read-only API key for an application that only needs to query data.
+ /// :::note
+ /// For more information about the different types of API keys, see [API Key Management](/docs/deploy-and-scale/authentication/api-key-management).
+ /// :::
+ ///
+ ///
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> CreateAsResponseAsync(
+
global::Vectara.CreateApiKeyRequest request,
int? requestTimeout = default,
int? requestTimeoutMillis = default,
@@ -117,6 +150,7 @@ partial void ProcessCreateResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: "/v2/api_keys",
baseUri: HttpClient.BaseAddress);
@@ -208,6 +242,8 @@ partial void ProcessCreateResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -221,6 +257,11 @@ partial void ProcessCreateResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -238,6 +279,8 @@ partial void ProcessCreateResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -247,8 +290,7 @@ partial void ProcessCreateResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -257,6 +299,11 @@ partial void ProcessCreateResponseContent(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -273,14 +320,15 @@ partial void ProcessCreateResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -320,6 +368,8 @@ partial void ProcessCreateResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -340,6 +390,8 @@ partial void ProcessCreateResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// API key creation request was malformed.
@@ -440,9 +492,13 @@ partial void ProcessCreateResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Vectara.ApiKey.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Vectara.ApiKey.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -470,9 +526,13 @@ partial void ProcessCreateResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Vectara.ApiKey.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Vectara.ApiKey.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.ApiKeysClient.Delete.g.cs b/src/libs/Vectara/Generated/Vectara.ApiKeysClient.Delete.g.cs
index 0b19f4b1..a7dbc151 100644
--- a/src/libs/Vectara/Generated/Vectara.ApiKeysClient.Delete.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.ApiKeysClient.Delete.g.cs
@@ -74,6 +74,33 @@ partial void ProcessDeleteResponse(
int? requestTimeoutMillis = default,
global::Vectara.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await DeleteAsResponseAsync(
+ apiKeyId: apiKeyId,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Delete an API key
+ /// The Delete API Key API lets you delete one or more existing API keys.
+ /// This capability is useful for managing the lifecycle and security of
+ /// API keys such as when they are no longer needed or when a key is compromised.
+ ///
+ ///
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task DeleteAsResponseAsync(
+ string apiKeyId,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -105,6 +132,7 @@ partial void ProcessDeleteResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: $"/v2/api_keys/{apiKeyId}",
baseUri: HttpClient.BaseAddress);
@@ -190,6 +218,8 @@ partial void ProcessDeleteResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -203,6 +233,11 @@ partial void ProcessDeleteResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -220,6 +255,8 @@ partial void ProcessDeleteResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -229,8 +266,7 @@ partial void ProcessDeleteResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -239,6 +275,11 @@ partial void ProcessDeleteResponse(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -255,14 +296,15 @@ partial void ProcessDeleteResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -302,6 +344,8 @@ partial void ProcessDeleteResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -322,6 +366,8 @@ partial void ProcessDeleteResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Permissions do not allow deleting this API key.
@@ -380,6 +426,10 @@ partial void ProcessDeleteResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -401,6 +451,10 @@ partial void ProcessDeleteResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.ApiKeysClient.Get.g.cs b/src/libs/Vectara/Generated/Vectara.ApiKeysClient.Get.g.cs
index 1e0654e5..df960516 100644
--- a/src/libs/Vectara/Generated/Vectara.ApiKeysClient.Get.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.ApiKeysClient.Get.g.cs
@@ -78,6 +78,34 @@ partial void ProcessGetResponseContent(
int? requestTimeoutMillis = default,
global::Vectara.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GetAsResponseAsync(
+ apiKeyId: apiKeyId,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Get an API key
+ /// The Get API Key API lists all existing API keys for a customer ID. It also shows what corpora are accessed by these keys and with what permissions.
+ /// This capability can provide insights into key usage and status and help you manage the lifecycle and security of your API keys.
+ ///
+ ///
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> GetAsResponseAsync(
+ string apiKeyId,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -109,6 +137,7 @@ partial void ProcessGetResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: $"/v2/api_keys/{apiKeyId}",
baseUri: HttpClient.BaseAddress);
@@ -194,6 +223,8 @@ partial void ProcessGetResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -207,6 +238,11 @@ partial void ProcessGetResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -224,6 +260,8 @@ partial void ProcessGetResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -233,8 +271,7 @@ partial void ProcessGetResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -243,6 +280,11 @@ partial void ProcessGetResponseContent(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -259,14 +301,15 @@ partial void ProcessGetResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -306,6 +349,8 @@ partial void ProcessGetResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -326,6 +371,8 @@ partial void ProcessGetResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Permissions do not allow getting this API key.
@@ -388,9 +435,13 @@ partial void ProcessGetResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Vectara.ApiKey.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Vectara.ApiKey.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -418,9 +469,13 @@ partial void ProcessGetResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Vectara.ApiKey.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Vectara.ApiKey.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.ApiKeysClient.List.g.cs b/src/libs/Vectara/Generated/Vectara.ApiKeysClient.List.g.cs
index 04145c0d..45ad3044 100644
--- a/src/libs/Vectara/Generated/Vectara.ApiKeysClient.List.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.ApiKeysClient.List.g.cs
@@ -97,6 +97,50 @@ partial void ProcessListResponseContent(
global::Vectara.ApiKeyRole? apiKeyRole = default,
global::Vectara.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await ListAsResponseAsync(
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ limit: limit,
+ pageKey: pageKey,
+ corpusKey: corpusKey,
+ apiKeyRole: apiKeyRole,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// List API keys
+ /// The List API Keys API lists all existing API keys for a customer ID. It also shows what corpora are accessed by these keys and with what permissions. This capability can provide insights into key usage and status and help you manage the lifecycle and security of your API keys.
+ ///
+ ///
+ ///
+ ///
+ /// Default Value: 10
+ ///
+ ///
+ ///
+ /// A user-provided key for a corpus.
+ /// Example: my-corpus
+ ///
+ ///
+ /// Role of the API key. A serving API key can only perform query type requests on its corpora. A serving and indexing key can perform both indexing and query type requests on its corpora.
+ /// A personal API key has all the same permissions as the creator of the API key.
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> ListAsResponseAsync(
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ int? limit = default,
+ string? pageKey = default,
+ string? corpusKey = default,
+ global::Vectara.ApiKeyRole? apiKeyRole = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -131,14 +175,15 @@ partial void ProcessListResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: "/v2/api_keys",
- baseUri: HttpClient.BaseAddress);
+ baseUri: HttpClient.BaseAddress);
__pathBuilder
.AddOptionalParameter("limit", limit?.ToString())
.AddOptionalParameter("page_key", pageKey)
.AddOptionalParameter("corpus_key", corpusKey)
- .AddOptionalParameter("api_key_role", apiKeyRole?.ToValueString())
+ .AddOptionalParameter("api_key_role", apiKeyRole?.ToValueString())
;
var __path = __pathBuilder.ToString();
__path = global::Vectara.AutoSDKRequestOptionsSupport.AppendQueryParameters(
@@ -225,6 +270,8 @@ partial void ProcessListResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -238,6 +285,11 @@ partial void ProcessListResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -255,6 +307,8 @@ partial void ProcessListResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -264,8 +318,7 @@ partial void ProcessListResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -274,6 +327,11 @@ partial void ProcessListResponseContent(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -290,14 +348,15 @@ partial void ProcessListResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -337,6 +396,8 @@ partial void ProcessListResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -357,6 +418,8 @@ partial void ProcessListResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// API key list request was malformed.
@@ -457,9 +520,13 @@ partial void ProcessListResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Vectara.ListApiKeysResponse.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Vectara.ListApiKeysResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -487,9 +554,13 @@ partial void ProcessListResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Vectara.ListApiKeysResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Vectara.ListApiKeysResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.ApiKeysClient.Update.g.cs b/src/libs/Vectara/Generated/Vectara.ApiKeysClient.Update.g.cs
index da794b86..3e543f3f 100644
--- a/src/libs/Vectara/Generated/Vectara.ApiKeysClient.Update.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.ApiKeysClient.Update.g.cs
@@ -78,6 +78,39 @@ partial void ProcessUpdateResponseContent(
public async global::System.Threading.Tasks.Task UpdateAsync(
string apiKeyId,
+ global::Vectara.UpdateApiKeyRequest request,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await UpdateAsResponseAsync(
+ apiKeyId: apiKeyId,
+
+ request: request,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Update an API key
+ /// The Update API Key API lets you enable or disable specific API keys. You can use this endpoint to temporarily disable access without deleting the key.
+ /// This capability is useful for scenarios like maintenance windows, or when your team no longer requires access to a specific corpus.
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> UpdateAsResponseAsync(
+ string apiKeyId,
+
global::Vectara.UpdateApiKeyRequest request,
int? requestTimeout = default,
int? requestTimeoutMillis = default,
@@ -117,6 +150,7 @@ partial void ProcessUpdateResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: $"/v2/api_keys/{apiKeyId}",
baseUri: HttpClient.BaseAddress);
@@ -209,6 +243,8 @@ partial void ProcessUpdateResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -222,6 +258,11 @@ partial void ProcessUpdateResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -239,6 +280,8 @@ partial void ProcessUpdateResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -248,8 +291,7 @@ partial void ProcessUpdateResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -258,6 +300,11 @@ partial void ProcessUpdateResponseContent(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -274,14 +321,15 @@ partial void ProcessUpdateResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -321,6 +369,8 @@ partial void ProcessUpdateResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -341,6 +391,8 @@ partial void ProcessUpdateResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Permissions do not allow getting this API key.
@@ -403,9 +455,13 @@ partial void ProcessUpdateResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Vectara.ApiKey.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Vectara.ApiKey.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -433,9 +489,13 @@ partial void ProcessUpdateResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Vectara.ApiKey.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Vectara.ApiKey.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.ApiKeysClient.g.cs b/src/libs/Vectara/Generated/Vectara.ApiKeysClient.g.cs
index b7a54f39..b0d0a632 100644
--- a/src/libs/Vectara/Generated/Vectara.ApiKeysClient.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.ApiKeysClient.g.cs
@@ -75,10 +75,10 @@ public ApiKeysClient(
/// Client-wide request defaults such as headers, query parameters, retries, and timeout.
/// Dispose the HttpClient when the instance is disposed. True by default.
public ApiKeysClient(
- global::System.Net.Http.HttpClient? httpClient = null,
- global::System.Uri? baseUri = null,
- global::System.Collections.Generic.List? authorizations = null,
- global::Vectara.AutoSDKClientOptions? options = null,
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Uri? baseUri,
+ global::System.Collections.Generic.List? authorizations,
+ global::Vectara.AutoSDKClientOptions? options,
bool disposeHttpClient = true)
{
diff --git a/src/libs/Vectara/Generated/Vectara.AppClientsClient.Create.g.cs b/src/libs/Vectara/Generated/Vectara.AppClientsClient.Create.g.cs
index 340d17d0..6e0447c9 100644
--- a/src/libs/Vectara/Generated/Vectara.AppClientsClient.Create.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.AppClientsClient.Create.g.cs
@@ -73,6 +73,35 @@ partial void ProcessCreateResponseContent(
///
public async global::System.Threading.Tasks.Task CreateAsync(
+ global::Vectara.CreateAppClientRequest request,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await CreateAsResponseAsync(
+
+ request: request,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Create an App Client
+ /// An App Client is used for OAuth 2.0 authentication when calling Vectara APIs.
+ ///
+ ///
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> CreateAsResponseAsync(
+
global::Vectara.CreateAppClientRequest request,
int? requestTimeout = default,
int? requestTimeoutMillis = default,
@@ -109,6 +138,7 @@ partial void ProcessCreateResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: "/v2/app_clients",
baseUri: HttpClient.BaseAddress);
@@ -200,6 +230,8 @@ partial void ProcessCreateResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -213,6 +245,11 @@ partial void ProcessCreateResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -230,6 +267,8 @@ partial void ProcessCreateResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -239,8 +278,7 @@ partial void ProcessCreateResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -249,6 +287,11 @@ partial void ProcessCreateResponseContent(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -265,14 +308,15 @@ partial void ProcessCreateResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -312,6 +356,8 @@ partial void ProcessCreateResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -332,6 +378,8 @@ partial void ProcessCreateResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// App Client creation request was malformed.
@@ -432,9 +480,13 @@ partial void ProcessCreateResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Vectara.AppClient.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Vectara.AppClient.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -462,9 +514,13 @@ partial void ProcessCreateResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Vectara.AppClient.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Vectara.AppClient.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.AppClientsClient.Delete.g.cs b/src/libs/Vectara/Generated/Vectara.AppClientsClient.Delete.g.cs
index 0dfa8ca0..c873fa12 100644
--- a/src/libs/Vectara/Generated/Vectara.AppClientsClient.Delete.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.AppClientsClient.Delete.g.cs
@@ -72,6 +72,31 @@ partial void ProcessDeleteResponse(
int? requestTimeoutMillis = default,
global::Vectara.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await DeleteAsResponseAsync(
+ appClientId: appClientId,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Delete an App Client
+ /// Remove an application client configuration from the customer account.
+ ///
+ ///
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task DeleteAsResponseAsync(
+ string appClientId,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -103,6 +128,7 @@ partial void ProcessDeleteResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: $"/v2/app_clients/{appClientId}",
baseUri: HttpClient.BaseAddress);
@@ -188,6 +214,8 @@ partial void ProcessDeleteResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -201,6 +229,11 @@ partial void ProcessDeleteResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -218,6 +251,8 @@ partial void ProcessDeleteResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -227,8 +262,7 @@ partial void ProcessDeleteResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -237,6 +271,11 @@ partial void ProcessDeleteResponse(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -253,14 +292,15 @@ partial void ProcessDeleteResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -300,6 +340,8 @@ partial void ProcessDeleteResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -320,6 +362,8 @@ partial void ProcessDeleteResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Permissions do not allow deleting this App Client.
@@ -378,6 +422,10 @@ partial void ProcessDeleteResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -399,6 +447,10 @@ partial void ProcessDeleteResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.AppClientsClient.Get.g.cs b/src/libs/Vectara/Generated/Vectara.AppClientsClient.Get.g.cs
index 301a61dd..32b2332f 100644
--- a/src/libs/Vectara/Generated/Vectara.AppClientsClient.Get.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.AppClientsClient.Get.g.cs
@@ -77,6 +77,33 @@ partial void ProcessGetResponseContent(
int? requestTimeoutMillis = default,
global::Vectara.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GetAsResponseAsync(
+ appClientId: appClientId,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Get an App Client
+ /// Retrieve details of a specific application client by its ID.
+ ///
+ ///
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> GetAsResponseAsync(
+ string appClientId,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -108,6 +135,7 @@ partial void ProcessGetResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: $"/v2/app_clients/{appClientId}",
baseUri: HttpClient.BaseAddress);
@@ -193,6 +221,8 @@ partial void ProcessGetResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -206,6 +236,11 @@ partial void ProcessGetResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -223,6 +258,8 @@ partial void ProcessGetResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -232,8 +269,7 @@ partial void ProcessGetResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -242,6 +278,11 @@ partial void ProcessGetResponseContent(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -258,14 +299,15 @@ partial void ProcessGetResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -305,6 +347,8 @@ partial void ProcessGetResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -325,6 +369,8 @@ partial void ProcessGetResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Permissions do not allow getting this App Client.
@@ -387,9 +433,13 @@ partial void ProcessGetResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Vectara.AppClient.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Vectara.AppClient.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -417,9 +467,13 @@ partial void ProcessGetResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Vectara.AppClient.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Vectara.AppClient.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.AppClientsClient.List.g.cs b/src/libs/Vectara/Generated/Vectara.AppClientsClient.List.g.cs
index 6283ab54..04a2247c 100644
--- a/src/libs/Vectara/Generated/Vectara.AppClientsClient.List.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.AppClientsClient.List.g.cs
@@ -87,6 +87,41 @@ partial void ProcessListResponseContent(
string? pageKey = default,
global::Vectara.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await ListAsResponseAsync(
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ limit: limit,
+ filter: filter,
+ pageKey: pageKey,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// List App Clients
+ /// Retrieve a list of application clients configured for the customer account.
+ ///
+ ///
+ ///
+ ///
+ /// Default Value: 10
+ ///
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> ListAsResponseAsync(
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ int? limit = default,
+ string? filter = default,
+ string? pageKey = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -120,13 +155,14 @@ partial void ProcessListResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: "/v2/app_clients",
- baseUri: HttpClient.BaseAddress);
+ baseUri: HttpClient.BaseAddress);
__pathBuilder
.AddOptionalParameter("limit", limit?.ToString())
.AddOptionalParameter("filter", filter)
- .AddOptionalParameter("page_key", pageKey)
+ .AddOptionalParameter("page_key", pageKey)
;
var __path = __pathBuilder.ToString();
__path = global::Vectara.AutoSDKRequestOptionsSupport.AppendQueryParameters(
@@ -212,6 +248,8 @@ partial void ProcessListResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -225,6 +263,11 @@ partial void ProcessListResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -242,6 +285,8 @@ partial void ProcessListResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -251,8 +296,7 @@ partial void ProcessListResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -261,6 +305,11 @@ partial void ProcessListResponseContent(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -277,14 +326,15 @@ partial void ProcessListResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -324,6 +374,8 @@ partial void ProcessListResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -344,6 +396,8 @@ partial void ProcessListResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// App Clients list request was malformed.
@@ -444,9 +498,13 @@ partial void ProcessListResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Vectara.ListAppClientsResponse.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Vectara.ListAppClientsResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -474,9 +532,13 @@ partial void ProcessListResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Vectara.ListAppClientsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Vectara.ListAppClientsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.AppClientsClient.Update.g.cs b/src/libs/Vectara/Generated/Vectara.AppClientsClient.Update.g.cs
index f0ce5f8a..6344d90b 100644
--- a/src/libs/Vectara/Generated/Vectara.AppClientsClient.Update.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.AppClientsClient.Update.g.cs
@@ -77,6 +77,38 @@ partial void ProcessUpdateResponseContent(
public async global::System.Threading.Tasks.Task UpdateAsync(
string appClientId,
+ global::Vectara.UpdateAppClientRequest request,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await UpdateAsResponseAsync(
+ appClientId: appClientId,
+
+ request: request,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Update an App Client
+ /// Update the configuration or settings of an existing application client.
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> UpdateAsResponseAsync(
+ string appClientId,
+
global::Vectara.UpdateAppClientRequest request,
int? requestTimeout = default,
int? requestTimeoutMillis = default,
@@ -116,6 +148,7 @@ partial void ProcessUpdateResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: $"/v2/app_clients/{appClientId}",
baseUri: HttpClient.BaseAddress);
@@ -208,6 +241,8 @@ partial void ProcessUpdateResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -221,6 +256,11 @@ partial void ProcessUpdateResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -238,6 +278,8 @@ partial void ProcessUpdateResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -247,8 +289,7 @@ partial void ProcessUpdateResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -257,6 +298,11 @@ partial void ProcessUpdateResponseContent(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -273,14 +319,15 @@ partial void ProcessUpdateResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -320,6 +367,8 @@ partial void ProcessUpdateResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -340,6 +389,8 @@ partial void ProcessUpdateResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Permissions do not allow updating this App Client.
@@ -402,9 +453,13 @@ partial void ProcessUpdateResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Vectara.AppClient.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Vectara.AppClient.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -432,9 +487,13 @@ partial void ProcessUpdateResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Vectara.AppClient.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Vectara.AppClient.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.AppClientsClient.g.cs b/src/libs/Vectara/Generated/Vectara.AppClientsClient.g.cs
index 4f106822..74d01da1 100644
--- a/src/libs/Vectara/Generated/Vectara.AppClientsClient.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.AppClientsClient.g.cs
@@ -75,10 +75,10 @@ public AppClientsClient(
/// Client-wide request defaults such as headers, query parameters, retries, and timeout.
/// Dispose the HttpClient when the instance is disposed. True by default.
public AppClientsClient(
- global::System.Net.Http.HttpClient? httpClient = null,
- global::System.Uri? baseUri = null,
- global::System.Collections.Generic.List? authorizations = null,
- global::Vectara.AutoSDKClientOptions? options = null,
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Uri? baseUri,
+ global::System.Collections.Generic.List? authorizations,
+ global::Vectara.AutoSDKClientOptions? options,
bool disposeHttpClient = true)
{
diff --git a/src/libs/Vectara/Generated/Vectara.AuthenticationClient.GetToken.g.cs b/src/libs/Vectara/Generated/Vectara.AuthenticationClient.GetToken.g.cs
index 1f3ae3c5..4a46e5c6 100644
--- a/src/libs/Vectara/Generated/Vectara.AuthenticationClient.GetToken.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.AuthenticationClient.GetToken.g.cs
@@ -31,6 +31,29 @@ partial void ProcessGetTokenResponseContent(
///
public async global::System.Threading.Tasks.Task GetTokenAsync(
+ global::Vectara.GetOAuthTokenRequest request,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GetTokenAsResponseAsync(
+
+ request: request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Request an access token
+ /// Obtain an OAuth2 access token using client credentials
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> GetTokenAsResponseAsync(
+
global::Vectara.GetOAuthTokenRequest request,
global::Vectara.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
@@ -59,6 +82,7 @@ partial void ProcessGetTokenResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: "/oauth/token",
baseUri: HttpClient.BaseAddress);
@@ -121,6 +145,8 @@ partial void ProcessGetTokenResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -131,6 +157,11 @@ partial void ProcessGetTokenResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -148,6 +179,8 @@ partial void ProcessGetTokenResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -157,8 +190,7 @@ partial void ProcessGetTokenResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -167,6 +199,11 @@ partial void ProcessGetTokenResponseContent(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -183,14 +220,15 @@ partial void ProcessGetTokenResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -230,6 +268,8 @@ partial void ProcessGetTokenResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -250,6 +290,8 @@ partial void ProcessGetTokenResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
@@ -274,9 +316,13 @@ partial void ProcessGetTokenResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Vectara.GetTokenResponse.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Vectara.GetTokenResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -304,9 +350,13 @@ partial void ProcessGetTokenResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Vectara.GetTokenResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Vectara.GetTokenResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.AuthenticationClient.g.cs b/src/libs/Vectara/Generated/Vectara.AuthenticationClient.g.cs
index 3b3b53fa..e83af961 100644
--- a/src/libs/Vectara/Generated/Vectara.AuthenticationClient.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.AuthenticationClient.g.cs
@@ -76,10 +76,10 @@ public AuthenticationClient(
/// Client-wide request defaults such as headers, query parameters, retries, and timeout.
/// Dispose the HttpClient when the instance is disposed. True by default.
public AuthenticationClient(
- global::System.Net.Http.HttpClient? httpClient = null,
- global::System.Uri? baseUri = null,
- global::System.Collections.Generic.List? authorizations = null,
- global::Vectara.AutoSDKClientOptions? options = null,
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Uri? baseUri,
+ global::System.Collections.Generic.List? authorizations,
+ global::Vectara.AutoSDKClientOptions? options,
bool disposeHttpClient = true)
{
diff --git a/src/libs/Vectara/Generated/Vectara.AutoSDKHttpResponse.g.cs b/src/libs/Vectara/Generated/Vectara.AutoSDKHttpResponse.g.cs
new file mode 100644
index 00000000..d1855921
--- /dev/null
+++ b/src/libs/Vectara/Generated/Vectara.AutoSDKHttpResponse.g.cs
@@ -0,0 +1,121 @@
+
+#nullable enable
+
+namespace Vectara
+{
+ ///
+ /// Represents a successful HTTP response with status code and headers.
+ ///
+ public partial class AutoSDKHttpResponse
+ {
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public AutoSDKHttpResponse(
+ global::System.Net.HttpStatusCode statusCode,
+ global::System.Collections.Generic.Dictionary> headers)
+ : this(
+ statusCode: statusCode,
+ headers: headers,
+ requestUri: null)
+ {
+ }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public AutoSDKHttpResponse(
+ global::System.Net.HttpStatusCode statusCode,
+ global::System.Collections.Generic.Dictionary> headers,
+ global::System.Uri? requestUri)
+ {
+ StatusCode = statusCode;
+ Headers = headers ?? throw new global::System.ArgumentNullException(nameof(headers));
+ RequestUri = requestUri;
+ }
+
+ ///
+ /// Gets the HTTP status code.
+ ///
+ public global::System.Net.HttpStatusCode StatusCode { get; }
+ ///
+ /// Gets the response headers.
+ ///
+ public global::System.Collections.Generic.Dictionary> Headers { get; }
+ ///
+ /// Gets the final request URI associated with the response.
+ ///
+ public global::System.Uri? RequestUri { get; }
+
+ internal static global::System.Collections.Generic.Dictionary> CreateHeaders(
+ global::System.Net.Http.HttpResponseMessage response)
+ {
+ response = response ?? throw new global::System.ArgumentNullException(nameof(response));
+
+ var headers = global::System.Linq.Enumerable.ToDictionary(
+ response.Headers,
+ static header => header.Key,
+ static header => (global::System.Collections.Generic.IEnumerable)global::System.Linq.Enumerable.ToArray(header.Value),
+ global::System.StringComparer.OrdinalIgnoreCase);
+
+ if (response.Content?.Headers == null)
+ {
+ return headers;
+ }
+
+ foreach (var header in response.Content.Headers)
+ {
+ if (headers.TryGetValue(header.Key, out var existingValues))
+ {
+ headers[header.Key] = global::System.Linq.Enumerable.ToArray(
+ global::System.Linq.Enumerable.Concat(existingValues, header.Value));
+ }
+ else
+ {
+ headers[header.Key] = global::System.Linq.Enumerable.ToArray(header.Value);
+ }
+ }
+
+ return headers;
+ }
+ }
+
+ ///
+ /// Represents a successful HTTP response with status code, headers, and body.
+ ///
+ public partial class AutoSDKHttpResponse : AutoSDKHttpResponse
+ {
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public AutoSDKHttpResponse(
+ global::System.Net.HttpStatusCode statusCode,
+ global::System.Collections.Generic.Dictionary> headers,
+ T body)
+ : this(
+ statusCode: statusCode,
+ headers: headers,
+ requestUri: null,
+ body: body)
+ {
+ }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public AutoSDKHttpResponse(
+ global::System.Net.HttpStatusCode statusCode,
+ global::System.Collections.Generic.Dictionary> headers,
+ global::System.Uri? requestUri,
+ T body)
+ : base(statusCode, headers, requestUri)
+ {
+ Body = body;
+ }
+
+ ///
+ /// Gets the response body.
+ ///
+ public T Body { get; }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Vectara/Generated/Vectara.CorporaClient.ComputeSize.g.cs b/src/libs/Vectara/Generated/Vectara.CorporaClient.ComputeSize.g.cs
index 34e37cd0..633f2e93 100644
--- a/src/libs/Vectara/Generated/Vectara.CorporaClient.ComputeSize.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.CorporaClient.ComputeSize.g.cs
@@ -80,6 +80,36 @@ partial void ProcessComputeSizeResponseContent(
int? requestTimeoutMillis = default,
global::Vectara.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await ComputeSizeAsResponseAsync(
+ corpusKey: corpusKey,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Compute the current size of a corpus
+ /// Compute the current size of a corpus, including number of documents, parts, and characters. The `corpus_key` uniquely identifies the corpus.
+ ///
+ ///
+ ///
+ ///
+ /// A user-provided key for a corpus.
+ /// Example: my-corpus
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> ComputeSizeAsResponseAsync(
+ string corpusKey,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -111,6 +141,7 @@ partial void ProcessComputeSizeResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: $"/v2/corpora/{corpusKey}/compute_size",
baseUri: HttpClient.BaseAddress);
@@ -196,6 +227,8 @@ partial void ProcessComputeSizeResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -209,6 +242,11 @@ partial void ProcessComputeSizeResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -226,6 +264,8 @@ partial void ProcessComputeSizeResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -235,8 +275,7 @@ partial void ProcessComputeSizeResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -245,6 +284,11 @@ partial void ProcessComputeSizeResponseContent(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -261,14 +305,15 @@ partial void ProcessComputeSizeResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -308,6 +353,8 @@ partial void ProcessComputeSizeResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -328,6 +375,8 @@ partial void ProcessComputeSizeResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Permissions do not allow computing size for this corpus.
@@ -428,9 +477,13 @@ partial void ProcessComputeSizeResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Vectara.ComputeCorpusSizeResponse.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Vectara.ComputeCorpusSizeResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -458,9 +511,13 @@ partial void ProcessComputeSizeResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Vectara.ComputeCorpusSizeResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Vectara.ComputeCorpusSizeResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.CorporaClient.Create.g.cs b/src/libs/Vectara/Generated/Vectara.CorporaClient.Create.g.cs
index 58ef71e7..f909acd4 100644
--- a/src/libs/Vectara/Generated/Vectara.CorporaClient.Create.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.CorporaClient.Create.g.cs
@@ -91,6 +91,51 @@ partial void ProcessCreateResponseContent(
///
public async global::System.Threading.Tasks.Task CreateAsync(
+ global::Vectara.CreateCorpusRequest request,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await CreateAsResponseAsync(
+
+ request: request,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Create a corpus
+ /// The Create Corpus API lets you create a corpus to store and manage your documents. A corpus is a container for documents and their associated metadata. When creating a corpus, you can specify various settings such as the corpus key, name, description, encoder, and filter attributes.
+ /// ## Corpus object
+ /// When you create a `corpus` object, the `corpus_key` property is required to uniquely identify the corpus. The `name` parameter is optional and defaults to the value of `key`. The optional `description` properties lets you provide additional information about the corpus. When creating a new corpus, you also have the flexibility to specify a custom `corpus_key` that follows a naming convention of your choice. This allows you to assign easily identifiable keys to your corpora, making it easier to manage and reference them in your application.
+ /// You can specify whether to treat queries or documents in the corpus as questions or answers using the `queries_are_answers` and `documents_are_questions` boolean properties. These settings affect the semantics of the encoder used at query time and indexing time.
+ /// ## Add metadata as filter attributes
+ /// When creating a corpus with this endpoint or the Vectara Console, you define metadata fields using the `filter_attributes` object. This ensures the corpus supports filtering on specific metadata attributes, either at the document level or the part level.
+ /// Filter attributes enable you to attach metadata to your data at the document (`doc`) or `part` level, which you can use later in filter expressions to narrow the scope of your queries. A filter attribute must specify a unique `name` (up to 64 characters long), and a `level` which indicates whether it exists in the `doc` or `part` level metadata. At indexing time, metadata with this name is extracted and made available for filter expressions to operate on. [Learn more](https://docs.vectara.com/docs/build/prepare-data/metadata-filters)
+ /// ### Doc and part filter levels
+ /// The `doc` attribute applies to the entire document. Use this for metadata that is consistent across the whole document, such as author, publication date, and document ID.
+ /// The `part` attribute applies to specific sections or chunks within a document. Use for metadata that may vary within different parts of the document, such as sections, page numbers, and sentiment scores.
+ /// If `indexed` is true, the system will build an index on the extracted values to further improve the performance of filter expressions involving the attribute.
+ /// Filter attributes must specify a `type`, which is validated when documents are indexed. The four supported types are `integer`, which stores signed whole-number values up to eight bytes in length; `real`, for storing floating point values in [IEEE 754 8-byte format]; `text` for storing textual strings in [UTF-8 encoding], and `boolean` for storing true/false values.
+ /// After you define filter attributes, you can use them within your queries. For example:
+ /// * Document-level attribute: `doc.publication_year > 2020`
+ /// * Part-level attribute: `part.sentiment_score > 0.7`
+ /// ## Custom dimensions
+ /// Custom dimensions let you add additional context to your data that contain user-defined values in addition to what Vectara automatically extracts and stores from the text. For example, *upvotes* can be a custom dimension. For example, see [Add custom dimensions to boost content](/docs/tutorials/add-custom-dimensions)."
+ ///
+ ///
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> CreateAsResponseAsync(
+
global::Vectara.CreateCorpusRequest request,
int? requestTimeout = default,
int? requestTimeoutMillis = default,
@@ -129,6 +174,7 @@ partial void ProcessCreateResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: "/v2/corpora",
baseUri: HttpClient.BaseAddress);
@@ -220,6 +266,8 @@ partial void ProcessCreateResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -233,6 +281,11 @@ partial void ProcessCreateResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -250,6 +303,8 @@ partial void ProcessCreateResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -259,8 +314,7 @@ partial void ProcessCreateResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -269,6 +323,11 @@ partial void ProcessCreateResponseContent(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -285,14 +344,15 @@ partial void ProcessCreateResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -332,6 +392,8 @@ partial void ProcessCreateResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -352,6 +414,8 @@ partial void ProcessCreateResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Invalid request body in the create corpus request.
@@ -490,9 +554,13 @@ partial void ProcessCreateResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Vectara.Corpus.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Vectara.Corpus.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -520,9 +588,13 @@ partial void ProcessCreateResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Vectara.Corpus.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Vectara.Corpus.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.CorporaClient.Delete.g.cs b/src/libs/Vectara/Generated/Vectara.CorporaClient.Delete.g.cs
index 20a992d2..db9a2844 100644
--- a/src/libs/Vectara/Generated/Vectara.CorporaClient.Delete.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.CorporaClient.Delete.g.cs
@@ -79,6 +79,38 @@ partial void ProcessDeleteResponse(
int? requestTimeoutMillis = default,
global::Vectara.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await DeleteAsResponseAsync(
+ corpusKey: corpusKey,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Delete a corpus and all its data
+ /// Permanently delete a corpus and all its associated data. The `corpus_key` uniquely identifies the corpus.
+ /// Upon successful completion, space quota consumed by the corpus will be freed, and the corpus will no longer be useable for future indexing or querying.
+ /// :::note
+ /// The corpus_key assigned to the corpus will be released and can be reused.
+ /// :::
+ ///
+ ///
+ ///
+ ///
+ /// A user-provided key for a corpus.
+ /// Example: my-corpus
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task DeleteAsResponseAsync(
+ string corpusKey,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -110,6 +142,7 @@ partial void ProcessDeleteResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: $"/v2/corpora/{corpusKey}",
baseUri: HttpClient.BaseAddress);
@@ -195,6 +228,8 @@ partial void ProcessDeleteResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -208,6 +243,11 @@ partial void ProcessDeleteResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -225,6 +265,8 @@ partial void ProcessDeleteResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -234,8 +276,7 @@ partial void ProcessDeleteResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -244,6 +285,11 @@ partial void ProcessDeleteResponse(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -260,14 +306,15 @@ partial void ProcessDeleteResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -307,6 +354,8 @@ partial void ProcessDeleteResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -327,6 +376,8 @@ partial void ProcessDeleteResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Permissions do not allow deleting the corpus.
@@ -423,6 +474,10 @@ partial void ProcessDeleteResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -444,6 +499,10 @@ partial void ProcessDeleteResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.CorporaClient.Get.g.cs b/src/libs/Vectara/Generated/Vectara.CorporaClient.Get.g.cs
index 04cb21b3..82a1f1f1 100644
--- a/src/libs/Vectara/Generated/Vectara.CorporaClient.Get.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.CorporaClient.Get.g.cs
@@ -86,6 +86,42 @@ partial void ProcessGetResponseContent(
int? requestTimeoutMillis = default,
global::Vectara.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GetAsResponseAsync(
+ corpusKey: corpusKey,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Retrieve metadata about a corpus
+ /// The Get Corpus API lets you view metadata about a specific corpus. This is useful for getting information about a corpus without performing a search. This operation does not search the corpus contents. Specify the `corpus_key` to identify the corpus whose metadata you want to retrieve.
+ /// This endpoint helps administrators understand the access control details and monitor the size of corpora to understand information like the amount of quota consumed. You can also use this information for optimizing search and storage utilization.
+ /// For example, you can track the read and write activity of a specific corpus which can help you change your security strategy proactively. You noticed a corpus with an API key with read/write access that is only being used for high volume reads. You may decide to switch to a read-only key.
+ /// In another case, you might respond to a security incident by disabling a specific corpus because of information returned by this endpoint.
+ /// ## Get the number of documents or document parts in a corpus
+ /// Tracking the usage of documents in a corpus enables adminstrators to manage resource allocation efficiently. Monitoring corpus metrics also helps data usage stay within allocated quotas and identify trends in document growth and document segmentation.
+ /// The `limit` object in the response provides comprehensive information about the current usage and limits of a corpus including the number of stored documents, document parts, and character count.
+ ///
+ ///
+ ///
+ ///
+ /// A user-provided key for a corpus.
+ /// Example: my-corpus
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> GetAsResponseAsync(
+ string corpusKey,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -117,6 +153,7 @@ partial void ProcessGetResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: $"/v2/corpora/{corpusKey}",
baseUri: HttpClient.BaseAddress);
@@ -202,6 +239,8 @@ partial void ProcessGetResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -215,6 +254,11 @@ partial void ProcessGetResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -232,6 +276,8 @@ partial void ProcessGetResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -241,8 +287,7 @@ partial void ProcessGetResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -251,6 +296,11 @@ partial void ProcessGetResponseContent(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -267,14 +317,15 @@ partial void ProcessGetResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -314,6 +365,8 @@ partial void ProcessGetResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -334,6 +387,8 @@ partial void ProcessGetResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Permissions do not allow retrieving the corpus.
@@ -434,9 +489,13 @@ partial void ProcessGetResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Vectara.Corpus.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Vectara.Corpus.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -464,9 +523,13 @@ partial void ProcessGetResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Vectara.Corpus.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Vectara.Corpus.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.CorporaClient.GetFilterAttributeStats.g.cs b/src/libs/Vectara/Generated/Vectara.CorporaClient.GetFilterAttributeStats.g.cs
index c1f2c2b7..b46ff309 100644
--- a/src/libs/Vectara/Generated/Vectara.CorporaClient.GetFilterAttributeStats.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.CorporaClient.GetFilterAttributeStats.g.cs
@@ -103,6 +103,56 @@ partial void ProcessGetFilterAttributeStatsResponseContent(
int? maxValues = default,
global::Vectara.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GetFilterAttributeStatsAsResponseAsync(
+ corpusKey: corpusKey,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ fields: fields,
+ metadataFilter: metadataFilter,
+ maxValues: maxValues,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Get filter attribute statistics for corpus metadata
+ /// Retrieve statistics and value distributions for filter attributes in a corpus. This endpoint provides insights into the metadata structure and content distribution, enabling users to understand available filter values and build effective metadata queries.
+ /// This endpoint analyzes document and part metadata fields defined as filter attributes and returns:
+ /// - **Value distributions**: Top occurring values with their counts
+ /// - **Statistics**: Min, max, average, and sum for numeric fields
+ /// By default, statistics are computed across all filter attributes at both document and part levels. You can optionally:
+ /// - Request statistics for specific fields only
+ /// - Apply metadata filters to analyze a subset of the corpus
+ /// - Limit the number of distinct values returned per field
+ /// **Performance and Caching**: Results may be cached for improved performance, with cache duration varying by corpus size. Cached results can take up to 1 hour to refresh for large corpora. Smaller corpora with faster query times have shorter cache durations (2-15 minutes) to ensure fresher data.
+ /// The `corpus_key` uniquely identifies the corpus. For more information, see [Create a corpus](https://docs.vectara.com/docs/rest-api/create-corpus).
+ ///
+ ///
+ ///
+ ///
+ /// A user-provided key for a corpus.
+ /// Example: my-corpus
+ ///
+ ///
+ ///
+ ///
+ /// Default Value: 100
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> GetFilterAttributeStatsAsResponseAsync(
+ string corpusKey,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ string? fields = default,
+ string? metadataFilter = default,
+ int? maxValues = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -137,13 +187,14 @@ partial void ProcessGetFilterAttributeStatsResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: $"/v2/corpora/{corpusKey}/filter_attribute_stats",
- baseUri: HttpClient.BaseAddress);
+ baseUri: HttpClient.BaseAddress);
__pathBuilder
.AddOptionalParameter("fields", fields)
.AddOptionalParameter("metadata_filter", metadataFilter)
- .AddOptionalParameter("max_values", maxValues?.ToString())
+ .AddOptionalParameter("max_values", maxValues?.ToString())
;
var __path = __pathBuilder.ToString();
__path = global::Vectara.AutoSDKRequestOptionsSupport.AppendQueryParameters(
@@ -230,6 +281,8 @@ partial void ProcessGetFilterAttributeStatsResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -243,6 +296,11 @@ partial void ProcessGetFilterAttributeStatsResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -260,6 +318,8 @@ partial void ProcessGetFilterAttributeStatsResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -269,8 +329,7 @@ partial void ProcessGetFilterAttributeStatsResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -279,6 +338,11 @@ partial void ProcessGetFilterAttributeStatsResponseContent(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -295,14 +359,15 @@ partial void ProcessGetFilterAttributeStatsResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -342,6 +407,8 @@ partial void ProcessGetFilterAttributeStatsResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -362,6 +429,8 @@ partial void ProcessGetFilterAttributeStatsResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Bad request - invalid parameters or corpus does not support filter attribute statistics (not backed by OpenSearch).
@@ -500,9 +569,13 @@ partial void ProcessGetFilterAttributeStatsResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Vectara.GetFilterAttributeStatsResponse.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Vectara.GetFilterAttributeStatsResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -530,9 +603,13 @@ partial void ProcessGetFilterAttributeStatsResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Vectara.GetFilterAttributeStatsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Vectara.GetFilterAttributeStatsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.CorporaClient.List.g.cs b/src/libs/Vectara/Generated/Vectara.CorporaClient.List.g.cs
index 3568cd2f..ce1c6a0b 100644
--- a/src/libs/Vectara/Generated/Vectara.CorporaClient.List.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.CorporaClient.List.g.cs
@@ -92,6 +92,45 @@ partial void ProcessListResponseContent(
string? pageKey = default,
global::Vectara.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await ListAsResponseAsync(
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ limit: limit,
+ filter: filter,
+ corpusId: corpusId,
+ pageKey: pageKey,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// List corpora
+ /// The List Corpora API lets you retrieve a list of corpora in your account. This endpoint returns a paginated list of corpora objects, which contain basic information about each corpus. The returned corpus objects contain less detail compared to those retrieved the direct corpus retrieval operation.
+ /// You can specify optional parameters to control the pagination and filtering of the results. The limit parameter determines the maximum number of corpora to return, with a default value of 10 and a maximum value of 100.
+ ///
+ ///
+ ///
+ ///
+ /// Default Value: 10
+ ///
+ ///
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> ListAsResponseAsync(
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ int? limit = default,
+ string? filter = default,
+ global::System.Collections.Generic.IList? corpusId = default,
+ string? pageKey = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -126,14 +165,15 @@ partial void ProcessListResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: "/v2/corpora",
- baseUri: HttpClient.BaseAddress);
+ baseUri: HttpClient.BaseAddress);
__pathBuilder
.AddOptionalParameter("limit", limit?.ToString())
.AddOptionalParameter("filter", filter)
.AddOptionalParameter("corpus_id", corpusId, delimiter: ",", explode: true)
- .AddOptionalParameter("page_key", pageKey)
+ .AddOptionalParameter("page_key", pageKey)
;
var __path = __pathBuilder.ToString();
__path = global::Vectara.AutoSDKRequestOptionsSupport.AppendQueryParameters(
@@ -220,6 +260,8 @@ partial void ProcessListResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -233,6 +275,11 @@ partial void ProcessListResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -250,6 +297,8 @@ partial void ProcessListResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -259,8 +308,7 @@ partial void ProcessListResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -269,6 +317,11 @@ partial void ProcessListResponseContent(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -285,14 +338,15 @@ partial void ProcessListResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -332,6 +386,8 @@ partial void ProcessListResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -352,6 +408,8 @@ partial void ProcessListResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Permissions do not allow listing corpora.
@@ -414,9 +472,13 @@ partial void ProcessListResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Vectara.ListCorporaResponse.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Vectara.ListCorporaResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -444,9 +506,13 @@ partial void ProcessListResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Vectara.ListCorporaResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Vectara.ListCorporaResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.CorporaClient.Query.g.cs b/src/libs/Vectara/Generated/Vectara.CorporaClient.Query.g.cs
index c4e2ad91..c5d4cb3b 100644
--- a/src/libs/Vectara/Generated/Vectara.CorporaClient.Query.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.CorporaClient.Query.g.cs
@@ -201,6 +201,162 @@ partial void ProcessQueryResponseContent(
public async global::System.Threading.Tasks.Task QueryAsync(
string corpusKey,
+ global::Vectara.QueryCorpusRequest request,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await QueryAsResponseAsync(
+ corpusKey: corpusKey,
+
+ request: request,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Advanced Single Corpus Query
+ /// Perform an advanced query on a specific corpus to find relevant results, generate summaries, highlight relevant snippets, and use Retrieval Augmented Generation.
+ /// This endpoint expands on the simple GET version by allowing full customization of:
+ /// - **Search parameters**: Control pagination (`offset`, `limit`), apply metadata filters, and specify lexical interpolation to balance neural and keyword-based retrieval.
+ /// - **Hybrid search**: Adjust the `lexical_interpolation` value between `0.0` (purely neural) and `1.0` (purely lexical). Typical best results are between `0.01` and `0.1`.
+ /// - **Reranking**: Apply advanced rerankers such as Multilingual, MMR, Chain, or User Defined Function rerankers to improve result relevance.
+ /// - **Generation (RAG)**: Include a `generation` object to enable grounded summarization with your own data, citations, and factual consistency scoring.
+ /// - **Streaming**: Optionally stream results or generated summaries in real time with `stream_response`.
+ /// Each query must include the `corpus_key` path parameter that identifies the target corpus. The response contains one or more subdocuments representing the most relevant passages, along with any generated summaries or citations.
+ /// **Typical use cases**
+ /// - Perform a semantically rich search over a large, domain-specific corpus.
+ /// - Retrieve relevant text passages and apply reranking for better result diversity.
+ /// - Generate contextually grounded answers or summaries using Retrieval Augmented Generation.
+ /// ## Basic query
+ /// This basic query example has a minimal configuration:
+ /// ```json
+ /// {
+ /// "query": "What are black holes?",
+ /// "search": {
+ /// "corpora": [{
+ /// "corpus_key": "my-corpus"
+ /// }],
+ /// },
+ /// "generation": {
+ /// "generation_preset_name": "mockingbird-2.0",
+ /// "max_used_search_results": 20
+ /// }
+ /// }
+ /// ```
+ /// ## Request body parameters
+ /// The request body is a JSON object containing the `query`, `search`, and optional `generation` objects.
+ /// `query` (string, required) - (Required) The search query text.
+ /// `search` (string, required) - (Required) An object that controls the retrieval and reranking process.
+ /// `search.corpora` - An array specifying which corpus to search. For this endpoint, the array will contain a single object.
+ /// * `corpus_key` (string, required): The unique ID of the corpus to search.
+ /// * `metadata_filter` (string, optional): A SQL-like filter to narrow results. For syntax and examples, see the Filters guide.
+ /// * `lexical_interpolation` (float, optional): A value between 0.0 (pure neural search) and 1.0 (pure keyword search) to enable hybrid search. A recommended starting point is 0.025.
+ /// * `custom_dimensions` (object, optional): An object to boost or bury results based on custom dimensions. See the Custom Dimensions guide for details.
+ /// `search.limit` (integer, optional) - The maximum number of results to retrieve before reranking. **Default**: 10
+ /// `search.offset` (integer, optional) - The number of results to skip for pagination. **Default**: 0
+ /// `search.context_configuration` (object, optional) - Configuration for surrounding context to include with each search result.
+ /// * `sentences_before` (integer): Number of sentences to include before the matching text.
+ /// * `sentences_after` (integer): Number of sentences to include after the matching text.
+ /// * `characters_before` (integer): Number of characters to include before the matching text.
+ /// * `characters_after` (integer): Number of characters to include after the matching text.
+ /// * `start_tag` (string): HTML-style tag to wrap the beginning of the retrieved context (e.g., `<b>`).
+ /// * `end_tag` (string): HTML-style tag to wrap the end of the retrieved context (e.g., `</b>`).
+ /// :::note
+ /// You can only use sentences before/after OR characters before/after, but not both.
+ /// :::
+ /// Example:
+ /// ```json
+ /// {
+ /// "context_configuration": {
+ /// "sentences_before": 2,
+ /// "sentences_after": 2,
+ /// "start_tag": "<mark>",
+ /// "end_tag": "</mark>"
+ /// }
+ /// }
+ /// ```
+ /// `search.reranker` (object, optional) - Configures a reranker to improve result quality by reordering search results to place the most relevant content first. For more details, see [Reranking overview](/docs/search-and-retrieval/rerankers/reranking-overview).
+ /// * `type` (string): The reranker type. Options include customer_reranker (default multilingual reranker), mmr (for result diversity), or none.
+ /// * `reranker_name` (string): The specific reranker model to use (e.g., Rerank_Multilingual_v1).
+ /// * `limit` (integer): Maximum number of results to return after reranking.
+ /// * `cutoff` (float): Minimum relevance score (between 0.0 and 1.0) for a result to be included. A typical range is 0.3-0.7.
+ /// * `include_context` (boolean): If true, uses surrounding context text for more accurate reranking.
+ /// **Example:**
+ /// ```json
+ /// {
+ /// "reranker": {
+ /// "type": "customer_reranker",
+ /// "reranker_name": "Rerank_Multilingual_v1",
+ /// "limit": 50,
+ /// }
+ /// }
+ /// ```
+ /// `generation` (object, optional) - An object that controls how the agent creates natural language responses. If this object is excluded, summarization is disabled.
+ /// `generation.generation_preset_name` (string, optional) - The name of the pre-configured prompt and LLM bundle.
+ /// **Recommended Presets:**
+ /// * `mockingbird-2.0`: Vectara's cutting-edge LLM for RAG.
+ /// * `vectara-summary-ext-24-05-med-omni`: (gpt-4o, optimized for citations)
+ /// * `vectara-summary-ext-24-05-large`: (gpt-4.0-turbo, optimized for citations)
+ /// * `vectara-summary-ext-24-05-sml`: (gpt-3.5-turbo, optimized for citations)
+ /// **For Tabular data:**
+ /// `vectara-summary-table-query-ext-dec-2024-gpt-4o`
+ /// `generation.prompt_template` (string, optional) - A custom prompt template in JSON format that defines the system and user messages for the LLM. Use this to customize the behavior of the model beyond the preset. The template can include Velocity templates with variables such as `$vectaraQueryResults` to reference retrieved search results. For more information, see [Custom prompts](/docs/prompts/vectara-prompt-engine).
+ /// `generation.max_used_search_results` (integer, optional) - The maximum number of top search results to send for summarization. The number of top search results to send to the LLM for summarization. Increasing this can create a more comprehensive summary but may increase response time. **Default limit**: 25.
+ /// :::caution
+ /// Setting this value too high may prevent the model from generating a response.
+ /// :::
+ /// `generation.response_language` (string, optional) - The language code for the response (e.g. `eng`, `spa`, `deu`). Set this to `auto` to have Vectara guess the language, but we recommend specifying your preferred language for best results.
+ /// `generation.citations` (object, optional) - Configuration for including citations in the generated summary.
+ /// * `style` (string): Citation style. Options are `markdown`, `html`, or `none`.
+ /// * `url_pattern` (string): A URL template for citation links, where `{doc.id}` will be replaced with the document ID.
+ /// * `text_pattern` (string): A text template for citation display, where `{doc.title}` will be replaced with the document title.
+ /// **Example:**
+ /// ```json
+ /// {
+ /// "citations": {
+ /// "style": "markdown",
+ /// "url_pattern": "https://docs.example.com/documents/{doc.id}",
+ /// "text_pattern": "{doc.title}"
+ /// }
+ /// }
+ /// ```
+ /// `generation.model_parameters` (object, optional) - Custom parameters for the underlying LLM that overwrites the defaults of `generation_preset_name`.
+ /// * `temperature` (float): Controls randomness in the output. Higher values (e.g., 0.8) produce more creative results, while lower values (e.g., 0.2) yield more focused and deterministic outputs.
+ /// * `max_tokens` (integer): The maximum number of tokens to generate in the response.
+ /// * `frequency_penalty` (float): Decreases the use of repeating words, reducing repetition. **Default**: `0.0` to `1.0`.
+ /// * `presence_penalty` (float): Increases the chance for the model to introduce new topics. **Default**: `0.0` to `1.0`.
+ /// **Example:**
+ /// ```json
+ /// {
+ /// "model_parameters": {
+ /// "temperature": 0.7,
+ /// "max_tokens": 500,
+ /// "frequency_penalty": 0.5,
+ /// "presence_penalty": 0.3
+ /// }
+ /// }
+ /// ```
+ /// `generation.enable_factual_consistency_score` (boolean): If true, includes a factual consistency score in the response to indicate how well the generated summary aligns with the retrieved documents.
+ ///
+ ///
+ ///
+ ///
+ /// A user-provided key for a corpus.
+ /// Example: my-corpus
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> QueryAsResponseAsync(
+ string corpusKey,
+
global::Vectara.QueryCorpusRequest request,
int? requestTimeout = default,
int? requestTimeoutMillis = default,
@@ -240,6 +396,7 @@ partial void ProcessQueryResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: $"/v2/corpora/{corpusKey}/query",
baseUri: HttpClient.BaseAddress);
@@ -332,6 +489,8 @@ partial void ProcessQueryResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -345,6 +504,11 @@ partial void ProcessQueryResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -362,6 +526,8 @@ partial void ProcessQueryResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -371,8 +537,7 @@ partial void ProcessQueryResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -381,6 +546,11 @@ partial void ProcessQueryResponseContent(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -397,14 +567,15 @@ partial void ProcessQueryResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -444,6 +615,8 @@ partial void ProcessQueryResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -464,6 +637,8 @@ partial void ProcessQueryResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Query request was malformed.
@@ -602,9 +777,13 @@ partial void ProcessQueryResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Vectara.QueryFullResponse.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Vectara.QueryFullResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -632,9 +811,13 @@ partial void ProcessQueryResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Vectara.QueryFullResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Vectara.QueryFullResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.CorporaClient.QueryAsStream.g.cs b/src/libs/Vectara/Generated/Vectara.CorporaClient.QueryAsStream.g.cs
index c732ec03..b5b5abd9 100644
--- a/src/libs/Vectara/Generated/Vectara.CorporaClient.QueryAsStream.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.CorporaClient.QueryAsStream.g.cs
@@ -235,6 +235,7 @@ partial void ProcessQueryAsStreamResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: $"/v2/corpora/{corpusKey}/query",
baseUri: HttpClient.BaseAddress);
@@ -327,6 +328,8 @@ partial void ProcessQueryAsStreamResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -340,6 +343,11 @@ partial void ProcessQueryAsStreamResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -357,6 +365,8 @@ partial void ProcessQueryAsStreamResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -366,8 +376,7 @@ partial void ProcessQueryAsStreamResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -376,6 +385,11 @@ partial void ProcessQueryAsStreamResponse(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -392,14 +406,15 @@ partial void ProcessQueryAsStreamResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -439,6 +454,8 @@ partial void ProcessQueryAsStreamResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -459,6 +476,8 @@ partial void ProcessQueryAsStreamResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
diff --git a/src/libs/Vectara/Generated/Vectara.CorporaClient.ReplaceFilterAttributes.g.cs b/src/libs/Vectara/Generated/Vectara.CorporaClient.ReplaceFilterAttributes.g.cs
index eb9177ea..3776c8dc 100644
--- a/src/libs/Vectara/Generated/Vectara.CorporaClient.ReplaceFilterAttributes.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.CorporaClient.ReplaceFilterAttributes.g.cs
@@ -81,6 +81,42 @@ partial void ProcessReplaceFilterAttributesResponseContent(
public async global::System.Threading.Tasks.Task ReplaceFilterAttributesAsync(
string corpusKey,
+ global::Vectara.ReplaceFilterAttributesRequest request,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await ReplaceFilterAttributesAsResponseAsync(
+ corpusKey: corpusKey,
+
+ request: request,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Replace the filter attributes of a corpus
+ /// Replace the filter attributes of a corpus. This does not happen immediately, as this operation creates a job that completes asynchronously. These new filter attributes will not work until the job completes.
+ /// You can monitor the status of the filter change using the returned job ID. The `corpus_key` uniquely identifies the corpus.
+ ///
+ ///
+ ///
+ ///
+ /// A user-provided key for a corpus.
+ /// Example: my-corpus
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> ReplaceFilterAttributesAsResponseAsync(
+ string corpusKey,
+
global::Vectara.ReplaceFilterAttributesRequest request,
int? requestTimeout = default,
int? requestTimeoutMillis = default,
@@ -120,6 +156,7 @@ partial void ProcessReplaceFilterAttributesResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: $"/v2/corpora/{corpusKey}/replace_filter_attributes",
baseUri: HttpClient.BaseAddress);
@@ -212,6 +249,8 @@ partial void ProcessReplaceFilterAttributesResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -225,6 +264,11 @@ partial void ProcessReplaceFilterAttributesResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -242,6 +286,8 @@ partial void ProcessReplaceFilterAttributesResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -251,8 +297,7 @@ partial void ProcessReplaceFilterAttributesResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -261,6 +306,11 @@ partial void ProcessReplaceFilterAttributesResponseContent(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -277,14 +327,15 @@ partial void ProcessReplaceFilterAttributesResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -324,6 +375,8 @@ partial void ProcessReplaceFilterAttributesResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -344,6 +397,8 @@ partial void ProcessReplaceFilterAttributesResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Permissions do not allow replacing filter attributes.
@@ -444,9 +499,13 @@ partial void ProcessReplaceFilterAttributesResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Vectara.ReplaceFilterAttributesResponse.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Vectara.ReplaceFilterAttributesResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -474,9 +533,13 @@ partial void ProcessReplaceFilterAttributesResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Vectara.ReplaceFilterAttributesResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Vectara.ReplaceFilterAttributesResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.CorporaClient.Reset.g.cs b/src/libs/Vectara/Generated/Vectara.CorporaClient.Reset.g.cs
index 8226ca4a..1ba621dd 100644
--- a/src/libs/Vectara/Generated/Vectara.CorporaClient.Reset.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.CorporaClient.Reset.g.cs
@@ -75,6 +75,34 @@ partial void ProcessResetResponse(
int? requestTimeoutMillis = default,
global::Vectara.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await ResetAsResponseAsync(
+ corpusKey: corpusKey,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Remove all documents and data in a corpus
+ /// Resets a corpus, which removes all documents and data from the specified corpus, while keeping the corpus itself. The `corpus_key` uniquely identifies the corpus. For more information, see [Create a corpus](https://docs.vectara.com/docs/rest-api/create-corpus).
+ ///
+ ///
+ ///
+ ///
+ /// A user-provided key for a corpus.
+ /// Example: my-corpus
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task ResetAsResponseAsync(
+ string corpusKey,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -106,6 +134,7 @@ partial void ProcessResetResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: $"/v2/corpora/{corpusKey}/reset",
baseUri: HttpClient.BaseAddress);
@@ -191,6 +220,8 @@ partial void ProcessResetResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -204,6 +235,11 @@ partial void ProcessResetResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -221,6 +257,8 @@ partial void ProcessResetResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -230,8 +268,7 @@ partial void ProcessResetResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -240,6 +277,11 @@ partial void ProcessResetResponse(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -256,14 +298,15 @@ partial void ProcessResetResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -303,6 +346,8 @@ partial void ProcessResetResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -323,6 +368,8 @@ partial void ProcessResetResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Permissions do not allow resetting the corpus.
@@ -419,6 +466,10 @@ partial void ProcessResetResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -440,6 +491,10 @@ partial void ProcessResetResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.CorporaClient.Search.g.cs b/src/libs/Vectara/Generated/Vectara.CorporaClient.Search.g.cs
index 36264dc9..e306419c 100644
--- a/src/libs/Vectara/Generated/Vectara.CorporaClient.Search.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.CorporaClient.Search.g.cs
@@ -113,6 +113,64 @@ partial void ProcessSearchResponseContent(
bool? intelligentQueryRewriting = default,
global::Vectara.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await SearchAsResponseAsync(
+ corpusKey: corpusKey,
+ query: query,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ limit: limit,
+ offset: offset,
+ saveHistory: saveHistory,
+ intelligentQueryRewriting: intelligentQueryRewriting,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Simple Single Corpus Query
+ /// The [**Query APIs**](/docs/rest-api/queries) enable Retrieval Augmented Generation (RAG), allowing you to search your data and generate AI-powered summaries. Vectara provides three query types to match different search needs:
+ /// * [**Single corpus query**](/docs/rest-api/search-corpus): For a simple search within a single data source.
+ /// * [**Advanced single corpus query**](/docs/rest-api/query-corpus): For full-featured search and RAG within one corpus, supporting advanced features like table summarization, metadata filtering, and reranking.
+ /// * [**Multiple corpora query**](/docs/rest-api/query): For searching across one or more corpora with full RAG capabilities.
+ /// Search a single corpus with a straightforward query request, specifying the corpus key and query parameters.
+ /// * Specify the unique `corpus_key` identifying the corpus to query. The `corpus_key` is created in the Vectara Console or the [Create Corpus API](https://docs.vectara.com/docs/rest-api/create-corpus), and the corpus key is part of that process. When creating a new corpus, you have the option to assign a custom `corpus_key` following your preferred naming convention. This key serves as a unique identifier for the corpus, allowing it to be referenced in search requests.
+ /// * Enter the search `query` string for the corpus, which is the question you want to ask.
+ /// * Set the maximum number of results (`limit`) to return. **Default**: 10, **minimum**: 1
+ ///
+ ///
+ ///
+ ///
+ /// A user-provided key for a corpus.
+ /// Example: my-corpus
+ ///
+ ///
+ ///
+ /// Default Value: 10
+ ///
+ ///
+ /// Default Value: 0
+ ///
+ ///
+ ///
+ /// Default Value: false
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> SearchAsResponseAsync(
+ string corpusKey,
+ string query,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ int? limit = default,
+ int? offset = default,
+ bool? saveHistory = default,
+ bool? intelligentQueryRewriting = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -149,15 +207,16 @@ partial void ProcessSearchResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: $"/v2/corpora/{corpusKey}/query",
- baseUri: HttpClient.BaseAddress);
+ baseUri: HttpClient.BaseAddress);
__pathBuilder
.AddRequiredParameter("query", query)
.AddOptionalParameter("limit", limit?.ToString())
.AddOptionalParameter("offset", offset?.ToString())
.AddOptionalParameter("save_history", saveHistory?.ToString().ToLowerInvariant())
- .AddOptionalParameter("intelligent_query_rewriting", intelligentQueryRewriting?.ToString().ToLowerInvariant())
+ .AddOptionalParameter("intelligent_query_rewriting", intelligentQueryRewriting?.ToString().ToLowerInvariant())
;
var __path = __pathBuilder.ToString();
__path = global::Vectara.AutoSDKRequestOptionsSupport.AppendQueryParameters(
@@ -246,6 +305,8 @@ partial void ProcessSearchResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -259,6 +320,11 @@ partial void ProcessSearchResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -276,6 +342,8 @@ partial void ProcessSearchResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -285,8 +353,7 @@ partial void ProcessSearchResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -295,6 +362,11 @@ partial void ProcessSearchResponseContent(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -311,14 +383,15 @@ partial void ProcessSearchResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -358,6 +431,8 @@ partial void ProcessSearchResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -378,6 +453,8 @@ partial void ProcessSearchResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Query request was malformed.
@@ -516,9 +593,13 @@ partial void ProcessSearchResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Vectara.QueryFullResponse.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Vectara.QueryFullResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -546,9 +627,13 @@ partial void ProcessSearchResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Vectara.QueryFullResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Vectara.QueryFullResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.CorporaClient.Update.g.cs b/src/libs/Vectara/Generated/Vectara.CorporaClient.Update.g.cs
index 7cbf8238..8b0faa9e 100644
--- a/src/libs/Vectara/Generated/Vectara.CorporaClient.Update.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.CorporaClient.Update.g.cs
@@ -81,6 +81,42 @@ partial void ProcessUpdateResponseContent(
public async global::System.Threading.Tasks.Task UpdateAsync(
string corpusKey,
+ global::Vectara.UpdateCorpusRequest request,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await UpdateAsResponseAsync(
+ corpusKey: corpusKey,
+
+ request: request,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Update a corpus
+ /// The Update Corpus API lets you enable, disable, or update the name and description of a corpus. This is useful to manage the availability of data within the system, such as when you need to take the corpus offline without having to delete the corpus.
+ /// This lets you utilize automated scripts to programmatically control the availability of corpora based on certain conditions. For example, quickly disable a corpus for maintenance updates or in response to security incidents.
+ ///
+ ///
+ ///
+ ///
+ /// A user-provided key for a corpus.
+ /// Example: my-corpus
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> UpdateAsResponseAsync(
+ string corpusKey,
+
global::Vectara.UpdateCorpusRequest request,
int? requestTimeout = default,
int? requestTimeoutMillis = default,
@@ -120,6 +156,7 @@ partial void ProcessUpdateResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: $"/v2/corpora/{corpusKey}",
baseUri: HttpClient.BaseAddress);
@@ -212,6 +249,8 @@ partial void ProcessUpdateResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -225,6 +264,11 @@ partial void ProcessUpdateResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -242,6 +286,8 @@ partial void ProcessUpdateResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -251,8 +297,7 @@ partial void ProcessUpdateResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -261,6 +306,11 @@ partial void ProcessUpdateResponseContent(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -277,14 +327,15 @@ partial void ProcessUpdateResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -324,6 +375,8 @@ partial void ProcessUpdateResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -344,6 +397,8 @@ partial void ProcessUpdateResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Permissions do not allow updating the corpus.
@@ -444,9 +499,13 @@ partial void ProcessUpdateResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Vectara.Corpus.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Vectara.Corpus.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -474,9 +533,13 @@ partial void ProcessUpdateResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Vectara.Corpus.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Vectara.Corpus.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.CorporaClient.g.cs b/src/libs/Vectara/Generated/Vectara.CorporaClient.g.cs
index 549efbf9..d2398a5a 100644
--- a/src/libs/Vectara/Generated/Vectara.CorporaClient.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.CorporaClient.g.cs
@@ -75,10 +75,10 @@ public CorporaClient(
/// Client-wide request defaults such as headers, query parameters, retries, and timeout.
/// Dispose the HttpClient when the instance is disposed. True by default.
public CorporaClient(
- global::System.Net.Http.HttpClient? httpClient = null,
- global::System.Uri? baseUri = null,
- global::System.Collections.Generic.List? authorizations = null,
- global::Vectara.AutoSDKClientOptions? options = null,
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Uri? baseUri,
+ global::System.Collections.Generic.List? authorizations,
+ global::Vectara.AutoSDKClientOptions? options,
bool disposeHttpClient = true)
{
diff --git a/src/libs/Vectara/Generated/Vectara.DocumentsClient.BulkDelete.g.cs b/src/libs/Vectara/Generated/Vectara.DocumentsClient.BulkDelete.g.cs
index 9c0d046d..ff8b0b4d 100644
--- a/src/libs/Vectara/Generated/Vectara.DocumentsClient.BulkDelete.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.DocumentsClient.BulkDelete.g.cs
@@ -99,6 +99,52 @@ partial void ProcessBulkDeleteResponseContent(
bool? async = default,
global::Vectara.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await BulkDeleteAsResponseAsync(
+ corpusKey: corpusKey,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ metadataFilter: metadataFilter,
+ documentIds: documentIds,
+ async: async,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Bulk delete documents from a corpus
+ /// Initiates an asynchronous bulk delete operation for documents in a corpus.
+ /// This operation accepts a metadata filter, a list of specific document IDs, or both.
+ /// **Important**: This is a best-effort operation.
+ /// See the response schema documentation for details on the behavior differences between `metadata_filter` and `document_ids` parameters.
+ /// The operation runs as a background workflow.
+ /// Use the returned `job_id` to track progress via the Jobs API.
+ ///
+ ///
+ ///
+ ///
+ /// A user-provided key for a corpus.
+ /// Example: my-corpus
+ ///
+ ///
+ ///
+ ///
+ /// Default Value: true
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> BulkDeleteAsResponseAsync(
+ string corpusKey,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ string? metadataFilter = default,
+ string? documentIds = default,
+ bool? async = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -133,13 +179,14 @@ partial void ProcessBulkDeleteResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: $"/v2/corpora/{corpusKey}/documents",
- baseUri: HttpClient.BaseAddress);
+ baseUri: HttpClient.BaseAddress);
__pathBuilder
.AddOptionalParameter("metadata_filter", metadataFilter)
.AddOptionalParameter("document_ids", documentIds)
- .AddOptionalParameter("async", async?.ToString().ToLowerInvariant())
+ .AddOptionalParameter("async", async?.ToString().ToLowerInvariant())
;
var __path = __pathBuilder.ToString();
__path = global::Vectara.AutoSDKRequestOptionsSupport.AppendQueryParameters(
@@ -226,6 +273,8 @@ partial void ProcessBulkDeleteResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -239,6 +288,11 @@ partial void ProcessBulkDeleteResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -256,6 +310,8 @@ partial void ProcessBulkDeleteResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -265,8 +321,7 @@ partial void ProcessBulkDeleteResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -275,6 +330,11 @@ partial void ProcessBulkDeleteResponseContent(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -291,14 +351,15 @@ partial void ProcessBulkDeleteResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -338,6 +399,8 @@ partial void ProcessBulkDeleteResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -358,6 +421,8 @@ partial void ProcessBulkDeleteResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Invalid request.
@@ -534,9 +599,13 @@ partial void ProcessBulkDeleteResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Vectara.BulkDeleteDocumentsResponse.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Vectara.BulkDeleteDocumentsResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -564,9 +633,13 @@ partial void ProcessBulkDeleteResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Vectara.BulkDeleteDocumentsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Vectara.BulkDeleteDocumentsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.DocumentsClient.Create.g.cs b/src/libs/Vectara/Generated/Vectara.DocumentsClient.Create.g.cs
index 7ba8eb3a..527d5c2f 100644
--- a/src/libs/Vectara/Generated/Vectara.DocumentsClient.Create.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.DocumentsClient.Create.g.cs
@@ -106,6 +106,67 @@ partial void ProcessCreateResponseContent(
public async global::System.Threading.Tasks.Task CreateAsync(
string corpusKey,
+ global::Vectara.CreateDocumentRequest request,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ global::Vectara.CreateCorpusDocumentWaitFor? waitFor = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await CreateAsResponseAsync(
+ corpusKey: corpusKey,
+
+ request: request,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ waitFor: waitFor,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Add a document to a corpus
+ /// Add a document to a corpus for indexing, making its content available for search, retrieval, and generation. This endpoint supports two ingestion modes: **structured** documents and **core** documents. These modes offer different levels of control over document structure and chunking.
+ /// Each document becomes part of a corpus. You can use this API directly or with [Vectara Ingest](https://github.com/vectara/vectara-ingest) or the [File Upload API](/docs/rest-api/upload-file).
+ /// ## Structured documents
+ /// Structured documents provide a natural hierarchy where Vectar handles chunking and metadata automatically. Structured documents are ideal when you want to index documents that have logical organization (titles, sections, paragraphs, and optionally tables or images) but prefer Vectara to manage how the content is split into search-optimized units.
+ /// Each structured document contains:
+ /// - A unique `id` and optional `title`, `description`, and `metadata`.
+ /// - An array of `sections`, each with its own title, text, and optional nested sections, tables, or images.
+ /// - Optional `custom_dimensions` that can influence ranking during search.
+ /// When indexed, Vectara partitions the text into document parts automatically using an intelligent sentence- or character-based chunking strategy. This lets you ingest data with minimal pre-processing while maintaining semantic integrity across context boundaries.
+ /// Structured documents are recommended for content with well-defined sections such as reports, articles, FAQs, or documentation.
+ /// ## Core documents
+ /// Core documents offer fine-grained, explicit control of every part of a document that becomes searchable. Instead of providing a hierarchical structure, you specify each **document part** directly as unit that maps 1:1 to a search result or embedding.
+ /// A core document includes:
+ /// - A unique `id` and optional `metadata`.
+ /// - A list of `document_parts`, where each part includes `text`, optional `context`, `metadata`, and `custom_dimensions`.
+ /// - Optional `tables` and `images`, allowing you to represent complex structured data like spreadsheets or charts.
+ /// Core documents are designed for advanced use cases such as precise chunk-level optimization or experimental corpus structures, and applications where metadata-driven retrieval or ranking must be explicitly controlled.
+ /// ## Chunking strategies
+ /// By default, Vectara uses **sentence-based chunking**, which provides optimal retrieval accuracy for most datasets.
+ /// For larger documents or performance-tuned ingestion, you can explicitly set a `chunking_strategy`:
+ /// - `sentence_chunking_strategy` — creates one chunk per sentence (default).
+ /// - `max_chars_chunking_strategy` — creates larger chunks up to a specified character limit (`max_chars_per_chunk`), balancing retrieval speed with contextual coherence.
+ ///
+ ///
+ ///
+ ///
+ /// A user-provided key for a corpus.
+ /// Example: my-corpus
+ ///
+ ///
+ /// Default Value: searchable
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> CreateAsResponseAsync(
+ string corpusKey,
+
global::Vectara.CreateDocumentRequest request,
int? requestTimeout = default,
int? requestTimeoutMillis = default,
@@ -145,11 +206,12 @@ partial void ProcessCreateResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: $"/v2/corpora/{corpusKey}/documents",
- baseUri: HttpClient.BaseAddress);
+ baseUri: HttpClient.BaseAddress);
__pathBuilder
- .AddOptionalParameter("wait_for", waitFor?.ToValueString())
+ .AddOptionalParameter("wait_for", waitFor?.ToValueString())
;
var __path = __pathBuilder.ToString();
__path = global::Vectara.AutoSDKRequestOptionsSupport.AppendQueryParameters(
@@ -241,6 +303,8 @@ partial void ProcessCreateResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -254,6 +318,11 @@ partial void ProcessCreateResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -271,6 +340,8 @@ partial void ProcessCreateResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -280,8 +351,7 @@ partial void ProcessCreateResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -290,6 +360,11 @@ partial void ProcessCreateResponseContent(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -306,14 +381,15 @@ partial void ProcessCreateResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -353,6 +429,8 @@ partial void ProcessCreateResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -373,6 +451,8 @@ partial void ProcessCreateResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Document creation request was malformed.
@@ -549,9 +629,13 @@ partial void ProcessCreateResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Vectara.Document.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Vectara.Document.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -579,9 +663,13 @@ partial void ProcessCreateResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Vectara.Document.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Vectara.Document.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.DocumentsClient.Delete.g.cs b/src/libs/Vectara/Generated/Vectara.DocumentsClient.Delete.g.cs
index d0263b74..4c210832 100644
--- a/src/libs/Vectara/Generated/Vectara.DocumentsClient.Delete.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.DocumentsClient.Delete.g.cs
@@ -79,6 +79,37 @@ partial void ProcessDeleteResponse(
int? requestTimeoutMillis = default,
global::Vectara.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await DeleteAsResponseAsync(
+ corpusKey: corpusKey,
+ documentId: documentId,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Delete a document
+ /// Permanently delete a document identified by its unique `document_id` from a specific corpus. This operation cannot be undone, so use it with caution.
+ ///
+ ///
+ ///
+ ///
+ /// A user-provided key for a corpus.
+ /// Example: my-corpus
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task DeleteAsResponseAsync(
+ string corpusKey,
+ string documentId,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -111,6 +142,7 @@ partial void ProcessDeleteResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: $"/v2/corpora/{corpusKey}/documents/{documentId}",
baseUri: HttpClient.BaseAddress);
@@ -197,6 +229,8 @@ partial void ProcessDeleteResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -210,6 +244,11 @@ partial void ProcessDeleteResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -227,6 +266,8 @@ partial void ProcessDeleteResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -236,8 +277,7 @@ partial void ProcessDeleteResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -246,6 +286,11 @@ partial void ProcessDeleteResponse(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -262,14 +307,15 @@ partial void ProcessDeleteResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -309,6 +355,8 @@ partial void ProcessDeleteResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -329,6 +377,8 @@ partial void ProcessDeleteResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Permissions do not allow deleting a document in the corpus.
@@ -425,6 +475,10 @@ partial void ProcessDeleteResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -446,6 +500,10 @@ partial void ProcessDeleteResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.DocumentsClient.Get.g.cs b/src/libs/Vectara/Generated/Vectara.DocumentsClient.Get.g.cs
index 80bad727..b32e0efa 100644
--- a/src/libs/Vectara/Generated/Vectara.DocumentsClient.Get.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.DocumentsClient.Get.g.cs
@@ -85,6 +85,40 @@ partial void ProcessGetResponseContent(
int? requestTimeoutMillis = default,
global::Vectara.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GetAsResponseAsync(
+ corpusKey: corpusKey,
+ documentId: documentId,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Retrieve a document
+ /// The Retrieve Document API enables you to fetch the content and metadata of a specific document from a corpus, identified by its unique `document_id` from a specific corpus. Use this endpoint to view the full details of a document, including its text, metadata, and associated tables, if table extraction is enabled.
+ /// This information is particularly useful when you need to analyze the details of a specific document or integrate document content into your application workflows.
+ ///
+ ///
+ ///
+ ///
+ /// A user-provided key for a corpus.
+ /// Example: my-corpus
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> GetAsResponseAsync(
+ string corpusKey,
+ string documentId,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -117,6 +151,7 @@ partial void ProcessGetResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: $"/v2/corpora/{corpusKey}/documents/{documentId}",
baseUri: HttpClient.BaseAddress);
@@ -203,6 +238,8 @@ partial void ProcessGetResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -216,6 +253,11 @@ partial void ProcessGetResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -233,6 +275,8 @@ partial void ProcessGetResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -242,8 +286,7 @@ partial void ProcessGetResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -252,6 +295,11 @@ partial void ProcessGetResponseContent(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -268,14 +316,15 @@ partial void ProcessGetResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -315,6 +364,8 @@ partial void ProcessGetResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -335,6 +386,8 @@ partial void ProcessGetResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Permissions do not allow retrieving a document from the corpus.
@@ -435,9 +488,13 @@ partial void ProcessGetResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Vectara.Document.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Vectara.Document.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -465,9 +522,13 @@ partial void ProcessGetResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Vectara.Document.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Vectara.Document.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.DocumentsClient.GetImage.g.cs b/src/libs/Vectara/Generated/Vectara.DocumentsClient.GetImage.g.cs
index 9a2b9940..abfe4bb9 100644
--- a/src/libs/Vectara/Generated/Vectara.DocumentsClient.GetImage.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.DocumentsClient.GetImage.g.cs
@@ -88,6 +88,42 @@ partial void ProcessGetImageResponseContent(
int? requestTimeoutMillis = default,
global::Vectara.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GetImageAsResponseAsync(
+ corpusKey: corpusKey,
+ documentId: documentId,
+ imageId: imageId,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Retrieve an image from a document
+ /// Returns a specific image that is embedded within a document. The `image_id` uniquely identifies the image within the document. Use this endpoint to fetch the raw image data and associated metadata.
+ ///
+ ///
+ ///
+ ///
+ /// A user-provided key for a corpus.
+ /// Example: my-corpus
+ ///
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> GetImageAsResponseAsync(
+ string corpusKey,
+ string documentId,
+ string imageId,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -121,6 +157,7 @@ partial void ProcessGetImageResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: $"/v2/corpora/{corpusKey}/documents/{documentId}/images/{imageId}",
baseUri: HttpClient.BaseAddress);
@@ -208,6 +245,8 @@ partial void ProcessGetImageResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -221,6 +260,11 @@ partial void ProcessGetImageResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -238,6 +282,8 @@ partial void ProcessGetImageResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -247,8 +293,7 @@ partial void ProcessGetImageResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -257,6 +302,11 @@ partial void ProcessGetImageResponseContent(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -273,14 +323,15 @@ partial void ProcessGetImageResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -320,6 +371,8 @@ partial void ProcessGetImageResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -340,6 +393,8 @@ partial void ProcessGetImageResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Permissions do not allow retrieving the image.
@@ -440,9 +495,13 @@ partial void ProcessGetImageResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Vectara.Image.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Vectara.Image.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -470,9 +529,13 @@ partial void ProcessGetImageResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Vectara.Image.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Vectara.Image.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.DocumentsClient.List.g.cs b/src/libs/Vectara/Generated/Vectara.DocumentsClient.List.g.cs
index 258514bf..f76cbbf4 100644
--- a/src/libs/Vectara/Generated/Vectara.DocumentsClient.List.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.DocumentsClient.List.g.cs
@@ -97,6 +97,50 @@ partial void ProcessListResponseContent(
string? pageKey = default,
global::Vectara.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await ListAsResponseAsync(
+ corpusKey: corpusKey,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ limit: limit,
+ metadataFilter: metadataFilter,
+ pageKey: pageKey,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// List the documents in the corpus
+ /// The List Documents API enables you to retrieve a list of documents stored in a specific corpus. This endpoint provides an overview of document metadata, including document IDs, tables (if table extraction is enabled), and pagination details.
+ /// Use this API for viewing documents indexed so far and helping you decide to remove documents that are no longer needed. It helps you manage the document lifecycle in your environment.
+ /// This information enables you to catalog and inventory large amounts of data while also retrieving lists of documents for further analysis. For example, developers can utilize the metadata to to build custom search and filtering capabilities into their applications. If you enabled tabled extraction, this endpoint also returns the tables that this document contains.
+ /// Currently Document Admin APIs do not allow you to access the text of your documents.
+ ///
+ ///
+ ///
+ ///
+ /// A user-provided key for a corpus.
+ /// Example: my-corpus
+ ///
+ ///
+ /// Default Value: 10
+ ///
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> ListAsResponseAsync(
+ string corpusKey,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ int? limit = default,
+ string? metadataFilter = default,
+ string? pageKey = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -131,13 +175,14 @@ partial void ProcessListResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: $"/v2/corpora/{corpusKey}/documents",
- baseUri: HttpClient.BaseAddress);
+ baseUri: HttpClient.BaseAddress);
__pathBuilder
.AddOptionalParameter("limit", limit?.ToString())
.AddOptionalParameter("metadata_filter", metadataFilter)
- .AddOptionalParameter("page_key", pageKey)
+ .AddOptionalParameter("page_key", pageKey)
;
var __path = __pathBuilder.ToString();
__path = global::Vectara.AutoSDKRequestOptionsSupport.AppendQueryParameters(
@@ -224,6 +269,8 @@ partial void ProcessListResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -237,6 +284,11 @@ partial void ProcessListResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -254,6 +306,8 @@ partial void ProcessListResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -263,8 +317,7 @@ partial void ProcessListResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -273,6 +326,11 @@ partial void ProcessListResponseContent(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -289,14 +347,15 @@ partial void ProcessListResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -336,6 +395,8 @@ partial void ProcessListResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -356,6 +417,8 @@ partial void ProcessListResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Permissions do not allow listing documents in the corpus.
@@ -456,9 +519,13 @@ partial void ProcessListResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Vectara.ListDocumentsResponse.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Vectara.ListDocumentsResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -486,9 +553,13 @@ partial void ProcessListResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Vectara.ListDocumentsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Vectara.ListDocumentsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.DocumentsClient.Summarize.g.cs b/src/libs/Vectara/Generated/Vectara.DocumentsClient.Summarize.g.cs
index dab4ec69..1a9f8168 100644
--- a/src/libs/Vectara/Generated/Vectara.DocumentsClient.Summarize.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.DocumentsClient.Summarize.g.cs
@@ -126,6 +126,86 @@ partial void ProcessSummarizeResponseContent(
string corpusKey,
string documentId,
+ global::Vectara.SummarizeDocumentRequest request,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await SummarizeAsResponseAsync(
+ corpusKey: corpusKey,
+ documentId: documentId,
+
+ request: request,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Summarize a document
+ /// Organizations often struggle with extracting relevant insights from extensive documentation, such as vendor quotes, financial statements, and technical reports. Manually reviewing these documents is both time-consuming and prone to errors.
+ /// The tech preview of the Documentation Summarization API enables users to generate concise summaries that capture essential insights from single documents without having to process entire documents manually. Efficiently process large documents, extract key insights, and interact with real-time data summaries.
+ /// * Enable streaming for large documents to receive summaries incrementally.
+ /// * Customize `prompt_template` to fine-tune summary output for specific domains.
+ /// * Use standard responses for small documents where streaming is unnecessary.
+ /// * Monitor streaming events to track the progress of real-time summarization.
+ /// :::note
+ /// The documentation length is limited by the context window of your selected LLM.
+ /// :::
+ /// ## Response formats
+ /// The API supports two response modes:
+ /// * **Standard**: Provides a complete summary in one response.
+ /// * **Streaming** Provides incremental responses using Server-Sent Events (SSE).
+ /// ### Non-streaming response
+ /// In standard mode, the API returns a structured response containing the complete summary of the document. The summary field contains the generated text, enabling users to extract essential information quickly.
+ /// ### Streaming response
+ /// For streaming responses, the API returns Server-Sent Events (SSE). The first event begins streaming partial results as soon as they are available, while the final event marks the end of the summarization process.
+ /// The streamed response consists of multiple events:
+ /// * `generation_info`: Contains the `rendered_prompt` which is the compiled prompt sent to the LLM for document summarization.
+ /// * `generation_chunk`: Returns partial chunk of the generated summary.
+ /// * `generation_end`: Marks the completion of the summary generation.
+ /// * `error`: Returns an error message if summarization fails.
+ /// * `end`: Indicates the end of the streaming session.
+ /// ## Prompt template example
+ /// When crafting a prompt, you can access your document with the `$vectaraDocument` field. This example shows a simple prompt:
+ /// ```json
+ /// {
+ /// "role": "user",
+ /// "content": "Summarize the document: \$vectaraDocument.json()"
+ /// }
+ /// ```
+ /// The document also has the following methods to support custom prompts.
+ /// * `$vectaraDocument.json()`: Provides a JSON representation of the whole document.
+ /// * `$vectaraDocument.id()`: Specifies the unique identifier of the document (`document_id`)
+ /// * `$vectaraDocument.metadata()`: Specifies metadata from the document.
+ /// For example,
+ /// `$vectaraDocument.metadata().get("key")` retrieves a specific metadata value by key.
+ /// * `$vectaraDocument.parts()`: Returns an array of document parts which you can look through.
+ /// For example, `#foreach ($part in $vectaraDocument.parts())`.
+ /// * `$part.text()`: Retrieves the text of the part.
+ /// * `$part.metadata()`: Retrieves metadata of a part.
+ /// * `$part.hasTable()`: Determines if the part contains a table.
+ /// * `$part.table()`: Provides access to the table within the part. For example, use `$part.table().json()` to retrieve the table in JSON format.
+ ///
+ ///
+ ///
+ ///
+ /// A user-provided key for a corpus.
+ /// Example: my-corpus
+ ///
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> SummarizeAsResponseAsync(
+ string corpusKey,
+ string documentId,
+
global::Vectara.SummarizeDocumentRequest request,
int? requestTimeout = default,
int? requestTimeoutMillis = default,
@@ -166,6 +246,7 @@ partial void ProcessSummarizeResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: $"/v2/corpora/{corpusKey}/documents/{documentId}/summarize",
baseUri: HttpClient.BaseAddress);
@@ -259,6 +340,8 @@ partial void ProcessSummarizeResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -272,6 +355,11 @@ partial void ProcessSummarizeResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -289,6 +377,8 @@ partial void ProcessSummarizeResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -298,8 +388,7 @@ partial void ProcessSummarizeResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -308,6 +397,11 @@ partial void ProcessSummarizeResponseContent(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -324,14 +418,15 @@ partial void ProcessSummarizeResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -371,6 +466,8 @@ partial void ProcessSummarizeResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -391,6 +488,8 @@ partial void ProcessSummarizeResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Permissions do not allow summarizing a document in the corpus.
@@ -491,9 +590,13 @@ partial void ProcessSummarizeResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Vectara.SummarizeDocumentResponse.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Vectara.SummarizeDocumentResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -521,9 +624,13 @@ partial void ProcessSummarizeResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Vectara.SummarizeDocumentResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Vectara.SummarizeDocumentResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.DocumentsClient.SummarizeAsStream.g.cs b/src/libs/Vectara/Generated/Vectara.DocumentsClient.SummarizeAsStream.g.cs
index d2de6853..e4635f32 100644
--- a/src/libs/Vectara/Generated/Vectara.DocumentsClient.SummarizeAsStream.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.DocumentsClient.SummarizeAsStream.g.cs
@@ -161,6 +161,7 @@ partial void ProcessSummarizeAsStreamResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: $"/v2/corpora/{corpusKey}/documents/{documentId}/summarize",
baseUri: HttpClient.BaseAddress);
@@ -254,6 +255,8 @@ partial void ProcessSummarizeAsStreamResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -267,6 +270,11 @@ partial void ProcessSummarizeAsStreamResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -284,6 +292,8 @@ partial void ProcessSummarizeAsStreamResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -293,8 +303,7 @@ partial void ProcessSummarizeAsStreamResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -303,6 +312,11 @@ partial void ProcessSummarizeAsStreamResponse(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -319,14 +333,15 @@ partial void ProcessSummarizeAsStreamResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -366,6 +381,8 @@ partial void ProcessSummarizeAsStreamResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -386,6 +403,8 @@ partial void ProcessSummarizeAsStreamResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
diff --git a/src/libs/Vectara/Generated/Vectara.DocumentsClient.Update.g.cs b/src/libs/Vectara/Generated/Vectara.DocumentsClient.Update.g.cs
index 1ead2456..7204c920 100644
--- a/src/libs/Vectara/Generated/Vectara.DocumentsClient.Update.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.DocumentsClient.Update.g.cs
@@ -84,6 +84,44 @@ partial void ProcessUpdateResponseContent(
string corpusKey,
string documentId,
+ global::Vectara.UpdateDocumentRequest request,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await UpdateAsResponseAsync(
+ corpusKey: corpusKey,
+ documentId: documentId,
+
+ request: request,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Update document, merging the metadata.
+ /// Updates document identified by its unique `document_id` from a specific corpus. The request body metadata is merged with the existing metadata, adding or modifying only the specified fields.
+ ///
+ ///
+ ///
+ ///
+ /// A user-provided key for a corpus.
+ /// Example: my-corpus
+ ///
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> UpdateAsResponseAsync(
+ string corpusKey,
+ string documentId,
+
global::Vectara.UpdateDocumentRequest request,
int? requestTimeout = default,
int? requestTimeoutMillis = default,
@@ -124,6 +162,7 @@ partial void ProcessUpdateResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: $"/v2/corpora/{corpusKey}/documents/{documentId}",
baseUri: HttpClient.BaseAddress);
@@ -217,6 +256,8 @@ partial void ProcessUpdateResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -230,6 +271,11 @@ partial void ProcessUpdateResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -247,6 +293,8 @@ partial void ProcessUpdateResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -256,8 +304,7 @@ partial void ProcessUpdateResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -266,6 +313,11 @@ partial void ProcessUpdateResponseContent(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -282,14 +334,15 @@ partial void ProcessUpdateResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -329,6 +382,8 @@ partial void ProcessUpdateResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -349,6 +404,8 @@ partial void ProcessUpdateResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Permissions do not allow updating a document in the corpus.
@@ -487,9 +544,13 @@ partial void ProcessUpdateResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Vectara.Document.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Vectara.Document.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -517,9 +578,13 @@ partial void ProcessUpdateResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Vectara.Document.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Vectara.Document.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.DocumentsClient.UpdateMetadata.g.cs b/src/libs/Vectara/Generated/Vectara.DocumentsClient.UpdateMetadata.g.cs
index 0befb615..6300c1bf 100644
--- a/src/libs/Vectara/Generated/Vectara.DocumentsClient.UpdateMetadata.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.DocumentsClient.UpdateMetadata.g.cs
@@ -84,6 +84,44 @@ partial void ProcessUpdateMetadataResponseContent(
string corpusKey,
string documentId,
+ global::Vectara.UpdateDocumentRequest request,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await UpdateMetadataAsResponseAsync(
+ corpusKey: corpusKey,
+ documentId: documentId,
+
+ request: request,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Replace the document metadata.
+ /// Replaces metadata of a document identified by its unique `document_id` from a specific corpus.
+ ///
+ ///
+ ///
+ ///
+ /// A user-provided key for a corpus.
+ /// Example: my-corpus
+ ///
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> UpdateMetadataAsResponseAsync(
+ string corpusKey,
+ string documentId,
+
global::Vectara.UpdateDocumentRequest request,
int? requestTimeout = default,
int? requestTimeoutMillis = default,
@@ -124,6 +162,7 @@ partial void ProcessUpdateMetadataResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: $"/v2/corpora/{corpusKey}/documents/{documentId}/metadata",
baseUri: HttpClient.BaseAddress);
@@ -217,6 +256,8 @@ partial void ProcessUpdateMetadataResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -230,6 +271,11 @@ partial void ProcessUpdateMetadataResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -247,6 +293,8 @@ partial void ProcessUpdateMetadataResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -256,8 +304,7 @@ partial void ProcessUpdateMetadataResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -266,6 +313,11 @@ partial void ProcessUpdateMetadataResponseContent(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -282,14 +334,15 @@ partial void ProcessUpdateMetadataResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -329,6 +382,8 @@ partial void ProcessUpdateMetadataResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -349,6 +404,8 @@ partial void ProcessUpdateMetadataResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Permissions do not allow updating a document in the corpus.
@@ -487,9 +544,13 @@ partial void ProcessUpdateMetadataResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Vectara.Document.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Vectara.Document.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -517,9 +578,13 @@ partial void ProcessUpdateMetadataResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Vectara.Document.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Vectara.Document.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.DocumentsClient.g.cs b/src/libs/Vectara/Generated/Vectara.DocumentsClient.g.cs
index 6edbd31b..2c299804 100644
--- a/src/libs/Vectara/Generated/Vectara.DocumentsClient.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.DocumentsClient.g.cs
@@ -75,10 +75,10 @@ public DocumentsClient(
/// Client-wide request defaults such as headers, query parameters, retries, and timeout.
/// Dispose the HttpClient when the instance is disposed. True by default.
public DocumentsClient(
- global::System.Net.Http.HttpClient? httpClient = null,
- global::System.Uri? baseUri = null,
- global::System.Collections.Generic.List? authorizations = null,
- global::Vectara.AutoSDKClientOptions? options = null,
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Uri? baseUri,
+ global::System.Collections.Generic.List? authorizations,
+ global::Vectara.AutoSDKClientOptions? options,
bool disposeHttpClient = true)
{
diff --git a/src/libs/Vectara/Generated/Vectara.EncodersClient.Create.g.cs b/src/libs/Vectara/Generated/Vectara.EncodersClient.Create.g.cs
index d5fde98f..c7aa6534 100644
--- a/src/libs/Vectara/Generated/Vectara.EncodersClient.Create.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.EncodersClient.Create.g.cs
@@ -73,6 +73,35 @@ partial void ProcessCreateResponseContent(
///
public async global::System.Threading.Tasks.Task CreateAsync(
+ global::Vectara.CreateEncoderRequest request,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await CreateAsResponseAsync(
+
+ request: request,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Create an encoder
+ /// Create a new encoder.
+ ///
+ ///
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> CreateAsResponseAsync(
+
global::Vectara.CreateEncoderRequest request,
int? requestTimeout = default,
int? requestTimeoutMillis = default,
@@ -109,6 +138,7 @@ partial void ProcessCreateResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: "/v2/encoders",
baseUri: HttpClient.BaseAddress);
@@ -200,6 +230,8 @@ partial void ProcessCreateResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -213,6 +245,11 @@ partial void ProcessCreateResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -230,6 +267,8 @@ partial void ProcessCreateResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -239,8 +278,7 @@ partial void ProcessCreateResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -249,6 +287,11 @@ partial void ProcessCreateResponseContent(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -265,14 +308,15 @@ partial void ProcessCreateResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -312,6 +356,8 @@ partial void ProcessCreateResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -332,6 +378,8 @@ partial void ProcessCreateResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Encoder creation request was malformed.
@@ -432,9 +480,13 @@ partial void ProcessCreateResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Vectara.Encoder.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Vectara.Encoder.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -462,9 +514,13 @@ partial void ProcessCreateResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Vectara.Encoder.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Vectara.Encoder.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.EncodersClient.List.g.cs b/src/libs/Vectara/Generated/Vectara.EncodersClient.List.g.cs
index a018f809..9507e28a 100644
--- a/src/libs/Vectara/Generated/Vectara.EncodersClient.List.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.EncodersClient.List.g.cs
@@ -89,6 +89,43 @@ partial void ProcessListResponseContent(
string? pageKey = default,
global::Vectara.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await ListAsResponseAsync(
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ filter: filter,
+ limit: limit,
+ pageKey: pageKey,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// List encoders
+ /// The List Encoders API retrieves a list of available encoders used for embedding documents and queries.
+ ///
+ ///
+ ///
+ ///
+ /// Example: vectara.*
+ ///
+ ///
+ /// Default Value: 10
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> ListAsResponseAsync(
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ string? filter = default,
+ int? limit = default,
+ string? pageKey = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -122,13 +159,14 @@ partial void ProcessListResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: "/v2/encoders",
- baseUri: HttpClient.BaseAddress);
+ baseUri: HttpClient.BaseAddress);
__pathBuilder
.AddOptionalParameter("filter", filter)
.AddOptionalParameter("limit", limit?.ToString())
- .AddOptionalParameter("page_key", pageKey)
+ .AddOptionalParameter("page_key", pageKey)
;
var __path = __pathBuilder.ToString();
__path = global::Vectara.AutoSDKRequestOptionsSupport.AppendQueryParameters(
@@ -214,6 +252,8 @@ partial void ProcessListResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -227,6 +267,11 @@ partial void ProcessListResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -244,6 +289,8 @@ partial void ProcessListResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -253,8 +300,7 @@ partial void ProcessListResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -263,6 +309,11 @@ partial void ProcessListResponseContent(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -279,14 +330,15 @@ partial void ProcessListResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -326,6 +378,8 @@ partial void ProcessListResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -346,6 +400,8 @@ partial void ProcessListResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Permissions do not allow listing encoders.
@@ -408,9 +464,13 @@ partial void ProcessListResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Vectara.ListEncodersResponse.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Vectara.ListEncodersResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -438,9 +498,13 @@ partial void ProcessListResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Vectara.ListEncodersResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Vectara.ListEncodersResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.EncodersClient.g.cs b/src/libs/Vectara/Generated/Vectara.EncodersClient.g.cs
index 3620ae59..1bf4f8d9 100644
--- a/src/libs/Vectara/Generated/Vectara.EncodersClient.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.EncodersClient.g.cs
@@ -75,10 +75,10 @@ public EncodersClient(
/// Client-wide request defaults such as headers, query parameters, retries, and timeout.
/// Dispose the HttpClient when the instance is disposed. True by default.
public EncodersClient(
- global::System.Net.Http.HttpClient? httpClient = null,
- global::System.Uri? baseUri = null,
- global::System.Collections.Generic.List? authorizations = null,
- global::Vectara.AutoSDKClientOptions? options = null,
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Uri? baseUri,
+ global::System.Collections.Generic.List? authorizations,
+ global::Vectara.AutoSDKClientOptions? options,
bool disposeHttpClient = true)
{
diff --git a/src/libs/Vectara/Generated/Vectara.FactualConsistencyClient.Evaluate.g.cs b/src/libs/Vectara/Generated/Vectara.FactualConsistencyClient.Evaluate.g.cs
index ab5bd509..92927930 100644
--- a/src/libs/Vectara/Generated/Vectara.FactualConsistencyClient.Evaluate.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.FactualConsistencyClient.Evaluate.g.cs
@@ -103,6 +103,65 @@ partial void ProcessEvaluateResponseContent(
///
public async global::System.Threading.Tasks.Task EvaluateAsync(
+ global::Vectara.EvaluateFactualConsistencyRequest request,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await EvaluateAsResponseAsync(
+
+ request: request,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Evaluate factual consistency
+ /// Evaluate the factual consistency of a generated text (like a summary) against source documents. This determines how accurately the generated text reflects the information in the source documents, helping identify potential hallucinations or misrepresentations.
+ /// Use this API to programmatically validate generated content against trusted source materials—an essential capability for applications in high-integrity environments such as legal, healthcare, scientific publishing, and enterprise knowledge systems.
+ /// The request body must include the following parameters:
+ /// * `model_parameters:` Optionally specifies the evaluation model to use. Default is `hhem_v2.2`.
+ /// * `generated_text`: The output text you want to evaluate, such as a model-generated summary, answer, or response.
+ /// * `source_texts`: An array of source documents or passages used to verify the accuracy of the generated text.
+ /// * `language`: The ISO 639-3 code representing the language of the provided texts (`eng` for English, `fra` for French).
+ /// ### Example request
+ /// This example evaluates whether a generated statement about the Eiffel Tower is factually accurate based on two reference documents.
+ /// ```json
+ /// {
+ /// "generated_text": "The Eiffel Tower is located in Berlin.",
+ /// "source_texts": [
+ /// "The Eiffel Tower is a famous landmark located in Paris, France.",
+ /// "It was built in 1889 and remains one of the most visited monuments in the world."
+ /// ],
+ /// "language": "eng"
+ /// }
+ /// ```
+ /// ### Example response
+ /// The response includes a factual consistency score and probability estimates.
+ /// ```json
+ /// {
+ /// "score": 0.23,
+ /// "p_consistent": 0.12,
+ /// "p_inconsistent": 0.88
+ /// }
+ /// ```
+ /// * `score`: A normalized value between `0.0` and `1.0` that reflects the overall factual alignment between the generated text and the source texts. Higher scores indicate stronger consistency.
+ /// * `p_consistent`: The estimated probability that the generated text is factually consistent with the sources.
+ /// * `p_inconsistent`: The estimated probability that the generated text contains factual inaccuracies relative to the source documents.
+ ///
+ ///
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> EvaluateAsResponseAsync(
+
global::Vectara.EvaluateFactualConsistencyRequest request,
int? requestTimeout = default,
int? requestTimeoutMillis = default,
@@ -141,6 +200,7 @@ partial void ProcessEvaluateResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: "/v2/evaluate_factual_consistency",
baseUri: HttpClient.BaseAddress);
@@ -232,6 +292,8 @@ partial void ProcessEvaluateResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -245,6 +307,11 @@ partial void ProcessEvaluateResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -262,6 +329,8 @@ partial void ProcessEvaluateResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -271,8 +340,7 @@ partial void ProcessEvaluateResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -281,6 +349,11 @@ partial void ProcessEvaluateResponseContent(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -297,14 +370,15 @@ partial void ProcessEvaluateResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -344,6 +418,8 @@ partial void ProcessEvaluateResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -364,6 +440,8 @@ partial void ProcessEvaluateResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Invalid request body.
@@ -502,9 +580,13 @@ partial void ProcessEvaluateResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Vectara.EvaluateFactualConsistencyResponse.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Vectara.EvaluateFactualConsistencyResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -532,9 +614,13 @@ partial void ProcessEvaluateResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Vectara.EvaluateFactualConsistencyResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Vectara.EvaluateFactualConsistencyResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.FactualConsistencyClient.g.cs b/src/libs/Vectara/Generated/Vectara.FactualConsistencyClient.g.cs
index 2e485271..74e19c08 100644
--- a/src/libs/Vectara/Generated/Vectara.FactualConsistencyClient.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.FactualConsistencyClient.g.cs
@@ -75,10 +75,10 @@ public FactualConsistencyClient(
/// Client-wide request defaults such as headers, query parameters, retries, and timeout.
/// Dispose the HttpClient when the instance is disposed. True by default.
public FactualConsistencyClient(
- global::System.Net.Http.HttpClient? httpClient = null,
- global::System.Uri? baseUri = null,
- global::System.Collections.Generic.List? authorizations = null,
- global::Vectara.AutoSDKClientOptions? options = null,
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Uri? baseUri,
+ global::System.Collections.Generic.List? authorizations,
+ global::Vectara.AutoSDKClientOptions? options,
bool disposeHttpClient = true)
{
diff --git a/src/libs/Vectara/Generated/Vectara.GenerationPresetsClient.Create.g.cs b/src/libs/Vectara/Generated/Vectara.GenerationPresetsClient.Create.g.cs
index 828a701a..9e2fd9eb 100644
--- a/src/libs/Vectara/Generated/Vectara.GenerationPresetsClient.Create.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.GenerationPresetsClient.Create.g.cs
@@ -74,6 +74,36 @@ partial void ProcessCreateResponseContent(
///
public async global::System.Threading.Tasks.Task CreateAsync(
+ global::Vectara.CreateGenerationPresetRequest request,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await CreateAsResponseAsync(
+
+ request: request,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Create a generation preset
+ /// Create a custom generation preset for use in query and chat requests. A generation preset bundles a prompt template, an LLM, and model parameters into a reusable configuration.
+ /// The created preset can be referenced by name using the `generation_preset_name` field in query or chat requests.
+ ///
+ ///
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> CreateAsResponseAsync(
+
global::Vectara.CreateGenerationPresetRequest request,
int? requestTimeout = default,
int? requestTimeoutMillis = default,
@@ -110,6 +140,7 @@ partial void ProcessCreateResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: "/v2/generation_presets",
baseUri: HttpClient.BaseAddress);
@@ -201,6 +232,8 @@ partial void ProcessCreateResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -214,6 +247,11 @@ partial void ProcessCreateResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -231,6 +269,8 @@ partial void ProcessCreateResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -240,8 +280,7 @@ partial void ProcessCreateResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -250,6 +289,11 @@ partial void ProcessCreateResponseContent(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -266,14 +310,15 @@ partial void ProcessCreateResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -313,6 +358,8 @@ partial void ProcessCreateResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -333,6 +380,8 @@ partial void ProcessCreateResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Invalid request parameters.
@@ -433,9 +482,13 @@ partial void ProcessCreateResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Vectara.GenerationPreset.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Vectara.GenerationPreset.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -463,9 +516,13 @@ partial void ProcessCreateResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Vectara.GenerationPreset.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Vectara.GenerationPreset.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.GenerationPresetsClient.Delete.g.cs b/src/libs/Vectara/Generated/Vectara.GenerationPresetsClient.Delete.g.cs
index 093435c0..528645db 100644
--- a/src/libs/Vectara/Generated/Vectara.GenerationPresetsClient.Delete.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.GenerationPresetsClient.Delete.g.cs
@@ -73,6 +73,32 @@ partial void ProcessDeleteResponse(
int? requestTimeoutMillis = default,
global::Vectara.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await DeleteAsResponseAsync(
+ generationPresetId: generationPresetId,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Delete a generation preset
+ /// Delete an existing custom generation preset.
+ /// The preset must have been created by the customer (platform presets cannot be deleted).
+ ///
+ ///
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task DeleteAsResponseAsync(
+ string generationPresetId,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -104,6 +130,7 @@ partial void ProcessDeleteResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: $"/v2/generation_presets/{generationPresetId}",
baseUri: HttpClient.BaseAddress);
@@ -189,6 +216,8 @@ partial void ProcessDeleteResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -202,6 +231,11 @@ partial void ProcessDeleteResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -219,6 +253,8 @@ partial void ProcessDeleteResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -228,8 +264,7 @@ partial void ProcessDeleteResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -238,6 +273,11 @@ partial void ProcessDeleteResponse(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -254,14 +294,15 @@ partial void ProcessDeleteResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -301,6 +342,8 @@ partial void ProcessDeleteResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -321,6 +364,8 @@ partial void ProcessDeleteResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Invalid request parameters.
@@ -455,6 +500,10 @@ partial void ProcessDeleteResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -476,6 +525,10 @@ partial void ProcessDeleteResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.GenerationPresetsClient.List.g.cs b/src/libs/Vectara/Generated/Vectara.GenerationPresetsClient.List.g.cs
index 1bfd90aa..ea618ebf 100644
--- a/src/libs/Vectara/Generated/Vectara.GenerationPresetsClient.List.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.GenerationPresetsClient.List.g.cs
@@ -100,6 +100,53 @@ partial void ProcessListResponseContent(
string? pageKey = default,
global::Vectara.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await ListAsResponseAsync(
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ llmName: llmName,
+ filter: filter,
+ limit: limit,
+ pageKey: pageKey,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// List generation presets
+ /// Organizations often struggle to fine-tune query responses and maintain consistency across different use cases. Vectara creates and maintains predefined generation presets for our users which provides a flexible and powerful way to utilize generation parameters. Each preset includes a complete Velocity template for the prompt along with other generation parameters. Presets are typically associated with a single LLM.
+ /// The List Generation Presets API lets you view the generation presets used for [query](/docs/rest-api/queries) requests. Generation presets group several properties that configure generation for a request. These presets provide more flexibility in how generation parameters are configured, enabling more fine-tuned control over query responses.
+ /// This includes the `prompt_template`, the Large Language Model (LLM), and other generation settings like `max_tokens` and `temperature`. Users specify a generation preset in their query or chat requests using the `generation_preset_name` field.
+ /// ## Generation presets object
+ /// The `generation_presets` object contains the `name`, `description`, `llm_name`, `prompt_template`, and other fields make up the preset.
+ /// If your account has access to a preset, then `enabled` is set to `true`. A preset can also be set as a `default`.\n\n### Example generation presets response\n\n```json\n{\n \"generation_presets\": [\n {\n \"name\": \"vectara-summary-ext-24-05-med-omni\",\n \"description\": \"Generate summary with controllable citations, Uses GPT-4o with 2,048 max tokens\",\n \"llm_name\": \"gpt-4o\",\n \"prompt_template\": \"[\\n {\\\"role\\\": \\\"system\\\", \\\"content\\\": \\\"Follow these detailed step-by-step\",\n \"max_used_search_results\": 25,\n \"max_tokens\": 2048,\n \"temperature\": 0,\n \"frequency_penalty\": 0,\n \"presence_penalty\": 0,\n \"enabled\": true,\n \"default\": false\n },\n // More presets appear here\n}\n```\n"
+ ///
+ ///
+ ///
+ ///
+ /// Example: mockingbird-2.0
+ ///
+ ///
+ /// Example: mockingbird.*
+ ///
+ ///
+ /// Default Value: 10
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task> ListAsResponseAsync(
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ string? llmName = default,
+ string? filter = default,
+ int? limit = default,
+ string? pageKey = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -134,14 +181,15 @@ partial void ProcessListResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Vectara.PathBuilder(
path: "/v2/generation_presets",
- baseUri: HttpClient.BaseAddress);
+ baseUri: HttpClient.BaseAddress);
__pathBuilder
.AddOptionalParameter("llm_name", llmName)
.AddOptionalParameter("filter", filter)
.AddOptionalParameter("limit", limit?.ToString())
- .AddOptionalParameter("page_key", pageKey)
+ .AddOptionalParameter("page_key", pageKey)
;
var __path = __pathBuilder.ToString();
__path = global::Vectara.AutoSDKRequestOptionsSupport.AppendQueryParameters(
@@ -228,6 +276,8 @@ partial void ProcessListResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -241,6 +291,11 @@ partial void ProcessListResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -258,6 +313,8 @@ partial void ProcessListResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -267,8 +324,7 @@ partial void ProcessListResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -277,6 +333,11 @@ partial void ProcessListResponseContent(
__attempt < __maxAttempts &&
global::Vectara.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Vectara.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Vectara.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Vectara.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -293,14 +354,15 @@ partial void ProcessListResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Vectara.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -340,6 +402,8 @@ partial void ProcessListResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -360,6 +424,8 @@ partial void ProcessListResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// Permissions do not allow listing generation presets.
@@ -422,9 +488,13 @@ partial void ProcessListResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Vectara.ListGenerationPresetsResponse.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Vectara.ListGenerationPresetsResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -452,9 +522,13 @@ partial void ProcessListResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Vectara.ListGenerationPresetsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Vectara.ListGenerationPresetsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Vectara.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Vectara.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Vectara/Generated/Vectara.GenerationPresetsClient.Replace.g.cs b/src/libs/Vectara/Generated/Vectara.GenerationPresetsClient.Replace.g.cs
index 1f50527f..d2c6fd09 100644
--- a/src/libs/Vectara/Generated/Vectara.GenerationPresetsClient.Replace.g.cs
+++ b/src/libs/Vectara/Generated/Vectara.GenerationPresetsClient.Replace.g.cs
@@ -78,6 +78,39 @@ partial void ProcessReplaceResponseContent(
public async global::System.Threading.Tasks.Task ReplaceAsync(
string generationPresetId,
+ global::Vectara.CreateGenerationPresetRequest request,
+ int? requestTimeout = default,
+ int? requestTimeoutMillis = default,
+ global::Vectara.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await ReplaceAsResponseAsync(
+ generationPresetId: generationPresetId,
+
+ request: request,
+ requestTimeout: requestTimeout,
+ requestTimeoutMillis: requestTimeoutMillis,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Replace a generation preset