Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public void AuthorizeUsingBearer(
Authorizations.Add(new global::FishAudio.EndPointAuthorization
{
Type = "Http",
SchemeId = "HttpBearer",
Location = "Header",
Name = "Bearer",
Value = apiKey,
Expand Down
35 changes: 32 additions & 3 deletions src/libs/FishAudio/Generated/FishAudio.FishAudioClient.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ public sealed partial class FishAudioClient : global::FishAudio.IFishAudioClient
#if DEBUG
= true;
#endif

/// <inheritdoc/>
public global::FishAudio.AutoSDKClientOptions Options { get; }
/// <summary>
///
/// </summary>
Expand All @@ -39,7 +42,7 @@ public sealed partial class FishAudioClient : global::FishAudio.IFishAudioClient
/// <summary>
///
/// </summary>
public ModelClient Model => new ModelClient(HttpClient, authorizations: Authorizations)
public ModelClient Model => new ModelClient(HttpClient, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
Expand All @@ -48,7 +51,7 @@ public sealed partial class FishAudioClient : global::FishAudio.IFishAudioClient
/// <summary>
///
/// </summary>
public OpenAPIV1Client OpenAPIV1 => new OpenAPIV1Client(HttpClient, authorizations: Authorizations)
public OpenAPIV1Client OpenAPIV1 => new OpenAPIV1Client(HttpClient, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
Expand All @@ -57,7 +60,7 @@ public sealed partial class FishAudioClient : global::FishAudio.IFishAudioClient
/// <summary>
///
/// </summary>
public WalletClient Wallet => new WalletClient(HttpClient, authorizations: Authorizations)
public WalletClient Wallet => new WalletClient(HttpClient, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
Expand All @@ -76,11 +79,37 @@ public FishAudioClient(
global::System.Net.Http.HttpClient? httpClient = null,
global::System.Uri? baseUri = null,
global::System.Collections.Generic.List<global::FishAudio.EndPointAuthorization>? authorizations = null,
bool disposeHttpClient = true) : this(
httpClient,
baseUri,
authorizations,
options: null,
disposeHttpClient: disposeHttpClient)
{
}

/// <summary>
/// Creates a new instance of the FishAudioClient.
/// If no httpClient is provided, a new one will be created.
/// If no baseUri is provided, the default baseUri from OpenAPI spec will be used.
/// </summary>
/// <param name="httpClient">The HttpClient instance. If not provided, a new one will be created.</param>
/// <param name="baseUri">The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used.</param>
/// <param name="authorizations">The authorizations to use for the requests.</param>
/// <param name="options">Client-wide request defaults such as headers, query parameters, retries, and timeout.</param>
/// <param name="disposeHttpClient">Dispose the HttpClient when the instance is disposed. True by default.</param>
public FishAudioClient(
global::System.Net.Http.HttpClient? httpClient = null,
global::System.Uri? baseUri = null,
global::System.Collections.Generic.List<global::FishAudio.EndPointAuthorization>? authorizations = null,
global::FishAudio.AutoSDKClientOptions? options = null,
bool disposeHttpClient = true)
{

HttpClient = httpClient ?? new global::System.Net.Http.HttpClient();
HttpClient.BaseAddress ??= baseUri ?? new global::System.Uri(DefaultBaseUrl);
Authorizations = authorizations ?? new global::System.Collections.Generic.List<global::FishAudio.EndPointAuthorization>();
Options = options ?? new global::FishAudio.AutoSDKClientOptions();
_disposeHttpClient = disposeHttpClient;

Initialized(HttpClient);
Expand Down
5 changes: 5 additions & 0 deletions src/libs/FishAudio/Generated/FishAudio.IFishAudioClient.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ public partial interface IFishAudioClient : global::System.IDisposable
/// </summary>
public bool ReadResponseAsString { get; set; }

/// <summary>
/// Client-wide request defaults such as headers, query parameters, retries, and timeout.
/// </summary>
public global::FishAudio.AutoSDKClientOptions Options { get; }

/// <summary>
///
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ public partial interface IModelClient
/// Create Model
/// </summary>
/// <param name="request"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::FishAudio.ApiException"></exception>
global::System.Threading.Tasks.Task<global::FishAudio.CreateModelResponse> CreateModelAsync(

global::FishAudio.CreateModelRequest request,
global::FishAudio.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Create Model
Expand Down Expand Up @@ -56,6 +58,7 @@ public partial interface IModelClient
/// Enhance audio quality<br/>
/// Default Value: false
/// </param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
global::System.Threading.Tasks.Task<global::FishAudio.CreateModelResponse> CreateModelAsync(
Expand All @@ -70,6 +73,7 @@ public partial interface IModelClient
global::FishAudio.AnyOf<global::System.Collections.Generic.IList<string>, string, object>? texts = default,
global::FishAudio.AnyOf<global::System.Collections.Generic.IList<string>, string, object>? tags = default,
bool? enhanceAudioQuality = default,
global::FishAudio.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ public partial interface IModelClient
/// Delete Model
/// </summary>
/// <param name="id"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::FishAudio.ApiException"></exception>
global::System.Threading.Tasks.Task DeleteModelByIdAsync(
string id,
global::FishAudio.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ public partial interface IModelClient
/// </summary>
/// <param name="id"></param>
/// <param name="request"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::FishAudio.ApiException"></exception>
global::System.Threading.Tasks.Task EditModelByIdAsync(
string id,

global::FishAudio.PatchModelRequest request,
global::FishAudio.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Update Model
Expand All @@ -36,6 +38,7 @@ public partial interface IModelClient
/// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464
/// </param>
/// <param name="tags"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
global::System.Threading.Tasks.Task EditModelByIdAsync(
Expand All @@ -46,6 +49,7 @@ public partial interface IModelClient
string? coverImagename = default,
global::FishAudio.PatchModelRequestVisibility2? visibility = default,
global::FishAudio.AnyOf<global::System.Collections.Generic.IList<string>, string>? tags = default,
global::FishAudio.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public partial interface IModelClient
/// <param name="sortBy">
/// Default Value: score
/// </param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::FishAudio.ApiException"></exception>
global::System.Threading.Tasks.Task<global::FishAudio.GetModelResponse> GetModelAsync(
Expand All @@ -46,6 +47,7 @@ public partial interface IModelClient
global::FishAudio.AnyOf<global::System.Collections.Generic.IList<string>, string, object>? language = default,
global::FishAudio.AnyOf<global::System.Collections.Generic.IList<string>, string, object>? titleLanguage = default,
global::FishAudio.GetModelSortBy? sortBy = default,
global::FishAudio.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ public partial interface IModelClient
/// Get Model
/// </summary>
/// <param name="id"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::FishAudio.ApiException"></exception>
global::System.Threading.Tasks.Task<global::FishAudio.GetModelResponse2> GetModelByIdAsync(
string id,
global::FishAudio.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
5 changes: 5 additions & 0 deletions src/libs/FishAudio/Generated/FishAudio.IModelClient.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ public partial interface IModelClient : global::System.IDisposable
/// </summary>
public bool ReadResponseAsString { get; set; }

/// <summary>
/// Client-wide request defaults such as headers, query parameters, retries, and timeout.
/// </summary>
public global::FishAudio.AutoSDKClientOptions Options { get; }

/// <summary>
///
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ public partial interface IOpenAPIV1Client
/// Speech to Text
/// </summary>
/// <param name="request"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::FishAudio.ApiException"></exception>
global::System.Threading.Tasks.Task<global::FishAudio.CreateAsrResponse> CreateAsrAsync(

global::FishAudio.CreateAsrRequest request,
global::FishAudio.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Speech to Text
Expand All @@ -31,13 +33,15 @@ public partial interface IOpenAPIV1Client
/// Whether to return precise timestamps in the text, this will increase the latency in audio shorter than 30 seconds<br/>
/// Default Value: true
/// </param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
global::System.Threading.Tasks.Task<global::FishAudio.CreateAsrResponse> CreateAsrAsync(
byte[] audio,
string audioname,
string? language = default,
bool? ignoreTimestamps = default,
global::FishAudio.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ public partial interface IOpenAPIV1Client
/// Default Value: s2-pro
/// </param>
/// <param name="request"></param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::FishAudio.ApiException"></exception>
/// <remarks>
Expand Down Expand Up @@ -46,6 +47,7 @@ public partial interface IOpenAPIV1Client

global::FishAudio.TTSRequest request,
global::FishAudio.CreateTtsModel model = global::FishAudio.CreateTtsModel.S2Pro,
global::FishAudio.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
/// <summary>
/// Text to Speech
Expand Down Expand Up @@ -123,6 +125,7 @@ public partial interface IOpenAPIV1Client
/// Early stopping threshold for batch processing.<br/>
/// Default Value: 1
/// </param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
global::System.Threading.Tasks.Task CreateTtsAsync(
Expand All @@ -145,6 +148,7 @@ public partial interface IOpenAPIV1Client
int? minChunkLength = default,
bool? conditionOnPreviousChunks = default,
double? earlyStopThreshold = default,
global::FishAudio.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
5 changes: 5 additions & 0 deletions src/libs/FishAudio/Generated/FishAudio.IOpenAPIV1Client.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ public partial interface IOpenAPIV1Client : global::System.IDisposable
/// </summary>
public bool ReadResponseAsString { get; set; }

/// <summary>
/// Client-wide request defaults such as headers, query parameters, retries, and timeout.
/// </summary>
public global::FishAudio.AutoSDKClientOptions Options { get; }

/// <summary>
///
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@ public partial interface IWalletClient
/// <param name="userId">
/// Default Value: self
/// </param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::FishAudio.ApiException"></exception>
global::System.Threading.Tasks.Task<global::FishAudio.GetWalletApiCreditResponse> GetWalletByUserIdApiCreditAsync(
string? userId,
bool? checkFreeCredit = default,
global::FishAudio.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ public partial interface IWalletClient
/// <param name="userId">
/// Default Value: self
/// </param>
/// <param name="requestOptions">Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.</param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::FishAudio.ApiException"></exception>
global::System.Threading.Tasks.Task<global::FishAudio.GetWalletPackageResponse> GetWalletByUserIdPackageAsync(
string? userId,
global::FishAudio.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
5 changes: 5 additions & 0 deletions src/libs/FishAudio/Generated/FishAudio.IWalletClient.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ public partial interface IWalletClient : global::System.IDisposable
/// </summary>
public bool ReadResponseAsString { get; set; }

/// <summary>
/// Client-wide request defaults such as headers, query parameters, retries, and timeout.
/// </summary>
public global::FishAudio.AutoSDKClientOptions Options { get; }

/// <summary>
///
/// </summary>
Expand Down
Loading