diff --git a/src/libs/Tavus/Generated/Tavus.AutoSDKHttpResponse.g.cs b/src/libs/Tavus/Generated/Tavus.AutoSDKHttpResponse.g.cs
new file mode 100644
index 0000000..406f8b4
--- /dev/null
+++ b/src/libs/Tavus/Generated/Tavus.AutoSDKHttpResponse.g.cs
@@ -0,0 +1,121 @@
+
+#nullable enable
+
+namespace Tavus
+{
+ ///
+ /// 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/Tavus/Generated/Tavus.ConversationsClient.CreateConversation.g.cs b/src/libs/Tavus/Generated/Tavus.ConversationsClient.CreateConversation.g.cs
index 52ce691..7a591be 100644
--- a/src/libs/Tavus/Generated/Tavus.ConversationsClient.CreateConversation.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.ConversationsClient.CreateConversation.g.cs
@@ -51,6 +51,29 @@ partial void ProcessCreateConversationResponseContent(
///
public async global::System.Threading.Tasks.Task CreateConversationAsync(
+ global::Tavus.CreateConversationRequest request,
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await CreateConversationAsResponseAsync(
+
+ request: request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Create Conversation
+ /// Start a real-time video conversation with your AI replica and persona. The response includes a conversation_url to join the call or embed it.
+ ///
+ ///
+ /// 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> CreateConversationAsResponseAsync(
+
global::Tavus.CreateConversationRequest request,
global::Tavus.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
@@ -85,6 +108,7 @@ partial void ProcessCreateConversationResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Tavus.PathBuilder(
path: "/v2/conversations",
baseUri: HttpClient.BaseAddress);
@@ -164,6 +188,8 @@ partial void ProcessCreateConversationResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -174,6 +200,11 @@ partial void ProcessCreateConversationResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -191,6 +222,8 @@ partial void ProcessCreateConversationResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -200,8 +233,7 @@ partial void ProcessCreateConversationResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -210,6 +242,11 @@ partial void ProcessCreateConversationResponseContent(
__attempt < __maxAttempts &&
global::Tavus.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Tavus.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -226,14 +263,15 @@ partial void ProcessCreateConversationResponseContent(
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::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -273,6 +311,8 @@ partial void ProcessCreateConversationResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -293,6 +333,8 @@ partial void ProcessCreateConversationResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
@@ -317,9 +359,13 @@ partial void ProcessCreateConversationResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Tavus.CreateConversationResponse.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Tavus.CreateConversationResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -347,9 +393,13 @@ partial void ProcessCreateConversationResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Tavus.CreateConversationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Tavus.CreateConversationResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Tavus/Generated/Tavus.ConversationsClient.DeleteConversation.g.cs b/src/libs/Tavus/Generated/Tavus.ConversationsClient.DeleteConversation.g.cs
index 3d8f47a..cdc0997 100644
--- a/src/libs/Tavus/Generated/Tavus.ConversationsClient.DeleteConversation.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.ConversationsClient.DeleteConversation.g.cs
@@ -48,6 +48,25 @@ partial void ProcessDeleteConversationResponse(
string conversationId,
global::Tavus.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await DeleteConversationAsResponseAsync(
+ conversationId: conversationId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Delete Conversation
+ /// Deletes a single conversation.
+ ///
+ ///
+ /// 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 DeleteConversationAsResponseAsync(
+ string conversationId,
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -77,6 +96,7 @@ partial void ProcessDeleteConversationResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Tavus.PathBuilder(
path: $"/v2/conversations/{conversationId}",
baseUri: HttpClient.BaseAddress);
@@ -150,6 +170,8 @@ partial void ProcessDeleteConversationResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -160,6 +182,11 @@ partial void ProcessDeleteConversationResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -177,6 +204,8 @@ partial void ProcessDeleteConversationResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -186,8 +215,7 @@ partial void ProcessDeleteConversationResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -196,6 +224,11 @@ partial void ProcessDeleteConversationResponse(
__attempt < __maxAttempts &&
global::Tavus.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Tavus.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -212,14 +245,15 @@ partial void ProcessDeleteConversationResponse(
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::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -259,6 +293,8 @@ partial void ProcessDeleteConversationResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -279,6 +315,8 @@ partial void ProcessDeleteConversationResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
@@ -299,6 +337,10 @@ partial void ProcessDeleteConversationResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -320,6 +362,10 @@ partial void ProcessDeleteConversationResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Tavus/Generated/Tavus.ConversationsClient.EndConversation.g.cs b/src/libs/Tavus/Generated/Tavus.ConversationsClient.EndConversation.g.cs
index f5be162..94c1b47 100644
--- a/src/libs/Tavus/Generated/Tavus.ConversationsClient.EndConversation.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.ConversationsClient.EndConversation.g.cs
@@ -48,6 +48,25 @@ partial void ProcessEndConversationResponse(
string conversationId,
global::Tavus.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await EndConversationAsResponseAsync(
+ conversationId: conversationId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// End Conversation
+ /// Ends a single conversation.
+ ///
+ ///
+ /// 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 EndConversationAsResponseAsync(
+ string conversationId,
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -77,6 +96,7 @@ partial void ProcessEndConversationResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Tavus.PathBuilder(
path: $"/v2/conversations/{conversationId}/end",
baseUri: HttpClient.BaseAddress);
@@ -150,6 +170,8 @@ partial void ProcessEndConversationResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -160,6 +182,11 @@ partial void ProcessEndConversationResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -177,6 +204,8 @@ partial void ProcessEndConversationResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -186,8 +215,7 @@ partial void ProcessEndConversationResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -196,6 +224,11 @@ partial void ProcessEndConversationResponse(
__attempt < __maxAttempts &&
global::Tavus.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Tavus.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -212,14 +245,15 @@ partial void ProcessEndConversationResponse(
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::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -259,6 +293,8 @@ partial void ProcessEndConversationResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -279,6 +315,8 @@ partial void ProcessEndConversationResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
@@ -299,6 +337,10 @@ partial void ProcessEndConversationResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -320,6 +362,10 @@ partial void ProcessEndConversationResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Tavus/Generated/Tavus.ConversationsClient.GetConversation.g.cs b/src/libs/Tavus/Generated/Tavus.ConversationsClient.GetConversation.g.cs
index c549510..92e8a2c 100644
--- a/src/libs/Tavus/Generated/Tavus.ConversationsClient.GetConversation.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.ConversationsClient.GetConversation.g.cs
@@ -57,6 +57,30 @@ partial void ProcessGetConversationResponseContent(
bool? verbose = default,
global::Tavus.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GetConversationAsResponseAsync(
+ conversationId: conversationId,
+ verbose: verbose,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Get Conversation
+ /// Returns a single conversation. Append ?verbose=true for additional event data including transcript and perception analysis.
+ ///
+ ///
+ ///
+ /// 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> GetConversationAsResponseAsync(
+ string conversationId,
+ bool? verbose = default,
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -87,11 +111,12 @@ partial void ProcessGetConversationResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Tavus.PathBuilder(
path: $"/v2/conversations/{conversationId}",
- baseUri: HttpClient.BaseAddress);
+ baseUri: HttpClient.BaseAddress);
__pathBuilder
- .AddOptionalParameter("verbose", verbose?.ToString().ToLowerInvariant())
+ .AddOptionalParameter("verbose", verbose?.ToString().ToLowerInvariant())
;
var __path = __pathBuilder.ToString();
__path = global::Tavus.AutoSDKRequestOptionsSupport.AppendQueryParameters(
@@ -164,6 +189,8 @@ partial void ProcessGetConversationResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -174,6 +201,11 @@ partial void ProcessGetConversationResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -191,6 +223,8 @@ partial void ProcessGetConversationResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -200,8 +234,7 @@ partial void ProcessGetConversationResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -210,6 +243,11 @@ partial void ProcessGetConversationResponseContent(
__attempt < __maxAttempts &&
global::Tavus.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Tavus.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -226,14 +264,15 @@ partial void ProcessGetConversationResponseContent(
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::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -273,6 +312,8 @@ partial void ProcessGetConversationResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -293,6 +334,8 @@ partial void ProcessGetConversationResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
@@ -317,9 +360,13 @@ partial void ProcessGetConversationResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Tavus.Conversation.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Tavus.Conversation.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -347,9 +394,13 @@ partial void ProcessGetConversationResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Tavus.Conversation.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Tavus.Conversation.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Tavus/Generated/Tavus.ConversationsClient.ListConversations.g.cs b/src/libs/Tavus/Generated/Tavus.ConversationsClient.ListConversations.g.cs
index 6ac9dac..f1b0d51 100644
--- a/src/libs/Tavus/Generated/Tavus.ConversationsClient.ListConversations.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.ConversationsClient.ListConversations.g.cs
@@ -49,6 +49,24 @@ partial void ProcessListConversationsResponseContent(
public async global::System.Threading.Tasks.Task ListConversationsAsync(
global::Tavus.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await ListConversationsAsResponseAsync(
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// List Conversations
+ /// Returns a list of all conversations.
+ ///
+ /// 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> ListConversationsAsResponseAsync(
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -77,6 +95,7 @@ partial void ProcessListConversationsResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Tavus.PathBuilder(
path: "/v2/conversations",
baseUri: HttpClient.BaseAddress);
@@ -149,6 +168,8 @@ partial void ProcessListConversationsResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -159,6 +180,11 @@ partial void ProcessListConversationsResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -176,6 +202,8 @@ partial void ProcessListConversationsResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -185,8 +213,7 @@ partial void ProcessListConversationsResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -195,6 +222,11 @@ partial void ProcessListConversationsResponseContent(
__attempt < __maxAttempts &&
global::Tavus.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Tavus.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -211,14 +243,15 @@ partial void ProcessListConversationsResponseContent(
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::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -258,6 +291,8 @@ partial void ProcessListConversationsResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -278,6 +313,8 @@ partial void ProcessListConversationsResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
@@ -302,9 +339,13 @@ partial void ProcessListConversationsResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Tavus.ListConversationsResponse.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Tavus.ListConversationsResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -332,9 +373,13 @@ partial void ProcessListConversationsResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Tavus.ListConversationsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Tavus.ListConversationsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Tavus/Generated/Tavus.ConversationsClient.g.cs b/src/libs/Tavus/Generated/Tavus.ConversationsClient.g.cs
index 28349a7..3d51887 100644
--- a/src/libs/Tavus/Generated/Tavus.ConversationsClient.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.ConversationsClient.g.cs
@@ -72,10 +72,10 @@ public ConversationsClient(
/// Client-wide request defaults such as headers, query parameters, retries, and timeout.
/// Dispose the HttpClient when the instance is disposed. True by default.
public ConversationsClient(
- global::System.Net.Http.HttpClient? httpClient = null,
- global::System.Uri? baseUri = null,
- global::System.Collections.Generic.List? authorizations = null,
- global::Tavus.AutoSDKClientOptions? options = null,
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Uri? baseUri,
+ global::System.Collections.Generic.List? authorizations,
+ global::Tavus.AutoSDKClientOptions? options,
bool disposeHttpClient = true)
{
diff --git a/src/libs/Tavus/Generated/Tavus.DocumentsClient.CreateDocument.g.cs b/src/libs/Tavus/Generated/Tavus.DocumentsClient.CreateDocument.g.cs
index 8b3fa50..f3036b0 100644
--- a/src/libs/Tavus/Generated/Tavus.DocumentsClient.CreateDocument.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.DocumentsClient.CreateDocument.g.cs
@@ -51,6 +51,29 @@ partial void ProcessCreateDocumentResponseContent(
///
public async global::System.Threading.Tasks.Task CreateDocumentAsync(
+ global::Tavus.CreateDocumentRequest request,
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await CreateDocumentAsResponseAsync(
+
+ request: request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Create Document
+ /// Upload documents to your knowledge base for personas to reference. Supports .pdf, .txt, .docx, .doc, .png, .jpg, .pptx, .csv, .xlsx and URLs.
+ ///
+ ///
+ /// 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> CreateDocumentAsResponseAsync(
+
global::Tavus.CreateDocumentRequest request,
global::Tavus.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
@@ -85,6 +108,7 @@ partial void ProcessCreateDocumentResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Tavus.PathBuilder(
path: "/v2/documents",
baseUri: HttpClient.BaseAddress);
@@ -164,6 +188,8 @@ partial void ProcessCreateDocumentResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -174,6 +200,11 @@ partial void ProcessCreateDocumentResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -191,6 +222,8 @@ partial void ProcessCreateDocumentResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -200,8 +233,7 @@ partial void ProcessCreateDocumentResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -210,6 +242,11 @@ partial void ProcessCreateDocumentResponseContent(
__attempt < __maxAttempts &&
global::Tavus.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Tavus.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -226,14 +263,15 @@ partial void ProcessCreateDocumentResponseContent(
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::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -273,6 +311,8 @@ partial void ProcessCreateDocumentResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -293,6 +333,8 @@ partial void ProcessCreateDocumentResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
@@ -317,9 +359,13 @@ partial void ProcessCreateDocumentResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Tavus.Document.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Tavus.Document.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -347,9 +393,13 @@ partial void ProcessCreateDocumentResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Tavus.Document.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Tavus.Document.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Tavus/Generated/Tavus.DocumentsClient.DeleteDocument.g.cs b/src/libs/Tavus/Generated/Tavus.DocumentsClient.DeleteDocument.g.cs
index a9307e8..9fb64ba 100644
--- a/src/libs/Tavus/Generated/Tavus.DocumentsClient.DeleteDocument.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.DocumentsClient.DeleteDocument.g.cs
@@ -48,6 +48,25 @@ partial void ProcessDeleteDocumentResponse(
string documentId,
global::Tavus.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await DeleteDocumentAsResponseAsync(
+ documentId: documentId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Delete Document
+ /// Delete a document.
+ ///
+ ///
+ /// 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 DeleteDocumentAsResponseAsync(
+ string documentId,
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -77,6 +96,7 @@ partial void ProcessDeleteDocumentResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Tavus.PathBuilder(
path: $"/v2/documents/{documentId}",
baseUri: HttpClient.BaseAddress);
@@ -150,6 +170,8 @@ partial void ProcessDeleteDocumentResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -160,6 +182,11 @@ partial void ProcessDeleteDocumentResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -177,6 +204,8 @@ partial void ProcessDeleteDocumentResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -186,8 +215,7 @@ partial void ProcessDeleteDocumentResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -196,6 +224,11 @@ partial void ProcessDeleteDocumentResponse(
__attempt < __maxAttempts &&
global::Tavus.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Tavus.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -212,14 +245,15 @@ partial void ProcessDeleteDocumentResponse(
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::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -259,6 +293,8 @@ partial void ProcessDeleteDocumentResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -279,6 +315,8 @@ partial void ProcessDeleteDocumentResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
@@ -299,6 +337,10 @@ partial void ProcessDeleteDocumentResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -320,6 +362,10 @@ partial void ProcessDeleteDocumentResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Tavus/Generated/Tavus.DocumentsClient.GetDocument.g.cs b/src/libs/Tavus/Generated/Tavus.DocumentsClient.GetDocument.g.cs
index e4a7080..cf60a68 100644
--- a/src/libs/Tavus/Generated/Tavus.DocumentsClient.GetDocument.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.DocumentsClient.GetDocument.g.cs
@@ -53,6 +53,27 @@ partial void ProcessGetDocumentResponseContent(
string documentId,
global::Tavus.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GetDocumentAsResponseAsync(
+ documentId: documentId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Get Document
+ /// Retrieve a specific document.
+ ///
+ ///
+ /// 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> GetDocumentAsResponseAsync(
+ string documentId,
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -82,6 +103,7 @@ partial void ProcessGetDocumentResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Tavus.PathBuilder(
path: $"/v2/documents/{documentId}",
baseUri: HttpClient.BaseAddress);
@@ -155,6 +177,8 @@ partial void ProcessGetDocumentResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -165,6 +189,11 @@ partial void ProcessGetDocumentResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -182,6 +211,8 @@ partial void ProcessGetDocumentResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -191,8 +222,7 @@ partial void ProcessGetDocumentResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -201,6 +231,11 @@ partial void ProcessGetDocumentResponseContent(
__attempt < __maxAttempts &&
global::Tavus.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Tavus.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -217,14 +252,15 @@ partial void ProcessGetDocumentResponseContent(
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::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -264,6 +300,8 @@ partial void ProcessGetDocumentResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -284,6 +322,8 @@ partial void ProcessGetDocumentResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
@@ -308,9 +348,13 @@ partial void ProcessGetDocumentResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Tavus.Document.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Tavus.Document.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -338,9 +382,13 @@ partial void ProcessGetDocumentResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Tavus.Document.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Tavus.Document.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Tavus/Generated/Tavus.DocumentsClient.ListDocuments.g.cs b/src/libs/Tavus/Generated/Tavus.DocumentsClient.ListDocuments.g.cs
index a94e2e2..b7246d5 100644
--- a/src/libs/Tavus/Generated/Tavus.DocumentsClient.ListDocuments.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.DocumentsClient.ListDocuments.g.cs
@@ -61,6 +61,33 @@ partial void ProcessListDocumentsResponseContent(
string? tags = default,
global::Tavus.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await ListDocumentsAsResponseAsync(
+ page: page,
+ pageSize: pageSize,
+ tags: tags,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// List Documents
+ /// Retrieve a list of documents with optional filtering and pagination.
+ ///
+ ///
+ ///
+ ///
+ /// 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> ListDocumentsAsResponseAsync(
+ int? page = default,
+ int? pageSize = default,
+ string? tags = default,
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -92,13 +119,14 @@ partial void ProcessListDocumentsResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Tavus.PathBuilder(
path: "/v2/documents",
- baseUri: HttpClient.BaseAddress);
+ baseUri: HttpClient.BaseAddress);
__pathBuilder
.AddOptionalParameter("page", page?.ToString())
.AddOptionalParameter("page_size", pageSize?.ToString())
- .AddOptionalParameter("tags", tags)
+ .AddOptionalParameter("tags", tags)
;
var __path = __pathBuilder.ToString();
__path = global::Tavus.AutoSDKRequestOptionsSupport.AppendQueryParameters(
@@ -172,6 +200,8 @@ partial void ProcessListDocumentsResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -182,6 +212,11 @@ partial void ProcessListDocumentsResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -199,6 +234,8 @@ partial void ProcessListDocumentsResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -208,8 +245,7 @@ partial void ProcessListDocumentsResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -218,6 +254,11 @@ partial void ProcessListDocumentsResponseContent(
__attempt < __maxAttempts &&
global::Tavus.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Tavus.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -234,14 +275,15 @@ partial void ProcessListDocumentsResponseContent(
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::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -281,6 +323,8 @@ partial void ProcessListDocumentsResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -301,6 +345,8 @@ partial void ProcessListDocumentsResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
@@ -325,9 +371,13 @@ partial void ProcessListDocumentsResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Tavus.ListDocumentsResponse.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Tavus.ListDocumentsResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -355,9 +405,13 @@ partial void ProcessListDocumentsResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Tavus.ListDocumentsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Tavus.ListDocumentsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Tavus/Generated/Tavus.DocumentsClient.RecrawlDocument.g.cs b/src/libs/Tavus/Generated/Tavus.DocumentsClient.RecrawlDocument.g.cs
index aeb5c30..20e3a68 100644
--- a/src/libs/Tavus/Generated/Tavus.DocumentsClient.RecrawlDocument.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.DocumentsClient.RecrawlDocument.g.cs
@@ -55,6 +55,32 @@ partial void ProcessRecrawlDocumentResponseContent(
public async global::System.Threading.Tasks.Task RecrawlDocumentAsync(
string documentId,
+ global::Tavus.RecrawlDocumentRequest request,
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await RecrawlDocumentAsResponseAsync(
+ documentId: documentId,
+
+ request: request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Recrawl Document
+ /// Trigger a recrawl of a website document to fetch fresh content.
+ ///
+ ///
+ ///
+ /// 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> RecrawlDocumentAsResponseAsync(
+ string documentId,
+
global::Tavus.RecrawlDocumentRequest request,
global::Tavus.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
@@ -90,6 +116,7 @@ partial void ProcessRecrawlDocumentResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Tavus.PathBuilder(
path: $"/v2/documents/{documentId}/recrawl",
baseUri: HttpClient.BaseAddress);
@@ -170,6 +197,8 @@ partial void ProcessRecrawlDocumentResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -180,6 +209,11 @@ partial void ProcessRecrawlDocumentResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -197,6 +231,8 @@ partial void ProcessRecrawlDocumentResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -206,8 +242,7 @@ partial void ProcessRecrawlDocumentResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -216,6 +251,11 @@ partial void ProcessRecrawlDocumentResponseContent(
__attempt < __maxAttempts &&
global::Tavus.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Tavus.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -232,14 +272,15 @@ partial void ProcessRecrawlDocumentResponseContent(
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::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -279,6 +320,8 @@ partial void ProcessRecrawlDocumentResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -299,6 +342,8 @@ partial void ProcessRecrawlDocumentResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
@@ -323,9 +368,13 @@ partial void ProcessRecrawlDocumentResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Tavus.Document.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Tavus.Document.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -353,9 +402,13 @@ partial void ProcessRecrawlDocumentResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Tavus.Document.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Tavus.Document.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Tavus/Generated/Tavus.DocumentsClient.UpdateDocument.g.cs b/src/libs/Tavus/Generated/Tavus.DocumentsClient.UpdateDocument.g.cs
index 7137a39..278d049 100644
--- a/src/libs/Tavus/Generated/Tavus.DocumentsClient.UpdateDocument.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.DocumentsClient.UpdateDocument.g.cs
@@ -55,6 +55,32 @@ partial void ProcessUpdateDocumentResponseContent(
public async global::System.Threading.Tasks.Task UpdateDocumentAsync(
string documentId,
+ global::Tavus.UpdateDocumentRequest request,
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await UpdateDocumentAsResponseAsync(
+ documentId: documentId,
+
+ request: request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Update Document
+ /// Update document metadata.
+ ///
+ ///
+ ///
+ /// 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> UpdateDocumentAsResponseAsync(
+ string documentId,
+
global::Tavus.UpdateDocumentRequest request,
global::Tavus.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
@@ -90,6 +116,7 @@ partial void ProcessUpdateDocumentResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Tavus.PathBuilder(
path: $"/v2/documents/{documentId}",
baseUri: HttpClient.BaseAddress);
@@ -170,6 +197,8 @@ partial void ProcessUpdateDocumentResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -180,6 +209,11 @@ partial void ProcessUpdateDocumentResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -197,6 +231,8 @@ partial void ProcessUpdateDocumentResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -206,8 +242,7 @@ partial void ProcessUpdateDocumentResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -216,6 +251,11 @@ partial void ProcessUpdateDocumentResponseContent(
__attempt < __maxAttempts &&
global::Tavus.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Tavus.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -232,14 +272,15 @@ partial void ProcessUpdateDocumentResponseContent(
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::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -279,6 +320,8 @@ partial void ProcessUpdateDocumentResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -299,6 +342,8 @@ partial void ProcessUpdateDocumentResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
@@ -323,9 +368,13 @@ partial void ProcessUpdateDocumentResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Tavus.Document.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Tavus.Document.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -353,9 +402,13 @@ partial void ProcessUpdateDocumentResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Tavus.Document.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Tavus.Document.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Tavus/Generated/Tavus.DocumentsClient.g.cs b/src/libs/Tavus/Generated/Tavus.DocumentsClient.g.cs
index df716bc..67e3b56 100644
--- a/src/libs/Tavus/Generated/Tavus.DocumentsClient.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.DocumentsClient.g.cs
@@ -72,10 +72,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::Tavus.AutoSDKClientOptions? options = null,
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Uri? baseUri,
+ global::System.Collections.Generic.List? authorizations,
+ global::Tavus.AutoSDKClientOptions? options,
bool disposeHttpClient = true)
{
diff --git a/src/libs/Tavus/Generated/Tavus.GuardrailsClient.CreateGuardrails.g.cs b/src/libs/Tavus/Generated/Tavus.GuardrailsClient.CreateGuardrails.g.cs
index 1f73b22..5af5a3f 100644
--- a/src/libs/Tavus/Generated/Tavus.GuardrailsClient.CreateGuardrails.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.GuardrailsClient.CreateGuardrails.g.cs
@@ -51,6 +51,29 @@ partial void ProcessCreateGuardrailsResponseContent(
///
public async global::System.Threading.Tasks.Task CreateGuardrailsAsync(
+ global::Tavus.CreateGuardrailsRequest request,
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await CreateGuardrailsAsResponseAsync(
+
+ request: request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Create Guardrails
+ /// Creates a new set of guardrails for a persona.
+ ///
+ ///
+ /// 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> CreateGuardrailsAsResponseAsync(
+
global::Tavus.CreateGuardrailsRequest request,
global::Tavus.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
@@ -85,6 +108,7 @@ partial void ProcessCreateGuardrailsResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Tavus.PathBuilder(
path: "/v2/guardrails",
baseUri: HttpClient.BaseAddress);
@@ -164,6 +188,8 @@ partial void ProcessCreateGuardrailsResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -174,6 +200,11 @@ partial void ProcessCreateGuardrailsResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -191,6 +222,8 @@ partial void ProcessCreateGuardrailsResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -200,8 +233,7 @@ partial void ProcessCreateGuardrailsResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -210,6 +242,11 @@ partial void ProcessCreateGuardrailsResponseContent(
__attempt < __maxAttempts &&
global::Tavus.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Tavus.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -226,14 +263,15 @@ partial void ProcessCreateGuardrailsResponseContent(
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::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -273,6 +311,8 @@ partial void ProcessCreateGuardrailsResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -293,6 +333,8 @@ partial void ProcessCreateGuardrailsResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
@@ -317,9 +359,13 @@ partial void ProcessCreateGuardrailsResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Tavus.Guardrails.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Tavus.Guardrails.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -347,9 +393,13 @@ partial void ProcessCreateGuardrailsResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Tavus.Guardrails.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Tavus.Guardrails.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Tavus/Generated/Tavus.GuardrailsClient.DeleteGuardrails.g.cs b/src/libs/Tavus/Generated/Tavus.GuardrailsClient.DeleteGuardrails.g.cs
index 0b001c2..9a34b24 100644
--- a/src/libs/Tavus/Generated/Tavus.GuardrailsClient.DeleteGuardrails.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.GuardrailsClient.DeleteGuardrails.g.cs
@@ -48,6 +48,25 @@ partial void ProcessDeleteGuardrailsResponse(
string guardrailsId,
global::Tavus.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await DeleteGuardrailsAsResponseAsync(
+ guardrailsId: guardrailsId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Delete Guardrails
+ /// Deletes a single set of guardrails.
+ ///
+ ///
+ /// 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 DeleteGuardrailsAsResponseAsync(
+ string guardrailsId,
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -77,6 +96,7 @@ partial void ProcessDeleteGuardrailsResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Tavus.PathBuilder(
path: $"/v2/guardrails/{guardrailsId}",
baseUri: HttpClient.BaseAddress);
@@ -150,6 +170,8 @@ partial void ProcessDeleteGuardrailsResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -160,6 +182,11 @@ partial void ProcessDeleteGuardrailsResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -177,6 +204,8 @@ partial void ProcessDeleteGuardrailsResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -186,8 +215,7 @@ partial void ProcessDeleteGuardrailsResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -196,6 +224,11 @@ partial void ProcessDeleteGuardrailsResponse(
__attempt < __maxAttempts &&
global::Tavus.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Tavus.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -212,14 +245,15 @@ partial void ProcessDeleteGuardrailsResponse(
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::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -259,6 +293,8 @@ partial void ProcessDeleteGuardrailsResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -279,6 +315,8 @@ partial void ProcessDeleteGuardrailsResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
@@ -299,6 +337,10 @@ partial void ProcessDeleteGuardrailsResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -320,6 +362,10 @@ partial void ProcessDeleteGuardrailsResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Tavus/Generated/Tavus.GuardrailsClient.GetGuardrails.g.cs b/src/libs/Tavus/Generated/Tavus.GuardrailsClient.GetGuardrails.g.cs
index 507ea8a..93cc4b7 100644
--- a/src/libs/Tavus/Generated/Tavus.GuardrailsClient.GetGuardrails.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.GuardrailsClient.GetGuardrails.g.cs
@@ -53,6 +53,27 @@ partial void ProcessGetGuardrailsResponseContent(
string guardrailsId,
global::Tavus.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GetGuardrailsAsResponseAsync(
+ guardrailsId: guardrailsId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Get Guardrails
+ /// Returns a single set of guardrails.
+ ///
+ ///
+ /// 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> GetGuardrailsAsResponseAsync(
+ string guardrailsId,
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -82,6 +103,7 @@ partial void ProcessGetGuardrailsResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Tavus.PathBuilder(
path: $"/v2/guardrails/{guardrailsId}",
baseUri: HttpClient.BaseAddress);
@@ -155,6 +177,8 @@ partial void ProcessGetGuardrailsResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -165,6 +189,11 @@ partial void ProcessGetGuardrailsResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -182,6 +211,8 @@ partial void ProcessGetGuardrailsResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -191,8 +222,7 @@ partial void ProcessGetGuardrailsResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -201,6 +231,11 @@ partial void ProcessGetGuardrailsResponseContent(
__attempt < __maxAttempts &&
global::Tavus.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Tavus.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -217,14 +252,15 @@ partial void ProcessGetGuardrailsResponseContent(
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::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -264,6 +300,8 @@ partial void ProcessGetGuardrailsResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -284,6 +322,8 @@ partial void ProcessGetGuardrailsResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
@@ -308,9 +348,13 @@ partial void ProcessGetGuardrailsResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Tavus.Guardrails.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Tavus.Guardrails.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -338,9 +382,13 @@ partial void ProcessGetGuardrailsResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Tavus.Guardrails.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Tavus.Guardrails.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Tavus/Generated/Tavus.GuardrailsClient.ListGuardrails.g.cs b/src/libs/Tavus/Generated/Tavus.GuardrailsClient.ListGuardrails.g.cs
index 5d62085..a969146 100644
--- a/src/libs/Tavus/Generated/Tavus.GuardrailsClient.ListGuardrails.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.GuardrailsClient.ListGuardrails.g.cs
@@ -49,6 +49,24 @@ partial void ProcessListGuardrailsResponseContent(
public async global::System.Threading.Tasks.Task ListGuardrailsAsync(
global::Tavus.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await ListGuardrailsAsResponseAsync(
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// List Guardrails
+ /// Returns a list of all guardrails.
+ ///
+ /// 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> ListGuardrailsAsResponseAsync(
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -77,6 +95,7 @@ partial void ProcessListGuardrailsResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Tavus.PathBuilder(
path: "/v2/guardrails",
baseUri: HttpClient.BaseAddress);
@@ -149,6 +168,8 @@ partial void ProcessListGuardrailsResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -159,6 +180,11 @@ partial void ProcessListGuardrailsResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -176,6 +202,8 @@ partial void ProcessListGuardrailsResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -185,8 +213,7 @@ partial void ProcessListGuardrailsResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -195,6 +222,11 @@ partial void ProcessListGuardrailsResponseContent(
__attempt < __maxAttempts &&
global::Tavus.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Tavus.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -211,14 +243,15 @@ partial void ProcessListGuardrailsResponseContent(
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::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -258,6 +291,8 @@ partial void ProcessListGuardrailsResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -278,6 +313,8 @@ partial void ProcessListGuardrailsResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
@@ -302,9 +339,13 @@ partial void ProcessListGuardrailsResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Tavus.ListGuardrailsResponse.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Tavus.ListGuardrailsResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -332,9 +373,13 @@ partial void ProcessListGuardrailsResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Tavus.ListGuardrailsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Tavus.ListGuardrailsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Tavus/Generated/Tavus.GuardrailsClient.PatchGuardrails.g.cs b/src/libs/Tavus/Generated/Tavus.GuardrailsClient.PatchGuardrails.g.cs
index 2951e3c..0d79d1b 100644
--- a/src/libs/Tavus/Generated/Tavus.GuardrailsClient.PatchGuardrails.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.GuardrailsClient.PatchGuardrails.g.cs
@@ -55,6 +55,32 @@ partial void ProcessPatchGuardrailsResponseContent(
public async global::System.Threading.Tasks.Task PatchGuardrailsAsync(
string guardrailsId,
+ global::System.Collections.Generic.IList request,
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await PatchGuardrailsAsResponseAsync(
+ guardrailsId: guardrailsId,
+
+ request: request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Patch Guardrails
+ /// Update guardrails using JSON Patch operations.
+ ///
+ ///
+ ///
+ /// 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> PatchGuardrailsAsResponseAsync(
+ string guardrailsId,
+
global::System.Collections.Generic.IList request,
global::Tavus.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
@@ -90,6 +116,7 @@ partial void ProcessPatchGuardrailsResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Tavus.PathBuilder(
path: $"/v2/guardrails/{guardrailsId}",
baseUri: HttpClient.BaseAddress);
@@ -170,6 +197,8 @@ partial void ProcessPatchGuardrailsResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -180,6 +209,11 @@ partial void ProcessPatchGuardrailsResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -197,6 +231,8 @@ partial void ProcessPatchGuardrailsResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -206,8 +242,7 @@ partial void ProcessPatchGuardrailsResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -216,6 +251,11 @@ partial void ProcessPatchGuardrailsResponseContent(
__attempt < __maxAttempts &&
global::Tavus.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Tavus.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -232,14 +272,15 @@ partial void ProcessPatchGuardrailsResponseContent(
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::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -279,6 +320,8 @@ partial void ProcessPatchGuardrailsResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -299,6 +342,8 @@ partial void ProcessPatchGuardrailsResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
@@ -323,9 +368,13 @@ partial void ProcessPatchGuardrailsResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Tavus.Guardrails.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Tavus.Guardrails.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -353,9 +402,13 @@ partial void ProcessPatchGuardrailsResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Tavus.Guardrails.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Tavus.Guardrails.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Tavus/Generated/Tavus.GuardrailsClient.g.cs b/src/libs/Tavus/Generated/Tavus.GuardrailsClient.g.cs
index 1958dbc..42b9d55 100644
--- a/src/libs/Tavus/Generated/Tavus.GuardrailsClient.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.GuardrailsClient.g.cs
@@ -72,10 +72,10 @@ public GuardrailsClient(
/// Client-wide request defaults such as headers, query parameters, retries, and timeout.
/// Dispose the HttpClient when the instance is disposed. True by default.
public GuardrailsClient(
- global::System.Net.Http.HttpClient? httpClient = null,
- global::System.Uri? baseUri = null,
- global::System.Collections.Generic.List? authorizations = null,
- global::Tavus.AutoSDKClientOptions? options = null,
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Uri? baseUri,
+ global::System.Collections.Generic.List? authorizations,
+ global::Tavus.AutoSDKClientOptions? options,
bool disposeHttpClient = true)
{
diff --git a/src/libs/Tavus/Generated/Tavus.IConversationsClient.CreateConversation.g.cs b/src/libs/Tavus/Generated/Tavus.IConversationsClient.CreateConversation.g.cs
index 37147a5..905aadc 100644
--- a/src/libs/Tavus/Generated/Tavus.IConversationsClient.CreateConversation.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.IConversationsClient.CreateConversation.g.cs
@@ -21,6 +21,19 @@ public partial interface IConversationsClient
/// Create Conversation
/// Start a real-time video conversation with your AI replica and persona. The response includes a conversation_url to join the call or embed it.
///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> CreateConversationAsResponseAsync(
+
+ global::Tavus.CreateConversationRequest request,
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Create Conversation
+ /// Start a real-time video conversation with your AI replica and persona. The response includes a conversation_url to join the call or embed it.
+ ///
///
/// The identifier of the persona to use.
///
diff --git a/src/libs/Tavus/Generated/Tavus.IConversationsClient.DeleteConversation.g.cs b/src/libs/Tavus/Generated/Tavus.IConversationsClient.DeleteConversation.g.cs
index 525231c..17e706c 100644
--- a/src/libs/Tavus/Generated/Tavus.IConversationsClient.DeleteConversation.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.IConversationsClient.DeleteConversation.g.cs
@@ -16,5 +16,17 @@ public partial interface IConversationsClient
string conversationId,
global::Tavus.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Delete Conversation
+ /// Deletes a single conversation.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task DeleteConversationAsResponseAsync(
+ string conversationId,
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
}
}
\ No newline at end of file
diff --git a/src/libs/Tavus/Generated/Tavus.IConversationsClient.EndConversation.g.cs b/src/libs/Tavus/Generated/Tavus.IConversationsClient.EndConversation.g.cs
index 0bfd4a4..4b711ad 100644
--- a/src/libs/Tavus/Generated/Tavus.IConversationsClient.EndConversation.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.IConversationsClient.EndConversation.g.cs
@@ -16,5 +16,17 @@ public partial interface IConversationsClient
string conversationId,
global::Tavus.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// End Conversation
+ /// Ends a single conversation.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task EndConversationAsResponseAsync(
+ string conversationId,
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
}
}
\ No newline at end of file
diff --git a/src/libs/Tavus/Generated/Tavus.IConversationsClient.GetConversation.g.cs b/src/libs/Tavus/Generated/Tavus.IConversationsClient.GetConversation.g.cs
index 20d3dd7..b82bd6a 100644
--- a/src/libs/Tavus/Generated/Tavus.IConversationsClient.GetConversation.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.IConversationsClient.GetConversation.g.cs
@@ -18,5 +18,19 @@ public partial interface IConversationsClient
bool? verbose = default,
global::Tavus.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Get Conversation
+ /// Returns a single conversation. Append ?verbose=true for additional event data including transcript and perception analysis.
+ ///
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> GetConversationAsResponseAsync(
+ string conversationId,
+ bool? verbose = default,
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
}
}
\ No newline at end of file
diff --git a/src/libs/Tavus/Generated/Tavus.IConversationsClient.ListConversations.g.cs b/src/libs/Tavus/Generated/Tavus.IConversationsClient.ListConversations.g.cs
index 3d9b9d3..ffc24cf 100644
--- a/src/libs/Tavus/Generated/Tavus.IConversationsClient.ListConversations.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.IConversationsClient.ListConversations.g.cs
@@ -14,5 +14,15 @@ public partial interface IConversationsClient
global::System.Threading.Tasks.Task ListConversationsAsync(
global::Tavus.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// List Conversations
+ /// Returns a list of all conversations.
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> ListConversationsAsResponseAsync(
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
}
}
\ No newline at end of file
diff --git a/src/libs/Tavus/Generated/Tavus.IDocumentsClient.CreateDocument.g.cs b/src/libs/Tavus/Generated/Tavus.IDocumentsClient.CreateDocument.g.cs
index 51d2935..de57e8b 100644
--- a/src/libs/Tavus/Generated/Tavus.IDocumentsClient.CreateDocument.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.IDocumentsClient.CreateDocument.g.cs
@@ -21,6 +21,19 @@ public partial interface IDocumentsClient
/// Create Document
/// Upload documents to your knowledge base for personas to reference. Supports .pdf, .txt, .docx, .doc, .png, .jpg, .pptx, .csv, .xlsx and URLs.
///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> CreateDocumentAsResponseAsync(
+
+ global::Tavus.CreateDocumentRequest request,
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Create Document
+ /// Upload documents to your knowledge base for personas to reference. Supports .pdf, .txt, .docx, .doc, .png, .jpg, .pptx, .csv, .xlsx and URLs.
+ ///
///
///
///
diff --git a/src/libs/Tavus/Generated/Tavus.IDocumentsClient.DeleteDocument.g.cs b/src/libs/Tavus/Generated/Tavus.IDocumentsClient.DeleteDocument.g.cs
index 5f949b8..3b3d054 100644
--- a/src/libs/Tavus/Generated/Tavus.IDocumentsClient.DeleteDocument.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.IDocumentsClient.DeleteDocument.g.cs
@@ -16,5 +16,17 @@ public partial interface IDocumentsClient
string documentId,
global::Tavus.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Delete Document
+ /// Delete a document.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task DeleteDocumentAsResponseAsync(
+ string documentId,
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
}
}
\ No newline at end of file
diff --git a/src/libs/Tavus/Generated/Tavus.IDocumentsClient.GetDocument.g.cs b/src/libs/Tavus/Generated/Tavus.IDocumentsClient.GetDocument.g.cs
index a2bd975..fa91727 100644
--- a/src/libs/Tavus/Generated/Tavus.IDocumentsClient.GetDocument.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.IDocumentsClient.GetDocument.g.cs
@@ -16,5 +16,17 @@ public partial interface IDocumentsClient
string documentId,
global::Tavus.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Get Document
+ /// Retrieve a specific document.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> GetDocumentAsResponseAsync(
+ string documentId,
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
}
}
\ No newline at end of file
diff --git a/src/libs/Tavus/Generated/Tavus.IDocumentsClient.ListDocuments.g.cs b/src/libs/Tavus/Generated/Tavus.IDocumentsClient.ListDocuments.g.cs
index 0f64761..da568ed 100644
--- a/src/libs/Tavus/Generated/Tavus.IDocumentsClient.ListDocuments.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.IDocumentsClient.ListDocuments.g.cs
@@ -20,5 +20,21 @@ public partial interface IDocumentsClient
string? tags = default,
global::Tavus.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// List Documents
+ /// Retrieve a list of documents with optional filtering and pagination.
+ ///
+ ///
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> ListDocumentsAsResponseAsync(
+ int? page = default,
+ int? pageSize = default,
+ string? tags = default,
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
}
}
\ No newline at end of file
diff --git a/src/libs/Tavus/Generated/Tavus.IDocumentsClient.RecrawlDocument.g.cs b/src/libs/Tavus/Generated/Tavus.IDocumentsClient.RecrawlDocument.g.cs
index 1b8a950..4b9669f 100644
--- a/src/libs/Tavus/Generated/Tavus.IDocumentsClient.RecrawlDocument.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.IDocumentsClient.RecrawlDocument.g.cs
@@ -24,6 +24,21 @@ public partial interface IDocumentsClient
/// Trigger a recrawl of a website document to fetch fresh content.
///
///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> RecrawlDocumentAsResponseAsync(
+ string documentId,
+
+ global::Tavus.RecrawlDocumentRequest request,
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Recrawl Document
+ /// Trigger a recrawl of a website document to fetch fresh content.
+ ///
+ ///
///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
diff --git a/src/libs/Tavus/Generated/Tavus.IDocumentsClient.UpdateDocument.g.cs b/src/libs/Tavus/Generated/Tavus.IDocumentsClient.UpdateDocument.g.cs
index 2713dfc..98ba40e 100644
--- a/src/libs/Tavus/Generated/Tavus.IDocumentsClient.UpdateDocument.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.IDocumentsClient.UpdateDocument.g.cs
@@ -24,6 +24,21 @@ public partial interface IDocumentsClient
/// Update document metadata.
///
///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> UpdateDocumentAsResponseAsync(
+ string documentId,
+
+ global::Tavus.UpdateDocumentRequest request,
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Update Document
+ /// Update document metadata.
+ ///
+ ///
///
///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
diff --git a/src/libs/Tavus/Generated/Tavus.IGuardrailsClient.CreateGuardrails.g.cs b/src/libs/Tavus/Generated/Tavus.IGuardrailsClient.CreateGuardrails.g.cs
index c72e63c..7283e65 100644
--- a/src/libs/Tavus/Generated/Tavus.IGuardrailsClient.CreateGuardrails.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.IGuardrailsClient.CreateGuardrails.g.cs
@@ -21,6 +21,19 @@ public partial interface IGuardrailsClient
/// Create Guardrails
/// Creates a new set of guardrails for a persona.
///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> CreateGuardrailsAsResponseAsync(
+
+ global::Tavus.CreateGuardrailsRequest request,
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Create Guardrails
+ /// Creates a new set of guardrails for a persona.
+ ///
///
///
///
diff --git a/src/libs/Tavus/Generated/Tavus.IGuardrailsClient.DeleteGuardrails.g.cs b/src/libs/Tavus/Generated/Tavus.IGuardrailsClient.DeleteGuardrails.g.cs
index e29a74c..9b2b9e1 100644
--- a/src/libs/Tavus/Generated/Tavus.IGuardrailsClient.DeleteGuardrails.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.IGuardrailsClient.DeleteGuardrails.g.cs
@@ -16,5 +16,17 @@ public partial interface IGuardrailsClient
string guardrailsId,
global::Tavus.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Delete Guardrails
+ /// Deletes a single set of guardrails.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task DeleteGuardrailsAsResponseAsync(
+ string guardrailsId,
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
}
}
\ No newline at end of file
diff --git a/src/libs/Tavus/Generated/Tavus.IGuardrailsClient.GetGuardrails.g.cs b/src/libs/Tavus/Generated/Tavus.IGuardrailsClient.GetGuardrails.g.cs
index f06da36..208525d 100644
--- a/src/libs/Tavus/Generated/Tavus.IGuardrailsClient.GetGuardrails.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.IGuardrailsClient.GetGuardrails.g.cs
@@ -16,5 +16,17 @@ public partial interface IGuardrailsClient
string guardrailsId,
global::Tavus.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Get Guardrails
+ /// Returns a single set of guardrails.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> GetGuardrailsAsResponseAsync(
+ string guardrailsId,
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
}
}
\ No newline at end of file
diff --git a/src/libs/Tavus/Generated/Tavus.IGuardrailsClient.ListGuardrails.g.cs b/src/libs/Tavus/Generated/Tavus.IGuardrailsClient.ListGuardrails.g.cs
index 820101c..f7c4202 100644
--- a/src/libs/Tavus/Generated/Tavus.IGuardrailsClient.ListGuardrails.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.IGuardrailsClient.ListGuardrails.g.cs
@@ -14,5 +14,15 @@ public partial interface IGuardrailsClient
global::System.Threading.Tasks.Task ListGuardrailsAsync(
global::Tavus.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// List Guardrails
+ /// Returns a list of all guardrails.
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> ListGuardrailsAsResponseAsync(
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
}
}
\ No newline at end of file
diff --git a/src/libs/Tavus/Generated/Tavus.IGuardrailsClient.PatchGuardrails.g.cs b/src/libs/Tavus/Generated/Tavus.IGuardrailsClient.PatchGuardrails.g.cs
index 795b1e8..cf3f070 100644
--- a/src/libs/Tavus/Generated/Tavus.IGuardrailsClient.PatchGuardrails.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.IGuardrailsClient.PatchGuardrails.g.cs
@@ -16,6 +16,21 @@ public partial interface IGuardrailsClient
global::System.Threading.Tasks.Task PatchGuardrailsAsync(
string guardrailsId,
+ global::System.Collections.Generic.IList request,
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Patch Guardrails
+ /// Update guardrails using JSON Patch operations.
+ ///
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> PatchGuardrailsAsResponseAsync(
+ string guardrailsId,
+
global::System.Collections.Generic.IList request,
global::Tavus.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
diff --git a/src/libs/Tavus/Generated/Tavus.IMemoriesClient.DeleteMemory.g.cs b/src/libs/Tavus/Generated/Tavus.IMemoriesClient.DeleteMemory.g.cs
index a2ac619..571f341 100644
--- a/src/libs/Tavus/Generated/Tavus.IMemoriesClient.DeleteMemory.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.IMemoriesClient.DeleteMemory.g.cs
@@ -18,5 +18,19 @@ public partial interface IMemoriesClient
string memoryId,
global::Tavus.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Delete Memory
+ /// Delete a single memory from a memory store.
+ ///
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task DeleteMemoryAsResponseAsync(
+ string memoryStore,
+ string memoryId,
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
}
}
\ No newline at end of file
diff --git a/src/libs/Tavus/Generated/Tavus.IObjectivesClient.CreateObjectives.g.cs b/src/libs/Tavus/Generated/Tavus.IObjectivesClient.CreateObjectives.g.cs
index 75956af..70e8d56 100644
--- a/src/libs/Tavus/Generated/Tavus.IObjectivesClient.CreateObjectives.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.IObjectivesClient.CreateObjectives.g.cs
@@ -21,6 +21,19 @@ public partial interface IObjectivesClient
/// Create Objectives
/// Creates a new objective for a persona.
///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> CreateObjectivesAsResponseAsync(
+
+ global::Tavus.CreateObjectivesRequest request,
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Create Objectives
+ /// Creates a new objective for a persona.
+ ///
///
///
///
diff --git a/src/libs/Tavus/Generated/Tavus.IObjectivesClient.DeleteObjectives.g.cs b/src/libs/Tavus/Generated/Tavus.IObjectivesClient.DeleteObjectives.g.cs
index 4a098e9..daa5565 100644
--- a/src/libs/Tavus/Generated/Tavus.IObjectivesClient.DeleteObjectives.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.IObjectivesClient.DeleteObjectives.g.cs
@@ -16,5 +16,17 @@ public partial interface IObjectivesClient
string objectivesId,
global::Tavus.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Delete Objective
+ /// Deletes a single objective.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task DeleteObjectivesAsResponseAsync(
+ string objectivesId,
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
}
}
\ No newline at end of file
diff --git a/src/libs/Tavus/Generated/Tavus.IObjectivesClient.GetObjectives.g.cs b/src/libs/Tavus/Generated/Tavus.IObjectivesClient.GetObjectives.g.cs
index 483d8e2..7d766ad 100644
--- a/src/libs/Tavus/Generated/Tavus.IObjectivesClient.GetObjectives.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.IObjectivesClient.GetObjectives.g.cs
@@ -16,5 +16,17 @@ public partial interface IObjectivesClient
string objectivesId,
global::Tavus.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Get Objective
+ /// Returns a single objective.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> GetObjectivesAsResponseAsync(
+ string objectivesId,
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
}
}
\ No newline at end of file
diff --git a/src/libs/Tavus/Generated/Tavus.IObjectivesClient.ListObjectives.g.cs b/src/libs/Tavus/Generated/Tavus.IObjectivesClient.ListObjectives.g.cs
index 9fe576f..bdab5e1 100644
--- a/src/libs/Tavus/Generated/Tavus.IObjectivesClient.ListObjectives.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.IObjectivesClient.ListObjectives.g.cs
@@ -14,5 +14,15 @@ public partial interface IObjectivesClient
global::System.Threading.Tasks.Task ListObjectivesAsync(
global::Tavus.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// List Objectives
+ /// Returns a list of all objectives.
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> ListObjectivesAsResponseAsync(
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
}
}
\ No newline at end of file
diff --git a/src/libs/Tavus/Generated/Tavus.IObjectivesClient.PatchObjectives.g.cs b/src/libs/Tavus/Generated/Tavus.IObjectivesClient.PatchObjectives.g.cs
index 872cc00..ed02dd3 100644
--- a/src/libs/Tavus/Generated/Tavus.IObjectivesClient.PatchObjectives.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.IObjectivesClient.PatchObjectives.g.cs
@@ -16,6 +16,21 @@ public partial interface IObjectivesClient
global::System.Threading.Tasks.Task PatchObjectivesAsync(
string objectivesId,
+ global::System.Collections.Generic.IList request,
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Patch Objective
+ /// Update an objective using JSON Patch operations.
+ ///
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> PatchObjectivesAsResponseAsync(
+ string objectivesId,
+
global::System.Collections.Generic.IList request,
global::Tavus.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
diff --git a/src/libs/Tavus/Generated/Tavus.IPersonasClient.CreatePersona.g.cs b/src/libs/Tavus/Generated/Tavus.IPersonasClient.CreatePersona.g.cs
index 1633583..7d6f759 100644
--- a/src/libs/Tavus/Generated/Tavus.IPersonasClient.CreatePersona.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.IPersonasClient.CreatePersona.g.cs
@@ -21,6 +21,19 @@ public partial interface IPersonasClient
/// Create Persona
/// Create and customize a persona's behavior and capabilities for CVI.
///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> CreatePersonaAsResponseAsync(
+
+ global::Tavus.CreatePersonaRequest request,
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Create Persona
+ /// Create and customize a persona's behavior and capabilities for CVI.
+ ///
///
///
/// System prompt defining persona behavior. Required for full pipeline mode.
diff --git a/src/libs/Tavus/Generated/Tavus.IPersonasClient.DeletePersona.g.cs b/src/libs/Tavus/Generated/Tavus.IPersonasClient.DeletePersona.g.cs
index 223db89..2b10417 100644
--- a/src/libs/Tavus/Generated/Tavus.IPersonasClient.DeletePersona.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.IPersonasClient.DeletePersona.g.cs
@@ -16,5 +16,17 @@ public partial interface IPersonasClient
string personaId,
global::Tavus.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Delete Persona
+ /// Deletes a single persona.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task DeletePersonaAsResponseAsync(
+ string personaId,
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
}
}
\ No newline at end of file
diff --git a/src/libs/Tavus/Generated/Tavus.IPersonasClient.GetPersona.g.cs b/src/libs/Tavus/Generated/Tavus.IPersonasClient.GetPersona.g.cs
index 123af2e..b9a92b1 100644
--- a/src/libs/Tavus/Generated/Tavus.IPersonasClient.GetPersona.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.IPersonasClient.GetPersona.g.cs
@@ -16,5 +16,17 @@ public partial interface IPersonasClient
string personaId,
global::Tavus.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Get Persona
+ /// Returns a single persona.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> GetPersonaAsResponseAsync(
+ string personaId,
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
}
}
\ No newline at end of file
diff --git a/src/libs/Tavus/Generated/Tavus.IPersonasClient.ListPersonas.g.cs b/src/libs/Tavus/Generated/Tavus.IPersonasClient.ListPersonas.g.cs
index 8f731d4..d6285b3 100644
--- a/src/libs/Tavus/Generated/Tavus.IPersonasClient.ListPersonas.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.IPersonasClient.ListPersonas.g.cs
@@ -14,5 +14,15 @@ public partial interface IPersonasClient
global::System.Threading.Tasks.Task ListPersonasAsync(
global::Tavus.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// List Personas
+ /// Returns a list of all personas.
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> ListPersonasAsResponseAsync(
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
}
}
\ No newline at end of file
diff --git a/src/libs/Tavus/Generated/Tavus.IPersonasClient.PatchPersona.g.cs b/src/libs/Tavus/Generated/Tavus.IPersonasClient.PatchPersona.g.cs
index 46134aa..35e8e7c 100644
--- a/src/libs/Tavus/Generated/Tavus.IPersonasClient.PatchPersona.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.IPersonasClient.PatchPersona.g.cs
@@ -16,6 +16,21 @@ public partial interface IPersonasClient
global::System.Threading.Tasks.Task PatchPersonaAsync(
string personaId,
+ global::System.Collections.Generic.IList request,
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Patch Persona
+ /// Updates a persona using JSON Patch (RFC 6902).
+ ///
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> PatchPersonaAsResponseAsync(
+ string personaId,
+
global::System.Collections.Generic.IList request,
global::Tavus.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
diff --git a/src/libs/Tavus/Generated/Tavus.IReplicasClient.CreateReplica.g.cs b/src/libs/Tavus/Generated/Tavus.IReplicasClient.CreateReplica.g.cs
index bef4247..0ab4b7e 100644
--- a/src/libs/Tavus/Generated/Tavus.IReplicasClient.CreateReplica.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.IReplicasClient.CreateReplica.g.cs
@@ -21,6 +21,19 @@ public partial interface IReplicasClient
/// Create Replica
/// Create a new replica using the latest phoenix-4 model.
///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> CreateReplicaAsResponseAsync(
+
+ global::Tavus.CreateReplicaRequest request,
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Create Replica
+ /// Create a new replica using the latest phoenix-4 model.
+ ///
///
/// Publicly accessible download link to the training video.
///
diff --git a/src/libs/Tavus/Generated/Tavus.IReplicasClient.DeleteReplica.g.cs b/src/libs/Tavus/Generated/Tavus.IReplicasClient.DeleteReplica.g.cs
index bfbbf93..7c4d56f 100644
--- a/src/libs/Tavus/Generated/Tavus.IReplicasClient.DeleteReplica.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.IReplicasClient.DeleteReplica.g.cs
@@ -16,5 +16,17 @@ public partial interface IReplicasClient
string replicaId,
global::Tavus.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Delete Replica
+ /// Deletes a replica.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task DeleteReplicaAsResponseAsync(
+ string replicaId,
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
}
}
\ No newline at end of file
diff --git a/src/libs/Tavus/Generated/Tavus.IReplicasClient.GetReplica.g.cs b/src/libs/Tavus/Generated/Tavus.IReplicasClient.GetReplica.g.cs
index 8160827..09044ba 100644
--- a/src/libs/Tavus/Generated/Tavus.IReplicasClient.GetReplica.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.IReplicasClient.GetReplica.g.cs
@@ -16,5 +16,17 @@ public partial interface IReplicasClient
string replicaId,
global::Tavus.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Get Replica
+ /// Returns a single replica with training progress.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> GetReplicaAsResponseAsync(
+ string replicaId,
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
}
}
\ No newline at end of file
diff --git a/src/libs/Tavus/Generated/Tavus.IReplicasClient.ListReplicas.g.cs b/src/libs/Tavus/Generated/Tavus.IReplicasClient.ListReplicas.g.cs
index 6d229d3..f3aa78c 100644
--- a/src/libs/Tavus/Generated/Tavus.IReplicasClient.ListReplicas.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.IReplicasClient.ListReplicas.g.cs
@@ -14,5 +14,15 @@ public partial interface IReplicasClient
global::System.Threading.Tasks.Task ListReplicasAsync(
global::Tavus.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// List Replicas
+ /// Returns a list of all replicas.
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> ListReplicasAsResponseAsync(
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
}
}
\ No newline at end of file
diff --git a/src/libs/Tavus/Generated/Tavus.IReplicasClient.RenameReplica.g.cs b/src/libs/Tavus/Generated/Tavus.IReplicasClient.RenameReplica.g.cs
index 73ab5f4..d24f8da 100644
--- a/src/libs/Tavus/Generated/Tavus.IReplicasClient.RenameReplica.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.IReplicasClient.RenameReplica.g.cs
@@ -24,6 +24,21 @@ public partial interface IReplicasClient
/// Renames a single replica.
///
///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> RenameReplicaAsResponseAsync(
+ string replicaId,
+
+ global::Tavus.RenameReplicaRequest request,
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Rename Replica
+ /// Renames a single replica.
+ ///
+ ///
///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
diff --git a/src/libs/Tavus/Generated/Tavus.IVideosClient.DeleteVideo.g.cs b/src/libs/Tavus/Generated/Tavus.IVideosClient.DeleteVideo.g.cs
index 7246764..201f063 100644
--- a/src/libs/Tavus/Generated/Tavus.IVideosClient.DeleteVideo.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.IVideosClient.DeleteVideo.g.cs
@@ -16,5 +16,17 @@ public partial interface IVideosClient
string videoId,
global::Tavus.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Delete Video
+ /// Deletes a single video.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task DeleteVideoAsResponseAsync(
+ string videoId,
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
}
}
\ No newline at end of file
diff --git a/src/libs/Tavus/Generated/Tavus.IVideosClient.GenerateVideo.g.cs b/src/libs/Tavus/Generated/Tavus.IVideosClient.GenerateVideo.g.cs
index cae24ea..27d8a08 100644
--- a/src/libs/Tavus/Generated/Tavus.IVideosClient.GenerateVideo.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.IVideosClient.GenerateVideo.g.cs
@@ -21,6 +21,19 @@ public partial interface IVideosClient
/// Generate Video
/// Generates a new video using a Replica and either a script or an audio file.
///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> GenerateVideoAsResponseAsync(
+
+ global::Tavus.GenerateVideoRequest request,
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Generate Video
+ /// Generates a new video using a Replica and either a script or an audio file.
+ ///
///
/// The replica to use for the video.
///
diff --git a/src/libs/Tavus/Generated/Tavus.IVideosClient.GetVideo.g.cs b/src/libs/Tavus/Generated/Tavus.IVideosClient.GetVideo.g.cs
index 6a51887..7a48c09 100644
--- a/src/libs/Tavus/Generated/Tavus.IVideosClient.GetVideo.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.IVideosClient.GetVideo.g.cs
@@ -16,5 +16,17 @@ public partial interface IVideosClient
string videoId,
global::Tavus.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Get Video
+ /// Returns a single video. If ready, includes download_url, stream_url, and hosted_url.
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> GetVideoAsResponseAsync(
+ string videoId,
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
}
}
\ No newline at end of file
diff --git a/src/libs/Tavus/Generated/Tavus.IVideosClient.ListVideos.g.cs b/src/libs/Tavus/Generated/Tavus.IVideosClient.ListVideos.g.cs
index 1c01bcf..512b8c2 100644
--- a/src/libs/Tavus/Generated/Tavus.IVideosClient.ListVideos.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.IVideosClient.ListVideos.g.cs
@@ -14,5 +14,15 @@ public partial interface IVideosClient
global::System.Threading.Tasks.Task ListVideosAsync(
global::Tavus.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// List Videos
+ /// Returns a list of all videos.
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> ListVideosAsResponseAsync(
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
}
}
\ No newline at end of file
diff --git a/src/libs/Tavus/Generated/Tavus.IVideosClient.RenameVideo.g.cs b/src/libs/Tavus/Generated/Tavus.IVideosClient.RenameVideo.g.cs
index 09a9f68..dadd7ea 100644
--- a/src/libs/Tavus/Generated/Tavus.IVideosClient.RenameVideo.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.IVideosClient.RenameVideo.g.cs
@@ -24,6 +24,21 @@ public partial interface IVideosClient
/// Renames a single video.
///
///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> RenameVideoAsResponseAsync(
+ string videoId,
+
+ global::Tavus.RenameVideoRequest request,
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Rename Video
+ /// Renames a single video.
+ ///
+ ///
///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
diff --git a/src/libs/Tavus/Generated/Tavus.MemoriesClient.DeleteMemory.g.cs b/src/libs/Tavus/Generated/Tavus.MemoriesClient.DeleteMemory.g.cs
index 36bd3cb..6b32115 100644
--- a/src/libs/Tavus/Generated/Tavus.MemoriesClient.DeleteMemory.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.MemoriesClient.DeleteMemory.g.cs
@@ -52,6 +52,28 @@ partial void ProcessDeleteMemoryResponse(
string memoryId,
global::Tavus.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await DeleteMemoryAsResponseAsync(
+ memoryStore: memoryStore,
+ memoryId: memoryId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Delete Memory
+ /// Delete a single memory from a memory store.
+ ///
+ ///
+ ///
+ /// 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 DeleteMemoryAsResponseAsync(
+ string memoryStore,
+ string memoryId,
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -82,6 +104,7 @@ partial void ProcessDeleteMemoryResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Tavus.PathBuilder(
path: $"/v2/memories/{memoryStore}/{memoryId}",
baseUri: HttpClient.BaseAddress);
@@ -156,6 +179,8 @@ partial void ProcessDeleteMemoryResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -166,6 +191,11 @@ partial void ProcessDeleteMemoryResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -183,6 +213,8 @@ partial void ProcessDeleteMemoryResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -192,8 +224,7 @@ partial void ProcessDeleteMemoryResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -202,6 +233,11 @@ partial void ProcessDeleteMemoryResponse(
__attempt < __maxAttempts &&
global::Tavus.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Tavus.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -218,14 +254,15 @@ partial void ProcessDeleteMemoryResponse(
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::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -265,6 +302,8 @@ partial void ProcessDeleteMemoryResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -285,6 +324,8 @@ partial void ProcessDeleteMemoryResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
@@ -305,6 +346,10 @@ partial void ProcessDeleteMemoryResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -326,6 +371,10 @@ partial void ProcessDeleteMemoryResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Tavus/Generated/Tavus.MemoriesClient.g.cs b/src/libs/Tavus/Generated/Tavus.MemoriesClient.g.cs
index 01b1557..383a4e8 100644
--- a/src/libs/Tavus/Generated/Tavus.MemoriesClient.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.MemoriesClient.g.cs
@@ -72,10 +72,10 @@ public MemoriesClient(
/// Client-wide request defaults such as headers, query parameters, retries, and timeout.
/// Dispose the HttpClient when the instance is disposed. True by default.
public MemoriesClient(
- global::System.Net.Http.HttpClient? httpClient = null,
- global::System.Uri? baseUri = null,
- global::System.Collections.Generic.List? authorizations = null,
- global::Tavus.AutoSDKClientOptions? options = null,
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Uri? baseUri,
+ global::System.Collections.Generic.List? authorizations,
+ global::Tavus.AutoSDKClientOptions? options,
bool disposeHttpClient = true)
{
diff --git a/src/libs/Tavus/Generated/Tavus.ObjectivesClient.CreateObjectives.g.cs b/src/libs/Tavus/Generated/Tavus.ObjectivesClient.CreateObjectives.g.cs
index fa3cfd2..69155af 100644
--- a/src/libs/Tavus/Generated/Tavus.ObjectivesClient.CreateObjectives.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.ObjectivesClient.CreateObjectives.g.cs
@@ -51,6 +51,29 @@ partial void ProcessCreateObjectivesResponseContent(
///
public async global::System.Threading.Tasks.Task CreateObjectivesAsync(
+ global::Tavus.CreateObjectivesRequest request,
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await CreateObjectivesAsResponseAsync(
+
+ request: request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Create Objectives
+ /// Creates a new objective for a persona.
+ ///
+ ///
+ /// 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> CreateObjectivesAsResponseAsync(
+
global::Tavus.CreateObjectivesRequest request,
global::Tavus.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
@@ -85,6 +108,7 @@ partial void ProcessCreateObjectivesResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Tavus.PathBuilder(
path: "/v2/objectives",
baseUri: HttpClient.BaseAddress);
@@ -164,6 +188,8 @@ partial void ProcessCreateObjectivesResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -174,6 +200,11 @@ partial void ProcessCreateObjectivesResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -191,6 +222,8 @@ partial void ProcessCreateObjectivesResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -200,8 +233,7 @@ partial void ProcessCreateObjectivesResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -210,6 +242,11 @@ partial void ProcessCreateObjectivesResponseContent(
__attempt < __maxAttempts &&
global::Tavus.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Tavus.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -226,14 +263,15 @@ partial void ProcessCreateObjectivesResponseContent(
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::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -273,6 +311,8 @@ partial void ProcessCreateObjectivesResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -293,6 +333,8 @@ partial void ProcessCreateObjectivesResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
@@ -317,9 +359,13 @@ partial void ProcessCreateObjectivesResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Tavus.Objectives.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Tavus.Objectives.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -347,9 +393,13 @@ partial void ProcessCreateObjectivesResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Tavus.Objectives.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Tavus.Objectives.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Tavus/Generated/Tavus.ObjectivesClient.DeleteObjectives.g.cs b/src/libs/Tavus/Generated/Tavus.ObjectivesClient.DeleteObjectives.g.cs
index 82d2bd4..e2f4909 100644
--- a/src/libs/Tavus/Generated/Tavus.ObjectivesClient.DeleteObjectives.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.ObjectivesClient.DeleteObjectives.g.cs
@@ -48,6 +48,25 @@ partial void ProcessDeleteObjectivesResponse(
string objectivesId,
global::Tavus.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await DeleteObjectivesAsResponseAsync(
+ objectivesId: objectivesId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Delete Objective
+ /// Deletes a single objective.
+ ///
+ ///
+ /// 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 DeleteObjectivesAsResponseAsync(
+ string objectivesId,
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -77,6 +96,7 @@ partial void ProcessDeleteObjectivesResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Tavus.PathBuilder(
path: $"/v2/objectives/{objectivesId}",
baseUri: HttpClient.BaseAddress);
@@ -150,6 +170,8 @@ partial void ProcessDeleteObjectivesResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -160,6 +182,11 @@ partial void ProcessDeleteObjectivesResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -177,6 +204,8 @@ partial void ProcessDeleteObjectivesResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -186,8 +215,7 @@ partial void ProcessDeleteObjectivesResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -196,6 +224,11 @@ partial void ProcessDeleteObjectivesResponse(
__attempt < __maxAttempts &&
global::Tavus.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Tavus.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -212,14 +245,15 @@ partial void ProcessDeleteObjectivesResponse(
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::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -259,6 +293,8 @@ partial void ProcessDeleteObjectivesResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -279,6 +315,8 @@ partial void ProcessDeleteObjectivesResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
@@ -299,6 +337,10 @@ partial void ProcessDeleteObjectivesResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -320,6 +362,10 @@ partial void ProcessDeleteObjectivesResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Tavus/Generated/Tavus.ObjectivesClient.GetObjectives.g.cs b/src/libs/Tavus/Generated/Tavus.ObjectivesClient.GetObjectives.g.cs
index 2445d20..699ccc7 100644
--- a/src/libs/Tavus/Generated/Tavus.ObjectivesClient.GetObjectives.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.ObjectivesClient.GetObjectives.g.cs
@@ -53,6 +53,27 @@ partial void ProcessGetObjectivesResponseContent(
string objectivesId,
global::Tavus.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GetObjectivesAsResponseAsync(
+ objectivesId: objectivesId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Get Objective
+ /// Returns a single objective.
+ ///
+ ///
+ /// 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> GetObjectivesAsResponseAsync(
+ string objectivesId,
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -82,6 +103,7 @@ partial void ProcessGetObjectivesResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Tavus.PathBuilder(
path: $"/v2/objectives/{objectivesId}",
baseUri: HttpClient.BaseAddress);
@@ -155,6 +177,8 @@ partial void ProcessGetObjectivesResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -165,6 +189,11 @@ partial void ProcessGetObjectivesResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -182,6 +211,8 @@ partial void ProcessGetObjectivesResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -191,8 +222,7 @@ partial void ProcessGetObjectivesResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -201,6 +231,11 @@ partial void ProcessGetObjectivesResponseContent(
__attempt < __maxAttempts &&
global::Tavus.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Tavus.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -217,14 +252,15 @@ partial void ProcessGetObjectivesResponseContent(
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::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -264,6 +300,8 @@ partial void ProcessGetObjectivesResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -284,6 +322,8 @@ partial void ProcessGetObjectivesResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
@@ -308,9 +348,13 @@ partial void ProcessGetObjectivesResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Tavus.Objectives.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Tavus.Objectives.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -338,9 +382,13 @@ partial void ProcessGetObjectivesResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Tavus.Objectives.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Tavus.Objectives.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Tavus/Generated/Tavus.ObjectivesClient.ListObjectives.g.cs b/src/libs/Tavus/Generated/Tavus.ObjectivesClient.ListObjectives.g.cs
index 1a46a6f..c73e55f 100644
--- a/src/libs/Tavus/Generated/Tavus.ObjectivesClient.ListObjectives.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.ObjectivesClient.ListObjectives.g.cs
@@ -49,6 +49,24 @@ partial void ProcessListObjectivesResponseContent(
public async global::System.Threading.Tasks.Task ListObjectivesAsync(
global::Tavus.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await ListObjectivesAsResponseAsync(
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// List Objectives
+ /// Returns a list of all objectives.
+ ///
+ /// 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> ListObjectivesAsResponseAsync(
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -77,6 +95,7 @@ partial void ProcessListObjectivesResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Tavus.PathBuilder(
path: "/v2/objectives",
baseUri: HttpClient.BaseAddress);
@@ -149,6 +168,8 @@ partial void ProcessListObjectivesResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -159,6 +180,11 @@ partial void ProcessListObjectivesResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -176,6 +202,8 @@ partial void ProcessListObjectivesResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -185,8 +213,7 @@ partial void ProcessListObjectivesResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -195,6 +222,11 @@ partial void ProcessListObjectivesResponseContent(
__attempt < __maxAttempts &&
global::Tavus.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Tavus.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -211,14 +243,15 @@ partial void ProcessListObjectivesResponseContent(
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::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -258,6 +291,8 @@ partial void ProcessListObjectivesResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -278,6 +313,8 @@ partial void ProcessListObjectivesResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
@@ -302,9 +339,13 @@ partial void ProcessListObjectivesResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Tavus.ListObjectivesResponse.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Tavus.ListObjectivesResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -332,9 +373,13 @@ partial void ProcessListObjectivesResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Tavus.ListObjectivesResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Tavus.ListObjectivesResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Tavus/Generated/Tavus.ObjectivesClient.PatchObjectives.g.cs b/src/libs/Tavus/Generated/Tavus.ObjectivesClient.PatchObjectives.g.cs
index 5376e50..9b3bde9 100644
--- a/src/libs/Tavus/Generated/Tavus.ObjectivesClient.PatchObjectives.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.ObjectivesClient.PatchObjectives.g.cs
@@ -55,6 +55,32 @@ partial void ProcessPatchObjectivesResponseContent(
public async global::System.Threading.Tasks.Task PatchObjectivesAsync(
string objectivesId,
+ global::System.Collections.Generic.IList request,
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await PatchObjectivesAsResponseAsync(
+ objectivesId: objectivesId,
+
+ request: request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Patch Objective
+ /// Update an objective using JSON Patch operations.
+ ///
+ ///
+ ///
+ /// 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> PatchObjectivesAsResponseAsync(
+ string objectivesId,
+
global::System.Collections.Generic.IList request,
global::Tavus.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
@@ -90,6 +116,7 @@ partial void ProcessPatchObjectivesResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Tavus.PathBuilder(
path: $"/v2/objectives/{objectivesId}",
baseUri: HttpClient.BaseAddress);
@@ -170,6 +197,8 @@ partial void ProcessPatchObjectivesResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -180,6 +209,11 @@ partial void ProcessPatchObjectivesResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -197,6 +231,8 @@ partial void ProcessPatchObjectivesResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -206,8 +242,7 @@ partial void ProcessPatchObjectivesResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -216,6 +251,11 @@ partial void ProcessPatchObjectivesResponseContent(
__attempt < __maxAttempts &&
global::Tavus.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Tavus.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -232,14 +272,15 @@ partial void ProcessPatchObjectivesResponseContent(
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::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -279,6 +320,8 @@ partial void ProcessPatchObjectivesResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -299,6 +342,8 @@ partial void ProcessPatchObjectivesResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
@@ -323,9 +368,13 @@ partial void ProcessPatchObjectivesResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Tavus.Objectives.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Tavus.Objectives.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -353,9 +402,13 @@ partial void ProcessPatchObjectivesResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Tavus.Objectives.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Tavus.Objectives.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Tavus/Generated/Tavus.ObjectivesClient.g.cs b/src/libs/Tavus/Generated/Tavus.ObjectivesClient.g.cs
index e554e3d..9a51900 100644
--- a/src/libs/Tavus/Generated/Tavus.ObjectivesClient.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.ObjectivesClient.g.cs
@@ -72,10 +72,10 @@ public ObjectivesClient(
/// Client-wide request defaults such as headers, query parameters, retries, and timeout.
/// Dispose the HttpClient when the instance is disposed. True by default.
public ObjectivesClient(
- global::System.Net.Http.HttpClient? httpClient = null,
- global::System.Uri? baseUri = null,
- global::System.Collections.Generic.List? authorizations = null,
- global::Tavus.AutoSDKClientOptions? options = null,
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Uri? baseUri,
+ global::System.Collections.Generic.List? authorizations,
+ global::Tavus.AutoSDKClientOptions? options,
bool disposeHttpClient = true)
{
diff --git a/src/libs/Tavus/Generated/Tavus.OptionsSupport.g.cs b/src/libs/Tavus/Generated/Tavus.OptionsSupport.g.cs
index c6bc5a4..2d246af 100644
--- a/src/libs/Tavus/Generated/Tavus.OptionsSupport.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.OptionsSupport.g.cs
@@ -101,9 +101,45 @@ public sealed class AutoSDKRetryOptions
public int MaxAttempts { get; set; } = 1;
///
- /// Optional fixed delay between retry attempts.
+ /// Optional fixed delay between retry attempts. When set, this takes precedence over exponential backoff.
///
public global::System.TimeSpan? Delay { get; set; }
+
+ ///
+ /// Initial exponential backoff delay used when is not set.
+ ///
+ public global::System.TimeSpan InitialDelay { get; set; } = global::System.TimeSpan.FromSeconds(1);
+
+ ///
+ /// Maximum retry delay after applying retry headers, backoff, and jitter.
+ ///
+ public global::System.TimeSpan MaxDelay { get; set; } = global::System.TimeSpan.FromSeconds(30);
+
+ ///
+ /// Multiplier applied to exponential backoff after each failed attempt.
+ /// Values below 1 are normalized to 1.
+ ///
+ public double BackoffMultiplier { get; set; } = 2D;
+
+ ///
+ /// Randomizes computed backoff by plus or minus this ratio. Values are clamped to 0..1.
+ ///
+ public double JitterRatio { get; set; } = 0.2D;
+
+ ///
+ /// Whether Retry-After response headers should control retry delay when present.
+ ///
+ public bool UseRetryAfterHeader { get; set; } = true;
+
+ ///
+ /// Whether a rate-limit reset response header should control retry delay when present.
+ ///
+ public bool UseRateLimitResetHeader { get; set; }
+
+ ///
+ /// Optional provider-specific rate-limit reset header name. Values may be Unix seconds or an HTTP date.
+ ///
+ public string? RateLimitResetHeaderName { get; set; } = "X-RateLimit-Reset";
}
@@ -231,6 +267,16 @@ public sealed class AutoSDKHookContext
///
public bool WillRetry { get; set; }
+ ///
+ /// The computed retry delay when is true.
+ ///
+ public global::System.TimeSpan? RetryDelay { get; set; }
+
+ ///
+ /// A short retry reason such as exception or status:429.
+ ///
+ public string RetryReason { get; set; } = string.Empty;
+
///
/// The effective cancellation token for the current request attempt.
///
@@ -254,6 +300,8 @@ internal static class AutoSDKRequestOptionsSupport
int attempt,
int maxAttempts,
bool willRetry,
+ global::System.TimeSpan? retryDelay,
+ string retryReason,
global::System.Threading.CancellationToken cancellationToken)
{
return new global::Tavus.AutoSDKHookContext
@@ -271,6 +319,8 @@ internal static class AutoSDKRequestOptionsSupport
Attempt = attempt,
MaxAttempts = maxAttempts,
WillRetry = willRetry,
+ RetryDelay = retryDelay,
+ RetryReason = retryReason ?? string.Empty,
CancellationToken = cancellationToken,
};
}
@@ -338,19 +388,188 @@ internal static int GetMaxAttempts(
return maxAttempts < 1 ? 1 : maxAttempts;
}
- internal static async global::System.Threading.Tasks.Task DelayBeforeRetryAsync(
+ internal static global::System.TimeSpan GetRetryDelay(
global::Tavus.AutoSDKClientOptions clientOptions,
global::Tavus.AutoSDKRequestOptions? requestOptions,
+ global::System.Net.Http.HttpResponseMessage? response,
+ int attempt)
+ {
+ var retryOptions = requestOptions?.Retry ?? clientOptions.Retry ?? new global::Tavus.AutoSDKRetryOptions();
+
+ if (retryOptions.UseRetryAfterHeader &&
+ TryGetRetryAfterDelay(response, out var retryAfterDelay))
+ {
+ return ClampRetryDelay(retryAfterDelay, retryOptions);
+ }
+
+ if (retryOptions.UseRateLimitResetHeader &&
+ TryGetRateLimitResetDelay(response, retryOptions.RateLimitResetHeaderName, out var rateLimitResetDelay))
+ {
+ return ClampRetryDelay(rateLimitResetDelay, retryOptions);
+ }
+
+ if (retryOptions.Delay.HasValue)
+ {
+ return ClampRetryDelay(retryOptions.Delay.Value, retryOptions);
+ }
+
+ var initialDelay = retryOptions.InitialDelay;
+ if (initialDelay <= global::System.TimeSpan.Zero)
+ {
+ return global::System.TimeSpan.Zero;
+ }
+
+ var multiplier = retryOptions.BackoffMultiplier < 1D ? 1D : retryOptions.BackoffMultiplier;
+ var exponent = attempt <= 1 ? 0 : attempt - 1;
+ var delayMilliseconds = initialDelay.TotalMilliseconds * global::System.Math.Pow(multiplier, exponent);
+ if (double.IsNaN(delayMilliseconds) || double.IsInfinity(delayMilliseconds) || delayMilliseconds < 0D)
+ {
+ delayMilliseconds = 0D;
+ }
+
+ var delay = global::System.TimeSpan.FromMilliseconds(delayMilliseconds);
+ delay = ApplyJitter(delay, retryOptions.JitterRatio);
+ return ClampRetryDelay(delay, retryOptions);
+ }
+
+ internal static async global::System.Threading.Tasks.Task DelayBeforeRetryAsync(
+ global::System.TimeSpan retryDelay,
global::System.Threading.CancellationToken cancellationToken)
{
- var delay = requestOptions?.Retry?.Delay ??
- clientOptions.Retry?.Delay;
- if (!delay.HasValue || delay.Value <= global::System.TimeSpan.Zero)
+ if (retryDelay <= global::System.TimeSpan.Zero)
{
return;
}
- await global::System.Threading.Tasks.Task.Delay(delay.Value, cancellationToken).ConfigureAwait(false);
+ await global::System.Threading.Tasks.Task.Delay(retryDelay, cancellationToken).ConfigureAwait(false);
+ }
+
+ private static bool TryGetRetryAfterDelay(
+ global::System.Net.Http.HttpResponseMessage? response,
+ out global::System.TimeSpan delay)
+ {
+ delay = global::System.TimeSpan.Zero;
+ var retryAfter = response?.Headers.RetryAfter;
+ if (retryAfter == null)
+ {
+ return false;
+ }
+
+ if (retryAfter.Delta.HasValue)
+ {
+ delay = retryAfter.Delta.Value;
+ return delay > global::System.TimeSpan.Zero;
+ }
+
+ if (retryAfter.Date.HasValue)
+ {
+ delay = retryAfter.Date.Value - global::System.DateTimeOffset.UtcNow;
+ return delay > global::System.TimeSpan.Zero;
+ }
+
+ return false;
+ }
+
+ private static bool TryGetRateLimitResetDelay(
+ global::System.Net.Http.HttpResponseMessage? response,
+ string? headerName,
+ out global::System.TimeSpan delay)
+ {
+ delay = global::System.TimeSpan.Zero;
+ if (response == null || string.IsNullOrWhiteSpace(headerName))
+ {
+ return false;
+ }
+
+ if (!response.Headers.TryGetValues(headerName, out var values) &&
+ (response.Content?.Headers == null || !response.Content.Headers.TryGetValues(headerName, out values)))
+ {
+ return false;
+ }
+
+ var value = global::System.Linq.Enumerable.FirstOrDefault(values);
+ if (string.IsNullOrWhiteSpace(value))
+ {
+ return false;
+ }
+
+ value = value.Trim();
+ if (long.TryParse(
+ value,
+ global::System.Globalization.NumberStyles.Integer,
+ global::System.Globalization.CultureInfo.InvariantCulture,
+ out var unixSeconds))
+ {
+ delay = global::System.DateTimeOffset.FromUnixTimeSeconds(unixSeconds) - global::System.DateTimeOffset.UtcNow;
+ return delay > global::System.TimeSpan.Zero;
+ }
+
+ if (global::System.DateTimeOffset.TryParse(
+ value,
+ global::System.Globalization.CultureInfo.InvariantCulture,
+ global::System.Globalization.DateTimeStyles.AssumeUniversal | global::System.Globalization.DateTimeStyles.AdjustToUniversal,
+ out var resetAt))
+ {
+ delay = resetAt - global::System.DateTimeOffset.UtcNow;
+ return delay > global::System.TimeSpan.Zero;
+ }
+
+ return false;
+ }
+
+ private static global::System.TimeSpan ApplyJitter(
+ global::System.TimeSpan delay,
+ double jitterRatio)
+ {
+ if (delay <= global::System.TimeSpan.Zero || jitterRatio <= 0D)
+ {
+ return delay;
+ }
+
+ if (jitterRatio > 1D)
+ {
+ jitterRatio = 1D;
+ }
+
+ var sample = NextJitterSample();
+ var multiplier = 1D - jitterRatio + (sample * jitterRatio * 2D);
+ var milliseconds = delay.TotalMilliseconds * multiplier;
+ if (double.IsNaN(milliseconds) || double.IsInfinity(milliseconds) || milliseconds < 0D)
+ {
+ milliseconds = 0D;
+ }
+
+ return global::System.TimeSpan.FromMilliseconds(milliseconds);
+ }
+
+ private static double NextJitterSample()
+ {
+ var bytes = new byte[8];
+ using (var randomNumberGenerator = global::System.Security.Cryptography.RandomNumberGenerator.Create())
+ {
+ randomNumberGenerator.GetBytes(bytes);
+ }
+
+ var value = global::System.BitConverter.ToUInt64(bytes, 0);
+ return value / (double)ulong.MaxValue;
+ }
+
+ private static global::System.TimeSpan ClampRetryDelay(
+ global::System.TimeSpan delay,
+ global::Tavus.AutoSDKRetryOptions retryOptions)
+ {
+ if (delay <= global::System.TimeSpan.Zero)
+ {
+ return global::System.TimeSpan.Zero;
+ }
+
+ var maxDelay = retryOptions.MaxDelay;
+ if (maxDelay > global::System.TimeSpan.Zero && delay > maxDelay)
+ {
+ return maxDelay;
+ }
+
+ return delay;
}
internal static bool ShouldRetryStatusCode(
diff --git a/src/libs/Tavus/Generated/Tavus.PersonasClient.CreatePersona.g.cs b/src/libs/Tavus/Generated/Tavus.PersonasClient.CreatePersona.g.cs
index 9f4e1c4..fdcae84 100644
--- a/src/libs/Tavus/Generated/Tavus.PersonasClient.CreatePersona.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.PersonasClient.CreatePersona.g.cs
@@ -51,6 +51,29 @@ partial void ProcessCreatePersonaResponseContent(
///
public async global::System.Threading.Tasks.Task CreatePersonaAsync(
+ global::Tavus.CreatePersonaRequest request,
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await CreatePersonaAsResponseAsync(
+
+ request: request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Create Persona
+ /// Create and customize a persona's behavior and capabilities for CVI.
+ ///
+ ///
+ /// 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> CreatePersonaAsResponseAsync(
+
global::Tavus.CreatePersonaRequest request,
global::Tavus.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
@@ -85,6 +108,7 @@ partial void ProcessCreatePersonaResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Tavus.PathBuilder(
path: "/v2/personas",
baseUri: HttpClient.BaseAddress);
@@ -164,6 +188,8 @@ partial void ProcessCreatePersonaResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -174,6 +200,11 @@ partial void ProcessCreatePersonaResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -191,6 +222,8 @@ partial void ProcessCreatePersonaResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -200,8 +233,7 @@ partial void ProcessCreatePersonaResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -210,6 +242,11 @@ partial void ProcessCreatePersonaResponseContent(
__attempt < __maxAttempts &&
global::Tavus.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Tavus.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -226,14 +263,15 @@ partial void ProcessCreatePersonaResponseContent(
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::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -273,6 +311,8 @@ partial void ProcessCreatePersonaResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -293,6 +333,8 @@ partial void ProcessCreatePersonaResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
@@ -317,9 +359,13 @@ partial void ProcessCreatePersonaResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Tavus.Persona.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Tavus.Persona.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -347,9 +393,13 @@ partial void ProcessCreatePersonaResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Tavus.Persona.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Tavus.Persona.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Tavus/Generated/Tavus.PersonasClient.DeletePersona.g.cs b/src/libs/Tavus/Generated/Tavus.PersonasClient.DeletePersona.g.cs
index e112359..ee5d235 100644
--- a/src/libs/Tavus/Generated/Tavus.PersonasClient.DeletePersona.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.PersonasClient.DeletePersona.g.cs
@@ -48,6 +48,25 @@ partial void ProcessDeletePersonaResponse(
string personaId,
global::Tavus.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await DeletePersonaAsResponseAsync(
+ personaId: personaId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Delete Persona
+ /// Deletes a single persona.
+ ///
+ ///
+ /// 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 DeletePersonaAsResponseAsync(
+ string personaId,
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -77,6 +96,7 @@ partial void ProcessDeletePersonaResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Tavus.PathBuilder(
path: $"/v2/personas/{personaId}",
baseUri: HttpClient.BaseAddress);
@@ -150,6 +170,8 @@ partial void ProcessDeletePersonaResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -160,6 +182,11 @@ partial void ProcessDeletePersonaResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -177,6 +204,8 @@ partial void ProcessDeletePersonaResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -186,8 +215,7 @@ partial void ProcessDeletePersonaResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -196,6 +224,11 @@ partial void ProcessDeletePersonaResponse(
__attempt < __maxAttempts &&
global::Tavus.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Tavus.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -212,14 +245,15 @@ partial void ProcessDeletePersonaResponse(
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::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -259,6 +293,8 @@ partial void ProcessDeletePersonaResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -279,6 +315,8 @@ partial void ProcessDeletePersonaResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
@@ -299,6 +337,10 @@ partial void ProcessDeletePersonaResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -320,6 +362,10 @@ partial void ProcessDeletePersonaResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Tavus/Generated/Tavus.PersonasClient.GetPersona.g.cs b/src/libs/Tavus/Generated/Tavus.PersonasClient.GetPersona.g.cs
index bb1a3f0..27a7225 100644
--- a/src/libs/Tavus/Generated/Tavus.PersonasClient.GetPersona.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.PersonasClient.GetPersona.g.cs
@@ -53,6 +53,27 @@ partial void ProcessGetPersonaResponseContent(
string personaId,
global::Tavus.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GetPersonaAsResponseAsync(
+ personaId: personaId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Get Persona
+ /// Returns a single persona.
+ ///
+ ///
+ /// 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> GetPersonaAsResponseAsync(
+ string personaId,
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -82,6 +103,7 @@ partial void ProcessGetPersonaResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Tavus.PathBuilder(
path: $"/v2/personas/{personaId}",
baseUri: HttpClient.BaseAddress);
@@ -155,6 +177,8 @@ partial void ProcessGetPersonaResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -165,6 +189,11 @@ partial void ProcessGetPersonaResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -182,6 +211,8 @@ partial void ProcessGetPersonaResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -191,8 +222,7 @@ partial void ProcessGetPersonaResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -201,6 +231,11 @@ partial void ProcessGetPersonaResponseContent(
__attempt < __maxAttempts &&
global::Tavus.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Tavus.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -217,14 +252,15 @@ partial void ProcessGetPersonaResponseContent(
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::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -264,6 +300,8 @@ partial void ProcessGetPersonaResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -284,6 +322,8 @@ partial void ProcessGetPersonaResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
@@ -308,9 +348,13 @@ partial void ProcessGetPersonaResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Tavus.Persona.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Tavus.Persona.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -338,9 +382,13 @@ partial void ProcessGetPersonaResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Tavus.Persona.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Tavus.Persona.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Tavus/Generated/Tavus.PersonasClient.ListPersonas.g.cs b/src/libs/Tavus/Generated/Tavus.PersonasClient.ListPersonas.g.cs
index d0c1b48..cd03420 100644
--- a/src/libs/Tavus/Generated/Tavus.PersonasClient.ListPersonas.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.PersonasClient.ListPersonas.g.cs
@@ -49,6 +49,24 @@ partial void ProcessListPersonasResponseContent(
public async global::System.Threading.Tasks.Task ListPersonasAsync(
global::Tavus.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await ListPersonasAsResponseAsync(
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// List Personas
+ /// Returns a list of all personas.
+ ///
+ /// 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> ListPersonasAsResponseAsync(
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -77,6 +95,7 @@ partial void ProcessListPersonasResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Tavus.PathBuilder(
path: "/v2/personas",
baseUri: HttpClient.BaseAddress);
@@ -149,6 +168,8 @@ partial void ProcessListPersonasResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -159,6 +180,11 @@ partial void ProcessListPersonasResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -176,6 +202,8 @@ partial void ProcessListPersonasResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -185,8 +213,7 @@ partial void ProcessListPersonasResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -195,6 +222,11 @@ partial void ProcessListPersonasResponseContent(
__attempt < __maxAttempts &&
global::Tavus.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Tavus.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -211,14 +243,15 @@ partial void ProcessListPersonasResponseContent(
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::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -258,6 +291,8 @@ partial void ProcessListPersonasResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -278,6 +313,8 @@ partial void ProcessListPersonasResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
@@ -302,9 +339,13 @@ partial void ProcessListPersonasResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Tavus.ListPersonasResponse.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Tavus.ListPersonasResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -332,9 +373,13 @@ partial void ProcessListPersonasResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Tavus.ListPersonasResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Tavus.ListPersonasResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Tavus/Generated/Tavus.PersonasClient.PatchPersona.g.cs b/src/libs/Tavus/Generated/Tavus.PersonasClient.PatchPersona.g.cs
index 9b79b31..71aea19 100644
--- a/src/libs/Tavus/Generated/Tavus.PersonasClient.PatchPersona.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.PersonasClient.PatchPersona.g.cs
@@ -55,6 +55,32 @@ partial void ProcessPatchPersonaResponseContent(
public async global::System.Threading.Tasks.Task PatchPersonaAsync(
string personaId,
+ global::System.Collections.Generic.IList request,
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await PatchPersonaAsResponseAsync(
+ personaId: personaId,
+
+ request: request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Patch Persona
+ /// Updates a persona using JSON Patch (RFC 6902).
+ ///
+ ///
+ ///
+ /// 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> PatchPersonaAsResponseAsync(
+ string personaId,
+
global::System.Collections.Generic.IList request,
global::Tavus.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
@@ -90,6 +116,7 @@ partial void ProcessPatchPersonaResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Tavus.PathBuilder(
path: $"/v2/personas/{personaId}",
baseUri: HttpClient.BaseAddress);
@@ -170,6 +197,8 @@ partial void ProcessPatchPersonaResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -180,6 +209,11 @@ partial void ProcessPatchPersonaResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -197,6 +231,8 @@ partial void ProcessPatchPersonaResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -206,8 +242,7 @@ partial void ProcessPatchPersonaResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -216,6 +251,11 @@ partial void ProcessPatchPersonaResponseContent(
__attempt < __maxAttempts &&
global::Tavus.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Tavus.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -232,14 +272,15 @@ partial void ProcessPatchPersonaResponseContent(
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::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -279,6 +320,8 @@ partial void ProcessPatchPersonaResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -299,6 +342,8 @@ partial void ProcessPatchPersonaResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
@@ -323,9 +368,13 @@ partial void ProcessPatchPersonaResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Tavus.Persona.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Tavus.Persona.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -353,9 +402,13 @@ partial void ProcessPatchPersonaResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Tavus.Persona.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Tavus.Persona.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Tavus/Generated/Tavus.PersonasClient.g.cs b/src/libs/Tavus/Generated/Tavus.PersonasClient.g.cs
index 690730a..bdba644 100644
--- a/src/libs/Tavus/Generated/Tavus.PersonasClient.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.PersonasClient.g.cs
@@ -72,10 +72,10 @@ public PersonasClient(
/// Client-wide request defaults such as headers, query parameters, retries, and timeout.
/// Dispose the HttpClient when the instance is disposed. True by default.
public PersonasClient(
- global::System.Net.Http.HttpClient? httpClient = null,
- global::System.Uri? baseUri = null,
- global::System.Collections.Generic.List? authorizations = null,
- global::Tavus.AutoSDKClientOptions? options = null,
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Uri? baseUri,
+ global::System.Collections.Generic.List? authorizations,
+ global::Tavus.AutoSDKClientOptions? options,
bool disposeHttpClient = true)
{
diff --git a/src/libs/Tavus/Generated/Tavus.ReplicasClient.CreateReplica.g.cs b/src/libs/Tavus/Generated/Tavus.ReplicasClient.CreateReplica.g.cs
index a0e5245..5ac7260 100644
--- a/src/libs/Tavus/Generated/Tavus.ReplicasClient.CreateReplica.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.ReplicasClient.CreateReplica.g.cs
@@ -51,6 +51,29 @@ partial void ProcessCreateReplicaResponseContent(
///
public async global::System.Threading.Tasks.Task CreateReplicaAsync(
+ global::Tavus.CreateReplicaRequest request,
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await CreateReplicaAsResponseAsync(
+
+ request: request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Create Replica
+ /// Create a new replica using the latest phoenix-4 model.
+ ///
+ ///
+ /// 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> CreateReplicaAsResponseAsync(
+
global::Tavus.CreateReplicaRequest request,
global::Tavus.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
@@ -85,6 +108,7 @@ partial void ProcessCreateReplicaResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Tavus.PathBuilder(
path: "/v2/replicas",
baseUri: HttpClient.BaseAddress);
@@ -164,6 +188,8 @@ partial void ProcessCreateReplicaResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -174,6 +200,11 @@ partial void ProcessCreateReplicaResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -191,6 +222,8 @@ partial void ProcessCreateReplicaResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -200,8 +233,7 @@ partial void ProcessCreateReplicaResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -210,6 +242,11 @@ partial void ProcessCreateReplicaResponseContent(
__attempt < __maxAttempts &&
global::Tavus.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Tavus.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -226,14 +263,15 @@ partial void ProcessCreateReplicaResponseContent(
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::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -273,6 +311,8 @@ partial void ProcessCreateReplicaResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -293,6 +333,8 @@ partial void ProcessCreateReplicaResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
@@ -317,9 +359,13 @@ partial void ProcessCreateReplicaResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Tavus.Replica.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Tavus.Replica.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -347,9 +393,13 @@ partial void ProcessCreateReplicaResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Tavus.Replica.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Tavus.Replica.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Tavus/Generated/Tavus.ReplicasClient.DeleteReplica.g.cs b/src/libs/Tavus/Generated/Tavus.ReplicasClient.DeleteReplica.g.cs
index ae26a67..f7e8fa5 100644
--- a/src/libs/Tavus/Generated/Tavus.ReplicasClient.DeleteReplica.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.ReplicasClient.DeleteReplica.g.cs
@@ -48,6 +48,25 @@ partial void ProcessDeleteReplicaResponse(
string replicaId,
global::Tavus.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await DeleteReplicaAsResponseAsync(
+ replicaId: replicaId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Delete Replica
+ /// Deletes a replica.
+ ///
+ ///
+ /// 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 DeleteReplicaAsResponseAsync(
+ string replicaId,
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -77,6 +96,7 @@ partial void ProcessDeleteReplicaResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Tavus.PathBuilder(
path: $"/v2/replicas/{replicaId}",
baseUri: HttpClient.BaseAddress);
@@ -150,6 +170,8 @@ partial void ProcessDeleteReplicaResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -160,6 +182,11 @@ partial void ProcessDeleteReplicaResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -177,6 +204,8 @@ partial void ProcessDeleteReplicaResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -186,8 +215,7 @@ partial void ProcessDeleteReplicaResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -196,6 +224,11 @@ partial void ProcessDeleteReplicaResponse(
__attempt < __maxAttempts &&
global::Tavus.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Tavus.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -212,14 +245,15 @@ partial void ProcessDeleteReplicaResponse(
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::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -259,6 +293,8 @@ partial void ProcessDeleteReplicaResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -279,6 +315,8 @@ partial void ProcessDeleteReplicaResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
@@ -299,6 +337,10 @@ partial void ProcessDeleteReplicaResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -320,6 +362,10 @@ partial void ProcessDeleteReplicaResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Tavus/Generated/Tavus.ReplicasClient.GetReplica.g.cs b/src/libs/Tavus/Generated/Tavus.ReplicasClient.GetReplica.g.cs
index c20a5cf..f8ace36 100644
--- a/src/libs/Tavus/Generated/Tavus.ReplicasClient.GetReplica.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.ReplicasClient.GetReplica.g.cs
@@ -53,6 +53,27 @@ partial void ProcessGetReplicaResponseContent(
string replicaId,
global::Tavus.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GetReplicaAsResponseAsync(
+ replicaId: replicaId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Get Replica
+ /// Returns a single replica with training progress.
+ ///
+ ///
+ /// 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> GetReplicaAsResponseAsync(
+ string replicaId,
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -82,6 +103,7 @@ partial void ProcessGetReplicaResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Tavus.PathBuilder(
path: $"/v2/replicas/{replicaId}",
baseUri: HttpClient.BaseAddress);
@@ -155,6 +177,8 @@ partial void ProcessGetReplicaResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -165,6 +189,11 @@ partial void ProcessGetReplicaResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -182,6 +211,8 @@ partial void ProcessGetReplicaResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -191,8 +222,7 @@ partial void ProcessGetReplicaResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -201,6 +231,11 @@ partial void ProcessGetReplicaResponseContent(
__attempt < __maxAttempts &&
global::Tavus.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Tavus.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -217,14 +252,15 @@ partial void ProcessGetReplicaResponseContent(
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::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -264,6 +300,8 @@ partial void ProcessGetReplicaResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -284,6 +322,8 @@ partial void ProcessGetReplicaResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
@@ -308,9 +348,13 @@ partial void ProcessGetReplicaResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Tavus.Replica.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Tavus.Replica.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -338,9 +382,13 @@ partial void ProcessGetReplicaResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Tavus.Replica.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Tavus.Replica.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Tavus/Generated/Tavus.ReplicasClient.ListReplicas.g.cs b/src/libs/Tavus/Generated/Tavus.ReplicasClient.ListReplicas.g.cs
index f12cd34..165fbe9 100644
--- a/src/libs/Tavus/Generated/Tavus.ReplicasClient.ListReplicas.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.ReplicasClient.ListReplicas.g.cs
@@ -49,6 +49,24 @@ partial void ProcessListReplicasResponseContent(
public async global::System.Threading.Tasks.Task ListReplicasAsync(
global::Tavus.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await ListReplicasAsResponseAsync(
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// List Replicas
+ /// Returns a list of all replicas.
+ ///
+ /// 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> ListReplicasAsResponseAsync(
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -77,6 +95,7 @@ partial void ProcessListReplicasResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Tavus.PathBuilder(
path: "/v2/replicas",
baseUri: HttpClient.BaseAddress);
@@ -149,6 +168,8 @@ partial void ProcessListReplicasResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -159,6 +180,11 @@ partial void ProcessListReplicasResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -176,6 +202,8 @@ partial void ProcessListReplicasResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -185,8 +213,7 @@ partial void ProcessListReplicasResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -195,6 +222,11 @@ partial void ProcessListReplicasResponseContent(
__attempt < __maxAttempts &&
global::Tavus.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Tavus.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -211,14 +243,15 @@ partial void ProcessListReplicasResponseContent(
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::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -258,6 +291,8 @@ partial void ProcessListReplicasResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -278,6 +313,8 @@ partial void ProcessListReplicasResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
@@ -302,9 +339,13 @@ partial void ProcessListReplicasResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Tavus.ListReplicasResponse.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Tavus.ListReplicasResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -332,9 +373,13 @@ partial void ProcessListReplicasResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Tavus.ListReplicasResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Tavus.ListReplicasResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Tavus/Generated/Tavus.ReplicasClient.RenameReplica.g.cs b/src/libs/Tavus/Generated/Tavus.ReplicasClient.RenameReplica.g.cs
index 41761d8..72efa44 100644
--- a/src/libs/Tavus/Generated/Tavus.ReplicasClient.RenameReplica.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.ReplicasClient.RenameReplica.g.cs
@@ -55,6 +55,32 @@ partial void ProcessRenameReplicaResponseContent(
public async global::System.Threading.Tasks.Task RenameReplicaAsync(
string replicaId,
+ global::Tavus.RenameReplicaRequest request,
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await RenameReplicaAsResponseAsync(
+ replicaId: replicaId,
+
+ request: request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Rename Replica
+ /// Renames a single replica.
+ ///
+ ///
+ ///
+ /// 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> RenameReplicaAsResponseAsync(
+ string replicaId,
+
global::Tavus.RenameReplicaRequest request,
global::Tavus.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
@@ -90,6 +116,7 @@ partial void ProcessRenameReplicaResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Tavus.PathBuilder(
path: $"/v2/replicas/{replicaId}/name",
baseUri: HttpClient.BaseAddress);
@@ -170,6 +197,8 @@ partial void ProcessRenameReplicaResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -180,6 +209,11 @@ partial void ProcessRenameReplicaResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -197,6 +231,8 @@ partial void ProcessRenameReplicaResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -206,8 +242,7 @@ partial void ProcessRenameReplicaResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -216,6 +251,11 @@ partial void ProcessRenameReplicaResponseContent(
__attempt < __maxAttempts &&
global::Tavus.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Tavus.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -232,14 +272,15 @@ partial void ProcessRenameReplicaResponseContent(
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::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -279,6 +320,8 @@ partial void ProcessRenameReplicaResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -299,6 +342,8 @@ partial void ProcessRenameReplicaResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
@@ -323,9 +368,13 @@ partial void ProcessRenameReplicaResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Tavus.Replica.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Tavus.Replica.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -353,9 +402,13 @@ partial void ProcessRenameReplicaResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Tavus.Replica.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Tavus.Replica.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Tavus/Generated/Tavus.ReplicasClient.g.cs b/src/libs/Tavus/Generated/Tavus.ReplicasClient.g.cs
index 7ad5289..565e504 100644
--- a/src/libs/Tavus/Generated/Tavus.ReplicasClient.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.ReplicasClient.g.cs
@@ -72,10 +72,10 @@ public ReplicasClient(
/// Client-wide request defaults such as headers, query parameters, retries, and timeout.
/// Dispose the HttpClient when the instance is disposed. True by default.
public ReplicasClient(
- global::System.Net.Http.HttpClient? httpClient = null,
- global::System.Uri? baseUri = null,
- global::System.Collections.Generic.List? authorizations = null,
- global::Tavus.AutoSDKClientOptions? options = null,
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Uri? baseUri,
+ global::System.Collections.Generic.List? authorizations,
+ global::Tavus.AutoSDKClientOptions? options,
bool disposeHttpClient = true)
{
diff --git a/src/libs/Tavus/Generated/Tavus.TavusClient.g.cs b/src/libs/Tavus/Generated/Tavus.TavusClient.g.cs
index 2f9b228..68c6598 100644
--- a/src/libs/Tavus/Generated/Tavus.TavusClient.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.TavusClient.g.cs
@@ -43,7 +43,7 @@ public sealed partial class TavusClient : global::Tavus.ITavusClient, global::Sy
///
///
///
- public ConversationsClient Conversations => new ConversationsClient(HttpClient, authorizations: Authorizations, options: Options)
+ public ConversationsClient Conversations => new ConversationsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
@@ -52,7 +52,7 @@ public sealed partial class TavusClient : global::Tavus.ITavusClient, global::Sy
///
///
///
- public DocumentsClient Documents => new DocumentsClient(HttpClient, authorizations: Authorizations, options: Options)
+ public DocumentsClient Documents => new DocumentsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
@@ -61,7 +61,7 @@ public sealed partial class TavusClient : global::Tavus.ITavusClient, global::Sy
///
///
///
- public GuardrailsClient Guardrails => new GuardrailsClient(HttpClient, authorizations: Authorizations, options: Options)
+ public GuardrailsClient Guardrails => new GuardrailsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
@@ -70,7 +70,7 @@ public sealed partial class TavusClient : global::Tavus.ITavusClient, global::Sy
///
///
///
- public MemoriesClient Memories => new MemoriesClient(HttpClient, authorizations: Authorizations, options: Options)
+ public MemoriesClient Memories => new MemoriesClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
@@ -79,7 +79,7 @@ public sealed partial class TavusClient : global::Tavus.ITavusClient, global::Sy
///
///
///
- public ObjectivesClient Objectives => new ObjectivesClient(HttpClient, authorizations: Authorizations, options: Options)
+ public ObjectivesClient Objectives => new ObjectivesClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
@@ -88,7 +88,7 @@ public sealed partial class TavusClient : global::Tavus.ITavusClient, global::Sy
///
///
///
- public PersonasClient Personas => new PersonasClient(HttpClient, authorizations: Authorizations, options: Options)
+ public PersonasClient Personas => new PersonasClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
@@ -97,7 +97,7 @@ public sealed partial class TavusClient : global::Tavus.ITavusClient, global::Sy
///
///
///
- public ReplicasClient Replicas => new ReplicasClient(HttpClient, authorizations: Authorizations, options: Options)
+ public ReplicasClient Replicas => new ReplicasClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
@@ -106,7 +106,7 @@ public sealed partial class TavusClient : global::Tavus.ITavusClient, global::Sy
///
///
///
- public VideosClient Videos => new VideosClient(HttpClient, authorizations: Authorizations, options: Options)
+ public VideosClient Videos => new VideosClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
@@ -145,10 +145,10 @@ public TavusClient(
/// Client-wide request defaults such as headers, query parameters, retries, and timeout.
/// Dispose the HttpClient when the instance is disposed. True by default.
public TavusClient(
- global::System.Net.Http.HttpClient? httpClient = null,
- global::System.Uri? baseUri = null,
- global::System.Collections.Generic.List? authorizations = null,
- global::Tavus.AutoSDKClientOptions? options = null,
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Uri? baseUri,
+ global::System.Collections.Generic.List? authorizations,
+ global::Tavus.AutoSDKClientOptions? options,
bool disposeHttpClient = true)
{
diff --git a/src/libs/Tavus/Generated/Tavus.VideosClient.DeleteVideo.g.cs b/src/libs/Tavus/Generated/Tavus.VideosClient.DeleteVideo.g.cs
index 16d2dc5..56f49a0 100644
--- a/src/libs/Tavus/Generated/Tavus.VideosClient.DeleteVideo.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.VideosClient.DeleteVideo.g.cs
@@ -48,6 +48,25 @@ partial void ProcessDeleteVideoResponse(
string videoId,
global::Tavus.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await DeleteVideoAsResponseAsync(
+ videoId: videoId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Delete Video
+ /// Deletes a single video.
+ ///
+ ///
+ /// 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 DeleteVideoAsResponseAsync(
+ string videoId,
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -77,6 +96,7 @@ partial void ProcessDeleteVideoResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Tavus.PathBuilder(
path: $"/v2/videos/{videoId}",
baseUri: HttpClient.BaseAddress);
@@ -150,6 +170,8 @@ partial void ProcessDeleteVideoResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -160,6 +182,11 @@ partial void ProcessDeleteVideoResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -177,6 +204,8 @@ partial void ProcessDeleteVideoResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -186,8 +215,7 @@ partial void ProcessDeleteVideoResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -196,6 +224,11 @@ partial void ProcessDeleteVideoResponse(
__attempt < __maxAttempts &&
global::Tavus.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Tavus.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -212,14 +245,15 @@ partial void ProcessDeleteVideoResponse(
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::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -259,6 +293,8 @@ partial void ProcessDeleteVideoResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -279,6 +315,8 @@ partial void ProcessDeleteVideoResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
@@ -299,6 +337,10 @@ partial void ProcessDeleteVideoResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -320,6 +362,10 @@ partial void ProcessDeleteVideoResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Tavus/Generated/Tavus.VideosClient.GenerateVideo.g.cs b/src/libs/Tavus/Generated/Tavus.VideosClient.GenerateVideo.g.cs
index d2e669f..b50d91f 100644
--- a/src/libs/Tavus/Generated/Tavus.VideosClient.GenerateVideo.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.VideosClient.GenerateVideo.g.cs
@@ -51,6 +51,29 @@ partial void ProcessGenerateVideoResponseContent(
///
public async global::System.Threading.Tasks.Task GenerateVideoAsync(
+ global::Tavus.GenerateVideoRequest request,
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GenerateVideoAsResponseAsync(
+
+ request: request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Generate Video
+ /// Generates a new video using a Replica and either a script or an audio file.
+ ///
+ ///
+ /// 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> GenerateVideoAsResponseAsync(
+
global::Tavus.GenerateVideoRequest request,
global::Tavus.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
@@ -85,6 +108,7 @@ partial void ProcessGenerateVideoResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Tavus.PathBuilder(
path: "/v2/videos",
baseUri: HttpClient.BaseAddress);
@@ -164,6 +188,8 @@ partial void ProcessGenerateVideoResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -174,6 +200,11 @@ partial void ProcessGenerateVideoResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -191,6 +222,8 @@ partial void ProcessGenerateVideoResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -200,8 +233,7 @@ partial void ProcessGenerateVideoResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -210,6 +242,11 @@ partial void ProcessGenerateVideoResponseContent(
__attempt < __maxAttempts &&
global::Tavus.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Tavus.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -226,14 +263,15 @@ partial void ProcessGenerateVideoResponseContent(
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::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -273,6 +311,8 @@ partial void ProcessGenerateVideoResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -293,6 +333,8 @@ partial void ProcessGenerateVideoResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
@@ -317,9 +359,13 @@ partial void ProcessGenerateVideoResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Tavus.Video.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Tavus.Video.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -347,9 +393,13 @@ partial void ProcessGenerateVideoResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Tavus.Video.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Tavus.Video.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Tavus/Generated/Tavus.VideosClient.GetVideo.g.cs b/src/libs/Tavus/Generated/Tavus.VideosClient.GetVideo.g.cs
index e3a6d77..7af3a84 100644
--- a/src/libs/Tavus/Generated/Tavus.VideosClient.GetVideo.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.VideosClient.GetVideo.g.cs
@@ -53,6 +53,27 @@ partial void ProcessGetVideoResponseContent(
string videoId,
global::Tavus.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GetVideoAsResponseAsync(
+ videoId: videoId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Get Video
+ /// Returns a single video. If ready, includes download_url, stream_url, and hosted_url.
+ ///
+ ///
+ /// 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> GetVideoAsResponseAsync(
+ string videoId,
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -82,6 +103,7 @@ partial void ProcessGetVideoResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Tavus.PathBuilder(
path: $"/v2/videos/{videoId}",
baseUri: HttpClient.BaseAddress);
@@ -155,6 +177,8 @@ partial void ProcessGetVideoResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -165,6 +189,11 @@ partial void ProcessGetVideoResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -182,6 +211,8 @@ partial void ProcessGetVideoResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -191,8 +222,7 @@ partial void ProcessGetVideoResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -201,6 +231,11 @@ partial void ProcessGetVideoResponseContent(
__attempt < __maxAttempts &&
global::Tavus.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Tavus.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -217,14 +252,15 @@ partial void ProcessGetVideoResponseContent(
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::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -264,6 +300,8 @@ partial void ProcessGetVideoResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -284,6 +322,8 @@ partial void ProcessGetVideoResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
@@ -308,9 +348,13 @@ partial void ProcessGetVideoResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Tavus.Video.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Tavus.Video.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -338,9 +382,13 @@ partial void ProcessGetVideoResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Tavus.Video.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Tavus.Video.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Tavus/Generated/Tavus.VideosClient.ListVideos.g.cs b/src/libs/Tavus/Generated/Tavus.VideosClient.ListVideos.g.cs
index 6599e29..12ee9ad 100644
--- a/src/libs/Tavus/Generated/Tavus.VideosClient.ListVideos.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.VideosClient.ListVideos.g.cs
@@ -49,6 +49,24 @@ partial void ProcessListVideosResponseContent(
public async global::System.Threading.Tasks.Task ListVideosAsync(
global::Tavus.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await ListVideosAsResponseAsync(
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// List Videos
+ /// Returns a list of all videos.
+ ///
+ /// 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> ListVideosAsResponseAsync(
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -77,6 +95,7 @@ partial void ProcessListVideosResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Tavus.PathBuilder(
path: "/v2/videos",
baseUri: HttpClient.BaseAddress);
@@ -149,6 +168,8 @@ partial void ProcessListVideosResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -159,6 +180,11 @@ partial void ProcessListVideosResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -176,6 +202,8 @@ partial void ProcessListVideosResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -185,8 +213,7 @@ partial void ProcessListVideosResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -195,6 +222,11 @@ partial void ProcessListVideosResponseContent(
__attempt < __maxAttempts &&
global::Tavus.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Tavus.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -211,14 +243,15 @@ partial void ProcessListVideosResponseContent(
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::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -258,6 +291,8 @@ partial void ProcessListVideosResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -278,6 +313,8 @@ partial void ProcessListVideosResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
@@ -302,9 +339,13 @@ partial void ProcessListVideosResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Tavus.ListVideosResponse.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Tavus.ListVideosResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -332,9 +373,13 @@ partial void ProcessListVideosResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Tavus.ListVideosResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Tavus.ListVideosResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Tavus/Generated/Tavus.VideosClient.RenameVideo.g.cs b/src/libs/Tavus/Generated/Tavus.VideosClient.RenameVideo.g.cs
index f122675..0a48fc5 100644
--- a/src/libs/Tavus/Generated/Tavus.VideosClient.RenameVideo.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.VideosClient.RenameVideo.g.cs
@@ -55,6 +55,32 @@ partial void ProcessRenameVideoResponseContent(
public async global::System.Threading.Tasks.Task RenameVideoAsync(
string videoId,
+ global::Tavus.RenameVideoRequest request,
+ global::Tavus.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await RenameVideoAsResponseAsync(
+ videoId: videoId,
+
+ request: request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Rename Video
+ /// Renames a single video.
+ ///
+ ///
+ ///
+ /// 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> RenameVideoAsResponseAsync(
+ string videoId,
+
global::Tavus.RenameVideoRequest request,
global::Tavus.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
@@ -90,6 +116,7 @@ partial void ProcessRenameVideoResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Tavus.PathBuilder(
path: $"/v2/videos/{videoId}/name",
baseUri: HttpClient.BaseAddress);
@@ -170,6 +197,8 @@ partial void ProcessRenameVideoResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -180,6 +209,11 @@ partial void ProcessRenameVideoResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -197,6 +231,8 @@ partial void ProcessRenameVideoResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -206,8 +242,7 @@ partial void ProcessRenameVideoResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -216,6 +251,11 @@ partial void ProcessRenameVideoResponseContent(
__attempt < __maxAttempts &&
global::Tavus.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Tavus.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Tavus.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Tavus.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -232,14 +272,15 @@ partial void ProcessRenameVideoResponseContent(
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::Tavus.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -279,6 +320,8 @@ partial void ProcessRenameVideoResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -299,6 +342,8 @@ partial void ProcessRenameVideoResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
@@ -323,9 +368,13 @@ partial void ProcessRenameVideoResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Tavus.Video.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Tavus.Video.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -353,9 +402,13 @@ partial void ProcessRenameVideoResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Tavus.Video.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Tavus.Video.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Tavus.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Tavus.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Tavus/Generated/Tavus.VideosClient.g.cs b/src/libs/Tavus/Generated/Tavus.VideosClient.g.cs
index 18a7ddd..492ee3b 100644
--- a/src/libs/Tavus/Generated/Tavus.VideosClient.g.cs
+++ b/src/libs/Tavus/Generated/Tavus.VideosClient.g.cs
@@ -72,10 +72,10 @@ public VideosClient(
/// Client-wide request defaults such as headers, query parameters, retries, and timeout.
/// Dispose the HttpClient when the instance is disposed. True by default.
public VideosClient(
- global::System.Net.Http.HttpClient? httpClient = null,
- global::System.Uri? baseUri = null,
- global::System.Collections.Generic.List? authorizations = null,
- global::Tavus.AutoSDKClientOptions? options = null,
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Uri? baseUri,
+ global::System.Collections.Generic.List? authorizations,
+ global::Tavus.AutoSDKClientOptions? options,
bool disposeHttpClient = true)
{