Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat:Updated OpenAPI spec #14

Closed
wants to merge 1 commit into from
Closed
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 @@ -5,16 +5,16 @@ namespace DeepInfra
{
public partial class DeepInfraApi
{
partial void PrepareCreateVoiceV1VoicesAddPostArguments(
partial void PrepareCreateVoiceV1ElevenlabsV1VoicesAddPostArguments(
global::System.Net.Http.HttpClient httpClient);
partial void PrepareCreateVoiceV1VoicesAddPostRequest(
partial void PrepareCreateVoiceV1ElevenlabsV1VoicesAddPostRequest(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpRequestMessage httpRequestMessage);
partial void ProcessCreateVoiceV1VoicesAddPostResponse(
partial void ProcessCreateVoiceV1ElevenlabsV1VoicesAddPostResponse(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage);

partial void ProcessCreateVoiceV1VoicesAddPostResponseContent(
partial void ProcessCreateVoiceV1ElevenlabsV1VoicesAddPostResponseContent(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage,
ref string content);
Expand All @@ -25,22 +25,22 @@ partial void ProcessCreateVoiceV1VoicesAddPostResponseContent(
/// </summary>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
public async global::System.Threading.Tasks.Task<global::DeepInfra.Voice> CreateVoiceV1VoicesAddPostAsync(
public async global::System.Threading.Tasks.Task<global::DeepInfra.Voice> CreateVoiceV1ElevenlabsV1VoicesAddPostAsync(
global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: _httpClient);
PrepareCreateVoiceV1VoicesAddPostArguments(
PrepareCreateVoiceV1ElevenlabsV1VoicesAddPostArguments(
httpClient: _httpClient);

using var httpRequest = new global::System.Net.Http.HttpRequestMessage(
method: global::System.Net.Http.HttpMethod.Post,
requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/voices/add", global::System.UriKind.RelativeOrAbsolute));
requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/elevenlabs/v1/voices/add", global::System.UriKind.RelativeOrAbsolute));

PrepareRequest(
client: _httpClient,
request: httpRequest);
PrepareCreateVoiceV1VoicesAddPostRequest(
PrepareCreateVoiceV1ElevenlabsV1VoicesAddPostRequest(
httpClient: _httpClient,
httpRequestMessage: httpRequest);

Expand All @@ -52,7 +52,7 @@ partial void ProcessCreateVoiceV1VoicesAddPostResponseContent(
ProcessResponse(
client: _httpClient,
response: response);
ProcessCreateVoiceV1VoicesAddPostResponse(
ProcessCreateVoiceV1ElevenlabsV1VoicesAddPostResponse(
httpClient: _httpClient,
httpResponseMessage: response);

Expand All @@ -62,7 +62,7 @@ partial void ProcessCreateVoiceV1VoicesAddPostResponseContent(
client: _httpClient,
response: response,
content: ref __content);
ProcessCreateVoiceV1VoicesAddPostResponseContent(
ProcessCreateVoiceV1ElevenlabsV1VoicesAddPostResponseContent(
httpClient: _httpClient,
httpResponseMessage: response,
content: ref __content);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ namespace DeepInfra
{
public partial class DeepInfraApi
{
partial void PrepareDeleteVoiceV1VoicesVoiceIdDeleteArguments(
partial void PrepareDeleteVoiceV1ElevenlabsV1VoicesVoiceIdDeleteArguments(
global::System.Net.Http.HttpClient httpClient,
ref string voiceId);
partial void PrepareDeleteVoiceV1VoicesVoiceIdDeleteRequest(
partial void PrepareDeleteVoiceV1ElevenlabsV1VoicesVoiceIdDeleteRequest(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpRequestMessage httpRequestMessage,
string voiceId);
partial void ProcessDeleteVoiceV1VoicesVoiceIdDeleteResponse(
partial void ProcessDeleteVoiceV1ElevenlabsV1VoicesVoiceIdDeleteResponse(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage);

partial void ProcessDeleteVoiceV1VoicesVoiceIdDeleteResponseContent(
partial void ProcessDeleteVoiceV1ElevenlabsV1VoicesVoiceIdDeleteResponseContent(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage,
ref string content);
Expand All @@ -27,24 +27,24 @@ partial void ProcessDeleteVoiceV1VoicesVoiceIdDeleteResponseContent(
/// <param name="voiceId"></param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
public async global::System.Threading.Tasks.Task<object> DeleteVoiceV1VoicesVoiceIdDeleteAsync(
public async global::System.Threading.Tasks.Task<object> DeleteVoiceV1ElevenlabsV1VoicesVoiceIdDeleteAsync(
string voiceId,
global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: _httpClient);
PrepareDeleteVoiceV1VoicesVoiceIdDeleteArguments(
PrepareDeleteVoiceV1ElevenlabsV1VoicesVoiceIdDeleteArguments(
httpClient: _httpClient,
voiceId: ref voiceId);

using var httpRequest = new global::System.Net.Http.HttpRequestMessage(
method: global::System.Net.Http.HttpMethod.Delete,
requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/voices/{voiceId}", global::System.UriKind.RelativeOrAbsolute));
requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/elevenlabs/v1/voices/{voiceId}", global::System.UriKind.RelativeOrAbsolute));

PrepareRequest(
client: _httpClient,
request: httpRequest);
PrepareDeleteVoiceV1VoicesVoiceIdDeleteRequest(
PrepareDeleteVoiceV1ElevenlabsV1VoicesVoiceIdDeleteRequest(
httpClient: _httpClient,
httpRequestMessage: httpRequest,
voiceId: voiceId);
Expand All @@ -57,7 +57,7 @@ partial void ProcessDeleteVoiceV1VoicesVoiceIdDeleteResponseContent(
ProcessResponse(
client: _httpClient,
response: response);
ProcessDeleteVoiceV1VoicesVoiceIdDeleteResponse(
ProcessDeleteVoiceV1ElevenlabsV1VoicesVoiceIdDeleteResponse(
httpClient: _httpClient,
httpResponseMessage: response);

Expand All @@ -67,7 +67,7 @@ partial void ProcessDeleteVoiceV1VoicesVoiceIdDeleteResponseContent(
client: _httpClient,
response: response,
content: ref __content);
ProcessDeleteVoiceV1VoicesVoiceIdDeleteResponseContent(
ProcessDeleteVoiceV1ElevenlabsV1VoicesVoiceIdDeleteResponseContent(
httpClient: _httpClient,
httpResponseMessage: response,
content: ref __content);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ namespace DeepInfra
{
public partial class DeepInfraApi
{
partial void PrepareGetVoiceV1VoicesVoiceIdGetArguments(
partial void PrepareGetVoiceV1ElevenlabsV1VoicesVoiceIdGetArguments(
global::System.Net.Http.HttpClient httpClient,
ref string voiceId);
partial void PrepareGetVoiceV1VoicesVoiceIdGetRequest(
partial void PrepareGetVoiceV1ElevenlabsV1VoicesVoiceIdGetRequest(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpRequestMessage httpRequestMessage,
string voiceId);
partial void ProcessGetVoiceV1VoicesVoiceIdGetResponse(
partial void ProcessGetVoiceV1ElevenlabsV1VoicesVoiceIdGetResponse(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage);

partial void ProcessGetVoiceV1VoicesVoiceIdGetResponseContent(
partial void ProcessGetVoiceV1ElevenlabsV1VoicesVoiceIdGetResponseContent(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage,
ref string content);
Expand All @@ -28,24 +28,24 @@ partial void ProcessGetVoiceV1VoicesVoiceIdGetResponseContent(
/// <param name="voiceId"></param>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
public async global::System.Threading.Tasks.Task<global::DeepInfra.Voice> GetVoiceV1VoicesVoiceIdGetAsync(
public async global::System.Threading.Tasks.Task<global::DeepInfra.Voice> GetVoiceV1ElevenlabsV1VoicesVoiceIdGetAsync(
string voiceId,
global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: _httpClient);
PrepareGetVoiceV1VoicesVoiceIdGetArguments(
PrepareGetVoiceV1ElevenlabsV1VoicesVoiceIdGetArguments(
httpClient: _httpClient,
voiceId: ref voiceId);

using var httpRequest = new global::System.Net.Http.HttpRequestMessage(
method: global::System.Net.Http.HttpMethod.Get,
requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/voices/{voiceId}", global::System.UriKind.RelativeOrAbsolute));
requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/elevenlabs/v1/voices/{voiceId}", global::System.UriKind.RelativeOrAbsolute));

PrepareRequest(
client: _httpClient,
request: httpRequest);
PrepareGetVoiceV1VoicesVoiceIdGetRequest(
PrepareGetVoiceV1ElevenlabsV1VoicesVoiceIdGetRequest(
httpClient: _httpClient,
httpRequestMessage: httpRequest,
voiceId: voiceId);
Expand All @@ -58,7 +58,7 @@ partial void ProcessGetVoiceV1VoicesVoiceIdGetResponseContent(
ProcessResponse(
client: _httpClient,
response: response);
ProcessGetVoiceV1VoicesVoiceIdGetResponse(
ProcessGetVoiceV1ElevenlabsV1VoicesVoiceIdGetResponse(
httpClient: _httpClient,
httpResponseMessage: response);

Expand All @@ -68,7 +68,7 @@ partial void ProcessGetVoiceV1VoicesVoiceIdGetResponseContent(
client: _httpClient,
response: response,
content: ref __content);
ProcessGetVoiceV1VoicesVoiceIdGetResponseContent(
ProcessGetVoiceV1ElevenlabsV1VoicesVoiceIdGetResponseContent(
httpClient: _httpClient,
httpResponseMessage: response,
content: ref __content);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ namespace DeepInfra
{
public partial class DeepInfraApi
{
partial void PrepareGetVoicesV1VoicesGetArguments(
partial void PrepareGetVoicesV1ElevenlabsV1VoicesGetArguments(
global::System.Net.Http.HttpClient httpClient);
partial void PrepareGetVoicesV1VoicesGetRequest(
partial void PrepareGetVoicesV1ElevenlabsV1VoicesGetRequest(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpRequestMessage httpRequestMessage);
partial void ProcessGetVoicesV1VoicesGetResponse(
partial void ProcessGetVoicesV1ElevenlabsV1VoicesGetResponse(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage);

partial void ProcessGetVoicesV1VoicesGetResponseContent(
partial void ProcessGetVoicesV1ElevenlabsV1VoicesGetResponseContent(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage,
ref string content);
Expand All @@ -25,22 +25,22 @@ partial void ProcessGetVoicesV1VoicesGetResponseContent(
/// </summary>
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
public async global::System.Threading.Tasks.Task<global::DeepInfra.GetVoicesOut> GetVoicesV1VoicesGetAsync(
public async global::System.Threading.Tasks.Task<global::DeepInfra.GetVoicesOut> GetVoicesV1ElevenlabsV1VoicesGetAsync(
global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: _httpClient);
PrepareGetVoicesV1VoicesGetArguments(
PrepareGetVoicesV1ElevenlabsV1VoicesGetArguments(
httpClient: _httpClient);

using var httpRequest = new global::System.Net.Http.HttpRequestMessage(
method: global::System.Net.Http.HttpMethod.Get,
requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/voices", global::System.UriKind.RelativeOrAbsolute));
requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/elevenlabs/v1/voices", global::System.UriKind.RelativeOrAbsolute));

PrepareRequest(
client: _httpClient,
request: httpRequest);
PrepareGetVoicesV1VoicesGetRequest(
PrepareGetVoicesV1ElevenlabsV1VoicesGetRequest(
httpClient: _httpClient,
httpRequestMessage: httpRequest);

Expand All @@ -52,7 +52,7 @@ partial void ProcessGetVoicesV1VoicesGetResponseContent(
ProcessResponse(
client: _httpClient,
response: response);
ProcessGetVoicesV1VoicesGetResponse(
ProcessGetVoicesV1ElevenlabsV1VoicesGetResponse(
httpClient: _httpClient,
httpResponseMessage: response);

Expand All @@ -62,7 +62,7 @@ partial void ProcessGetVoicesV1VoicesGetResponseContent(
client: _httpClient,
response: response,
content: ref __content);
ProcessGetVoicesV1VoicesGetResponseContent(
ProcessGetVoicesV1ElevenlabsV1VoicesGetResponseContent(
httpClient: _httpClient,
httpResponseMessage: response,
content: ref __content);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,16 +103,16 @@
/// Openai Audio Speech
/// </summary>
/// <param name="xDeepinfraSource"></param>
/// <param name="webhook">
/// The webhook to call when inference is done, by default you will get the output in the response of your inference request
/// </param>
/// <param name="model">
/// model name<br/>
/// Example: deepinfra/tts
/// </param>
/// <param name="input">
/// text to convert to speech<br/>
/// Example: Hello, how are you?
/// Text to convert to speech<br/>
/// Example: I'm beginnin' to feel like a Rap God, Rap God<br/>
/// All my people from the front to the back nod, back nod<br/>
/// Now, who thinks their arms are long enough to slap box, slap box?<br/>
/// They said I rap like a robot, so call me Rap-bot
/// </param>
/// <param name="voice">
/// Preset voices to use for the speech.
Expand All @@ -129,16 +129,14 @@
public async global::System.Threading.Tasks.Task<object> OpenaiAudioSpeechV1OpenaiAudioSpeechPostAsync(
string model,
string input,
string xDeepinfraSource = default,

Check warning on line 132 in src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.OpenaiAudioSpeechV1OpenaiAudioSpeechPost.g.cs

View workflow job for this annotation

GitHub Actions / Build and test / Build, test and publish

Cannot convert null literal to non-nullable reference type.
string? webhook = default,
global::System.AllOf<global::DeepInfra.TtsVoice?>? voice = default,
global::System.AllOf<global::DeepInfra.TtsResponseFormat?>? responseFormat = default,
double speed = 1,
global::System.Threading.CancellationToken cancellationToken = default)
{
var request = new global::DeepInfra.OpenAITextToSpeechIn
{
Webhook = webhook,
Model = model,
Input = input,
Voice = voice,
Expand Down
Loading
Loading