Skip to content

Commit

Permalink
Merge pull request #51 from tryAGI/bot/update-openapi_202409130114
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Sep 13, 2024
2 parents 5563aa8 + 93f9cde commit d90f8e4
Show file tree
Hide file tree
Showing 15 changed files with 122 additions and 92 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ namespace DeepInfra
{
public partial class DeepInfraApi
{
partial void PrepareCreateVoiceV1ElevenlabsV1VoicesAddPostArguments(
partial void PrepareCreateVoiceV1VoicesAddPostArguments(
global::System.Net.Http.HttpClient httpClient,
global::DeepInfra.BodyCreateVoiceV1ElevenlabsV1VoicesAddPost request);
partial void PrepareCreateVoiceV1ElevenlabsV1VoicesAddPostRequest(
global::DeepInfra.BodyCreateVoiceV1VoicesAddPost request);
partial void PrepareCreateVoiceV1VoicesAddPostRequest(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpRequestMessage httpRequestMessage,
global::DeepInfra.BodyCreateVoiceV1ElevenlabsV1VoicesAddPost request);
partial void ProcessCreateVoiceV1ElevenlabsV1VoicesAddPostResponse(
global::DeepInfra.BodyCreateVoiceV1VoicesAddPost request);
partial void ProcessCreateVoiceV1VoicesAddPostResponse(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage);

partial void ProcessCreateVoiceV1ElevenlabsV1VoicesAddPostResponseContent(
partial void ProcessCreateVoiceV1VoicesAddPostResponseContent(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage,
ref string content);
Expand All @@ -29,21 +29,21 @@ partial void ProcessCreateVoiceV1ElevenlabsV1VoicesAddPostResponseContent(
/// <param name="request"></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.Voice2> CreateVoiceV1ElevenlabsV1VoicesAddPostAsync(
global::DeepInfra.BodyCreateVoiceV1ElevenlabsV1VoicesAddPost request,
public async global::System.Threading.Tasks.Task<global::DeepInfra.Voice2> CreateVoiceV1VoicesAddPostAsync(
global::DeepInfra.BodyCreateVoiceV1VoicesAddPost request,
global::System.Threading.CancellationToken cancellationToken = default)
{
request = request ?? throw new global::System.ArgumentNullException(nameof(request));

PrepareArguments(
client: _httpClient);
PrepareCreateVoiceV1ElevenlabsV1VoicesAddPostArguments(
PrepareCreateVoiceV1VoicesAddPostArguments(
httpClient: _httpClient,
request: request);

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/elevenlabs/v1/voices/add", global::System.UriKind.RelativeOrAbsolute));
requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/voices/add", global::System.UriKind.RelativeOrAbsolute));
using var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent();
__httpRequestContent.Add(
content: new global::System.Net.Http.StringContent($"{request.Name}"),
Expand All @@ -59,7 +59,7 @@ partial void ProcessCreateVoiceV1ElevenlabsV1VoicesAddPostResponseContent(
PrepareRequest(
client: _httpClient,
request: httpRequest);
PrepareCreateVoiceV1ElevenlabsV1VoicesAddPostRequest(
PrepareCreateVoiceV1VoicesAddPostRequest(
httpClient: _httpClient,
httpRequestMessage: httpRequest,
request: request);
Expand All @@ -72,7 +72,7 @@ partial void ProcessCreateVoiceV1ElevenlabsV1VoicesAddPostResponseContent(
ProcessResponse(
client: _httpClient,
response: response);
ProcessCreateVoiceV1ElevenlabsV1VoicesAddPostResponse(
ProcessCreateVoiceV1VoicesAddPostResponse(
httpClient: _httpClient,
httpResponseMessage: response);

Expand All @@ -82,7 +82,7 @@ partial void ProcessCreateVoiceV1ElevenlabsV1VoicesAddPostResponseContent(
client: _httpClient,
response: response,
content: ref __content);
ProcessCreateVoiceV1ElevenlabsV1VoicesAddPostResponseContent(
ProcessCreateVoiceV1VoicesAddPostResponseContent(
httpClient: _httpClient,
httpResponseMessage: response,
content: ref __content);
Expand Down Expand Up @@ -110,20 +110,20 @@ partial void ProcessCreateVoiceV1ElevenlabsV1VoicesAddPostResponseContent(
/// <param name="files"></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.Voice2> CreateVoiceV1ElevenlabsV1VoicesAddPostAsync(
public async global::System.Threading.Tasks.Task<global::DeepInfra.Voice2> CreateVoiceV1VoicesAddPostAsync(
string name,
string description,
global::System.Collections.Generic.IList<byte[]> files,
global::System.Threading.CancellationToken cancellationToken = default)
{
var request = new global::DeepInfra.BodyCreateVoiceV1ElevenlabsV1VoicesAddPost
var request = new global::DeepInfra.BodyCreateVoiceV1VoicesAddPost
{
Name = name,
Description = description,
Files = files,
};

return await CreateVoiceV1ElevenlabsV1VoicesAddPostAsync(
return await CreateVoiceV1VoicesAddPostAsync(
request: request,
cancellationToken: cancellationToken).ConfigureAwait(false);
}
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 PrepareDeleteVoiceV1ElevenlabsV1VoicesVoiceIdDeleteArguments(
partial void PrepareDeleteVoiceV1VoicesVoiceIdDeleteArguments(
global::System.Net.Http.HttpClient httpClient,
ref string voiceId);
partial void PrepareDeleteVoiceV1ElevenlabsV1VoicesVoiceIdDeleteRequest(
partial void PrepareDeleteVoiceV1VoicesVoiceIdDeleteRequest(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpRequestMessage httpRequestMessage,
string voiceId);
partial void ProcessDeleteVoiceV1ElevenlabsV1VoicesVoiceIdDeleteResponse(
partial void ProcessDeleteVoiceV1VoicesVoiceIdDeleteResponse(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage);

partial void ProcessDeleteVoiceV1ElevenlabsV1VoicesVoiceIdDeleteResponseContent(
partial void ProcessDeleteVoiceV1VoicesVoiceIdDeleteResponseContent(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage,
ref string content);
Expand All @@ -27,24 +27,24 @@ partial void ProcessDeleteVoiceV1ElevenlabsV1VoicesVoiceIdDeleteResponseContent(
/// <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.DeleteVoiceV1ElevenlabsV1VoicesVoiceIdDeleteResponse> DeleteVoiceV1ElevenlabsV1VoicesVoiceIdDeleteAsync(
public async global::System.Threading.Tasks.Task<global::DeepInfra.DeleteVoiceV1VoicesVoiceIdDeleteResponse> DeleteVoiceV1VoicesVoiceIdDeleteAsync(
string voiceId,
global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: _httpClient);
PrepareDeleteVoiceV1ElevenlabsV1VoicesVoiceIdDeleteArguments(
PrepareDeleteVoiceV1VoicesVoiceIdDeleteArguments(
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/elevenlabs/v1/voices/{voiceId}", global::System.UriKind.RelativeOrAbsolute));
requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/voices/{voiceId}", global::System.UriKind.RelativeOrAbsolute));

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

Expand All @@ -67,7 +67,7 @@ partial void ProcessDeleteVoiceV1ElevenlabsV1VoicesVoiceIdDeleteResponseContent(
client: _httpClient,
response: response,
content: ref __content);
ProcessDeleteVoiceV1ElevenlabsV1VoicesVoiceIdDeleteResponseContent(
ProcessDeleteVoiceV1VoicesVoiceIdDeleteResponseContent(
httpClient: _httpClient,
httpResponseMessage: response,
content: ref __content);
Expand All @@ -82,7 +82,7 @@ partial void ProcessDeleteVoiceV1ElevenlabsV1VoicesVoiceIdDeleteResponseContent(
}

return
global::System.Text.Json.JsonSerializer.Deserialize(__content, global::DeepInfra.SourceGenerationContext.Default.DeleteVoiceV1ElevenlabsV1VoicesVoiceIdDeleteResponse) ??
global::System.Text.Json.JsonSerializer.Deserialize(__content, global::DeepInfra.SourceGenerationContext.Default.DeleteVoiceV1VoicesVoiceIdDeleteResponse) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__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 PrepareGetVoiceV1ElevenlabsV1VoicesVoiceIdGetArguments(
partial void PrepareGetVoiceV1VoicesVoiceIdGetArguments(
global::System.Net.Http.HttpClient httpClient,
ref string voiceId);
partial void PrepareGetVoiceV1ElevenlabsV1VoicesVoiceIdGetRequest(
partial void PrepareGetVoiceV1VoicesVoiceIdGetRequest(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpRequestMessage httpRequestMessage,
string voiceId);
partial void ProcessGetVoiceV1ElevenlabsV1VoicesVoiceIdGetResponse(
partial void ProcessGetVoiceV1VoicesVoiceIdGetResponse(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage);

partial void ProcessGetVoiceV1ElevenlabsV1VoicesVoiceIdGetResponseContent(
partial void ProcessGetVoiceV1VoicesVoiceIdGetResponseContent(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage,
ref string content);
Expand All @@ -28,24 +28,24 @@ partial void ProcessGetVoiceV1ElevenlabsV1VoicesVoiceIdGetResponseContent(
/// <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.Voice2> GetVoiceV1ElevenlabsV1VoicesVoiceIdGetAsync(
public async global::System.Threading.Tasks.Task<global::DeepInfra.Voice2> GetVoiceV1VoicesVoiceIdGetAsync(
string voiceId,
global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: _httpClient);
PrepareGetVoiceV1ElevenlabsV1VoicesVoiceIdGetArguments(
PrepareGetVoiceV1VoicesVoiceIdGetArguments(
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/elevenlabs/v1/voices/{voiceId}", global::System.UriKind.RelativeOrAbsolute));
requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + $"/v1/voices/{voiceId}", global::System.UriKind.RelativeOrAbsolute));

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

Expand All @@ -68,7 +68,7 @@ partial void ProcessGetVoiceV1ElevenlabsV1VoicesVoiceIdGetResponseContent(
client: _httpClient,
response: response,
content: ref __content);
ProcessGetVoiceV1ElevenlabsV1VoicesVoiceIdGetResponseContent(
ProcessGetVoiceV1VoicesVoiceIdGetResponseContent(
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 PrepareGetVoicesV1ElevenlabsV1VoicesGetArguments(
partial void PrepareGetVoicesV1VoicesGetArguments(
global::System.Net.Http.HttpClient httpClient);
partial void PrepareGetVoicesV1ElevenlabsV1VoicesGetRequest(
partial void PrepareGetVoicesV1VoicesGetRequest(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpRequestMessage httpRequestMessage);
partial void ProcessGetVoicesV1ElevenlabsV1VoicesGetResponse(
partial void ProcessGetVoicesV1VoicesGetResponse(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage);

partial void ProcessGetVoicesV1ElevenlabsV1VoicesGetResponseContent(
partial void ProcessGetVoicesV1VoicesGetResponseContent(
global::System.Net.Http.HttpClient httpClient,
global::System.Net.Http.HttpResponseMessage httpResponseMessage,
ref string content);
Expand All @@ -25,22 +25,22 @@ partial void ProcessGetVoicesV1ElevenlabsV1VoicesGetResponseContent(
/// </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> GetVoicesV1ElevenlabsV1VoicesGetAsync(
public async global::System.Threading.Tasks.Task<global::DeepInfra.GetVoicesOut> GetVoicesV1VoicesGetAsync(
global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: _httpClient);
PrepareGetVoicesV1ElevenlabsV1VoicesGetArguments(
PrepareGetVoicesV1VoicesGetArguments(
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/elevenlabs/v1/voices", global::System.UriKind.RelativeOrAbsolute));
requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/v1/voices", global::System.UriKind.RelativeOrAbsolute));

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

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

Expand All @@ -62,7 +62,7 @@ partial void ProcessGetVoicesV1ElevenlabsV1VoicesGetResponseContent(
client: _httpClient,
response: response,
content: ref __content);
ProcessGetVoicesV1ElevenlabsV1VoicesGetResponseContent(
ProcessGetVoicesV1VoicesGetResponseContent(
httpClient: _httpClient,
httpResponseMessage: response,
content: ref __content);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,9 @@ partial void ProcessOpenaiChatCompletionsV1OpenaiChatCompletionsPostResponseCont
/// Alternative penalty for repetition, but multiplicative instead of additive (&gt; 1 penalize, &lt; 1 encourage)<br/>
/// Default Value: 1
/// </param>
/// <param name="user">
/// A unique identifier representing your end-user, which can help monitor and detect abuse. Avoid sending us any identifying information. We recommend hashing user identifiers.
/// </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.OpenaiChatCompletionsV1OpenaiChatCompletionsPostResponse> OpenaiChatCompletionsV1OpenaiChatCompletionsPostAsync(
Expand All @@ -197,6 +200,7 @@ partial void ProcessOpenaiChatCompletionsV1OpenaiChatCompletionsPostResponseCont
string? toolChoice = default,
global::System.AllOf<global::DeepInfra.ResponseFormat4>? responseFormat = default,
double repetitionPenalty = 1,
string? user = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
var request = new global::DeepInfra.OpenAIChatCompletionsIn
Expand All @@ -216,6 +220,7 @@ partial void ProcessOpenaiChatCompletionsV1OpenaiChatCompletionsPostResponseCont
ToolChoice = toolChoice,
ResponseFormat = responseFormat,
RepetitionPenalty = repetitionPenalty,
User = user,
};

return await OpenaiChatCompletionsV1OpenaiChatCompletionsPostAsync(
Expand Down
Loading

0 comments on commit d90f8e4

Please sign in to comment.