diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeleteLoraModel.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeleteLoraModel.g.cs
new file mode 100644
index 0000000..2896da5
--- /dev/null
+++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.DeleteLoraModel.g.cs
@@ -0,0 +1,212 @@
+
+#nullable enable
+
+namespace DeepInfra
+{
+ public partial class DeepInfraApi
+ {
+ partial void PrepareDeleteLoraModelArguments(
+ global::System.Net.Http.HttpClient httpClient,
+ ref string loraModelName,
+ ref string? xiApiKey);
+ partial void PrepareDeleteLoraModelRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage,
+ string loraModelName,
+ string? xiApiKey);
+ partial void ProcessDeleteLoraModelResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessDeleteLoraModelResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// Delete Lora Model
+ ///
+ ///
+ ///
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task DeleteLoraModelAsync(
+ string loraModelName,
+ string? xiApiKey = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ PrepareArguments(
+ client: HttpClient);
+ PrepareDeleteLoraModelArguments(
+ httpClient: HttpClient,
+ loraModelName: ref loraModelName,
+ xiApiKey: ref xiApiKey);
+
+ var __pathBuilder = new PathBuilder(
+ path: $"/lora-model/{loraModelName}",
+ baseUri: HttpClient.BaseAddress);
+ var __path = __pathBuilder.ToString();
+ using var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: global::System.Net.Http.HttpMethod.Delete,
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+
+ foreach (var __authorization in Authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+
+ if (xiApiKey != default)
+ {
+ __httpRequest.Headers.TryAddWithoutValidation("xi-api-key", xiApiKey.ToString());
+ }
+
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareDeleteLoraModelRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest,
+ loraModelName: loraModelName,
+ xiApiKey: xiApiKey);
+
+ using var __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
+ cancellationToken: cancellationToken).ConfigureAwait(false);
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessDeleteLoraModelResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ // Bad Request
+ if ((int)__response.StatusCode == 400)
+ {
+ string? __content_400 = null;
+ global::DeepInfra.DeepError? __value_400 = null;
+ if (ReadResponseAsString)
+ {
+ __content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
+ __value_400 = global::DeepInfra.DeepError.FromJson(__content_400, JsonSerializerContext);
+ }
+ else
+ {
+ var __contentStream_400 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
+ __value_400 = await global::DeepInfra.DeepError.FromJsonStreamAsync(__contentStream_400, JsonSerializerContext).ConfigureAwait(false);
+ }
+
+ throw new global::DeepInfra.ApiException(
+ message: __response.ReasonPhrase ?? string.Empty,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content_400,
+ ResponseObject = __value_400,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
+ // Validation Error
+ if ((int)__response.StatusCode == 422)
+ {
+ string? __content_422 = null;
+ global::DeepInfra.HTTPValidationError? __value_422 = null;
+ if (ReadResponseAsString)
+ {
+ __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
+ __value_422 = global::DeepInfra.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
+ }
+ else
+ {
+ var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
+ __value_422 = await global::DeepInfra.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false);
+ }
+
+ throw new global::DeepInfra.ApiException(
+ message: __response.ReasonPhrase ?? string.Empty,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content_422,
+ ResponseObject = __value_422,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
+
+ if (ReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessDeleteLoraModelResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ }
+ catch (global::System.Net.Http.HttpRequestException __ex)
+ {
+ throw new global::DeepInfra.ApiException(
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
+
+ return __content;
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ }
+ catch (global::System.Net.Http.HttpRequestException __ex)
+ {
+ throw new global::DeepInfra.ApiException(
+ message: __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ statusCode: __response.StatusCode)
+ {
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
+
+ var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
+
+ return __content;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.UploadLoraModel.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.UploadLoraModel.g.cs
new file mode 100644
index 0000000..61cd003
--- /dev/null
+++ b/src/libs/DeepInfra/Generated/DeepInfra.DeepInfraApi.UploadLoraModel.g.cs
@@ -0,0 +1,253 @@
+
+#nullable enable
+
+namespace DeepInfra
+{
+ public partial class DeepInfraApi
+ {
+ partial void PrepareUploadLoraModelArguments(
+ global::System.Net.Http.HttpClient httpClient,
+ ref string? xiApiKey,
+ global::DeepInfra.LoraModelUploadIn request);
+ partial void PrepareUploadLoraModelRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage,
+ string? xiApiKey,
+ global::DeepInfra.LoraModelUploadIn request);
+ partial void ProcessUploadLoraModelResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessUploadLoraModelResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// Upload Lora Model
+ ///
+ ///
+ ///
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task UploadLoraModelAsync(
+ global::DeepInfra.LoraModelUploadIn request,
+ string? xiApiKey = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ request = request ?? throw new global::System.ArgumentNullException(nameof(request));
+
+ PrepareArguments(
+ client: HttpClient);
+ PrepareUploadLoraModelArguments(
+ httpClient: HttpClient,
+ xiApiKey: ref xiApiKey,
+ request: request);
+
+ var __pathBuilder = new PathBuilder(
+ path: "/lora-model",
+ baseUri: HttpClient.BaseAddress);
+ var __path = __pathBuilder.ToString();
+ using var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: global::System.Net.Http.HttpMethod.Post,
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+
+ foreach (var __authorization in Authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+
+ if (xiApiKey != default)
+ {
+ __httpRequest.Headers.TryAddWithoutValidation("xi-api-key", xiApiKey.ToString());
+ }
+
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
+ var __httpRequestContent = new global::System.Net.Http.StringContent(
+ content: __httpRequestContentBody,
+ encoding: global::System.Text.Encoding.UTF8,
+ mediaType: "application/json");
+ __httpRequest.Content = __httpRequestContent;
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareUploadLoraModelRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest,
+ xiApiKey: xiApiKey,
+ request: request);
+
+ using var __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
+ cancellationToken: cancellationToken).ConfigureAwait(false);
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessUploadLoraModelResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ // Bad Request
+ if ((int)__response.StatusCode == 400)
+ {
+ string? __content_400 = null;
+ global::DeepInfra.DeepError? __value_400 = null;
+ if (ReadResponseAsString)
+ {
+ __content_400 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
+ __value_400 = global::DeepInfra.DeepError.FromJson(__content_400, JsonSerializerContext);
+ }
+ else
+ {
+ var __contentStream_400 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
+ __value_400 = await global::DeepInfra.DeepError.FromJsonStreamAsync(__contentStream_400, JsonSerializerContext).ConfigureAwait(false);
+ }
+
+ throw new global::DeepInfra.ApiException(
+ message: __response.ReasonPhrase ?? string.Empty,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content_400,
+ ResponseObject = __value_400,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
+ // Validation Error
+ if ((int)__response.StatusCode == 422)
+ {
+ string? __content_422 = null;
+ global::DeepInfra.HTTPValidationError? __value_422 = null;
+ if (ReadResponseAsString)
+ {
+ __content_422 = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
+ __value_422 = global::DeepInfra.HTTPValidationError.FromJson(__content_422, JsonSerializerContext);
+ }
+ else
+ {
+ var __contentStream_422 = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
+ __value_422 = await global::DeepInfra.HTTPValidationError.FromJsonStreamAsync(__contentStream_422, JsonSerializerContext).ConfigureAwait(false);
+ }
+
+ throw new global::DeepInfra.ApiException(
+ message: __response.ReasonPhrase ?? string.Empty,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content_422,
+ ResponseObject = __value_422,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
+
+ if (ReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessUploadLoraModelResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ }
+ catch (global::System.Net.Http.HttpRequestException __ex)
+ {
+ throw new global::DeepInfra.ApiException(
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ statusCode: __response.StatusCode)
+ {
+ ResponseBody = __content,
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
+
+ return
+ global::DeepInfra.ModelOut.FromJson(__content, JsonSerializerContext) ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ }
+ catch (global::System.Net.Http.HttpRequestException __ex)
+ {
+ throw new global::DeepInfra.ApiException(
+ message: __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ statusCode: __response.StatusCode)
+ {
+ ResponseHeaders = global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value),
+ };
+ }
+
+ using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);
+
+ return
+ await global::DeepInfra.ModelOut.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ }
+ }
+
+ ///
+ /// Upload Lora Model
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// The token to cancel the operation with
+ ///
+ public async global::System.Threading.Tasks.Task UploadLoraModelAsync(
+ string hfModelName,
+ string loraModelName,
+ string? xiApiKey = default,
+ string? hfToken = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __request = new global::DeepInfra.LoraModelUploadIn
+ {
+ HfModelName = hfModelName,
+ HfToken = hfToken,
+ LoraModelName = loraModelName,
+ };
+
+ return await UploadLoraModelAsync(
+ xiApiKey: xiApiKey,
+ request: __request,
+ cancellationToken: cancellationToken).ConfigureAwait(false);
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.DeleteLoraModel.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.DeleteLoraModel.g.cs
new file mode 100644
index 0000000..b406c55
--- /dev/null
+++ b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.DeleteLoraModel.g.cs
@@ -0,0 +1,19 @@
+#nullable enable
+
+namespace DeepInfra
+{
+ public partial interface IDeepInfraApi
+ {
+ ///
+ /// Delete Lora Model
+ ///
+ ///
+ ///
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task DeleteLoraModelAsync(
+ string loraModelName,
+ string? xiApiKey = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.UploadLoraModel.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.UploadLoraModel.g.cs
new file mode 100644
index 0000000..456d363
--- /dev/null
+++ b/src/libs/DeepInfra/Generated/DeepInfra.IDeepInfraApi.UploadLoraModel.g.cs
@@ -0,0 +1,35 @@
+#nullable enable
+
+namespace DeepInfra
+{
+ public partial interface IDeepInfraApi
+ {
+ ///
+ /// Upload Lora Model
+ ///
+ ///
+ ///
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task UploadLoraModelAsync(
+ global::DeepInfra.LoraModelUploadIn request,
+ string? xiApiKey = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+
+ ///
+ /// Upload Lora Model
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task UploadLoraModelAsync(
+ string hfModelName,
+ string loraModelName,
+ string? xiApiKey = default,
+ string? hfToken = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.DeleteLoraModelLoraModelLoraModelNameDeleteResponse.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeleteLoraModelLoraModelLoraModelNameDeleteResponse.Json.g.cs
new file mode 100644
index 0000000..f99eddc
--- /dev/null
+++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeleteLoraModelLoraModelLoraModelNameDeleteResponse.Json.g.cs
@@ -0,0 +1,92 @@
+#nullable enable
+
+namespace DeepInfra
+{
+ public sealed partial class DeleteLoraModelLoraModelLoraModelNameDeleteResponse
+ {
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
+ ///
+ public string ToJson(
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ this.GetType(),
+ jsonSerializerContext);
+ }
+
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public string ToJson(
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerContext.
+ ///
+ public static global::DeepInfra.DeleteLoraModelLoraModelLoraModelNameDeleteResponse? FromJson(
+ string json,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ typeof(global::DeepInfra.DeleteLoraModelLoraModelLoraModelNameDeleteResponse),
+ jsonSerializerContext) as global::DeepInfra.DeleteLoraModelLoraModelLoraModelNameDeleteResponse;
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::DeepInfra.DeleteLoraModelLoraModelLoraModelNameDeleteResponse? FromJson(
+ string json,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerContext.
+ ///
+ public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ typeof(global::DeepInfra.DeleteLoraModelLoraModelLoraModelNameDeleteResponse),
+ jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.DeleteLoraModelLoraModelLoraModelNameDeleteResponse;
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ return global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ jsonSerializerOptions);
+ }
+ }
+}
diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.DeleteLoraModelLoraModelLoraModelNameDeleteResponse.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeleteLoraModelLoraModelLoraModelNameDeleteResponse.g.cs
new file mode 100644
index 0000000..69df5fb
--- /dev/null
+++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.DeleteLoraModelLoraModelLoraModelNameDeleteResponse.g.cs
@@ -0,0 +1,27 @@
+
+#nullable enable
+
+namespace DeepInfra
+{
+ ///
+ ///
+ ///
+ public sealed partial class DeleteLoraModelLoraModelLoraModelNameDeleteResponse
+ {
+
+ ///
+ /// Additional properties that are not explicitly defined in the schema
+ ///
+ [global::System.Text.Json.Serialization.JsonExtensionData]
+ public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary();
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
+ public DeleteLoraModelLoraModelLoraModelNameDeleteResponse(
+ )
+ {
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.LoraModelUploadIn.Json.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.LoraModelUploadIn.Json.g.cs
new file mode 100644
index 0000000..ac0ec48
--- /dev/null
+++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.LoraModelUploadIn.Json.g.cs
@@ -0,0 +1,92 @@
+#nullable enable
+
+namespace DeepInfra
+{
+ public sealed partial class LoraModelUploadIn
+ {
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerContext.
+ ///
+ public string ToJson(
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ this.GetType(),
+ jsonSerializerContext);
+ }
+
+ ///
+ /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public string ToJson(
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ return global::System.Text.Json.JsonSerializer.Serialize(
+ this,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerContext.
+ ///
+ public static global::DeepInfra.LoraModelUploadIn? FromJson(
+ string json,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ typeof(global::DeepInfra.LoraModelUploadIn),
+ jsonSerializerContext) as global::DeepInfra.LoraModelUploadIn;
+ }
+
+ ///
+ /// Deserializes a JSON string using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::DeepInfra.LoraModelUploadIn? FromJson(
+ string json,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ return global::System.Text.Json.JsonSerializer.Deserialize(
+ json,
+ jsonSerializerOptions);
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerContext.
+ ///
+ public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext)
+ {
+ return (await global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ typeof(global::DeepInfra.LoraModelUploadIn),
+ jsonSerializerContext).ConfigureAwait(false)) as global::DeepInfra.LoraModelUploadIn;
+ }
+
+ ///
+ /// Deserializes a JSON stream using the provided JsonSerializerOptions.
+ ///
+#if NET8_0_OR_GREATER
+ [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
+ [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
+#endif
+ public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync(
+ global::System.IO.Stream jsonStream,
+ global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null)
+ {
+ return global::System.Text.Json.JsonSerializer.DeserializeAsync(
+ jsonStream,
+ jsonSerializerOptions);
+ }
+ }
+}
diff --git a/src/libs/DeepInfra/Generated/DeepInfra.Models.LoraModelUploadIn.g.cs b/src/libs/DeepInfra/Generated/DeepInfra.Models.LoraModelUploadIn.g.cs
new file mode 100644
index 0000000..3d17526
--- /dev/null
+++ b/src/libs/DeepInfra/Generated/DeepInfra.Models.LoraModelUploadIn.g.cs
@@ -0,0 +1,61 @@
+
+#nullable enable
+
+namespace DeepInfra
+{
+ ///
+ ///
+ ///
+ public sealed partial class LoraModelUploadIn
+ {
+ ///
+ ///
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("hf_model_name")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required string HfModelName { get; set; }
+
+ ///
+ ///
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("hf_token")]
+ public string? HfToken { get; set; }
+
+ ///
+ ///
+ ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("lora_model_name")]
+ [global::System.Text.Json.Serialization.JsonRequired]
+ public required string LoraModelName { get; set; }
+
+ ///
+ /// Additional properties that are not explicitly defined in the schema
+ ///
+ [global::System.Text.Json.Serialization.JsonExtensionData]
+ public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary();
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ ///
+ ///
+ ///
+ [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
+ public LoraModelUploadIn(
+ string hfModelName,
+ string loraModelName,
+ string? hfToken)
+ {
+ this.HfModelName = hfModelName ?? throw new global::System.ArgumentNullException(nameof(hfModelName));
+ this.LoraModelName = loraModelName ?? throw new global::System.ArgumentNullException(nameof(loraModelName));
+ this.HfToken = hfToken;
+ }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public LoraModelUploadIn()
+ {
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/DeepInfra/Generated/JsonSerializerContextTypes.g.cs b/src/libs/DeepInfra/Generated/JsonSerializerContextTypes.g.cs
index fc4c62f..a209e57 100644
--- a/src/libs/DeepInfra/Generated/JsonSerializerContextTypes.g.cs
+++ b/src/libs/DeepInfra/Generated/JsonSerializerContextTypes.g.cs
@@ -426,202 +426,206 @@ public sealed partial class JsonSerializerContextTypes
///
///
///
- public global::DeepInfra.Me? Type102 { get; set; }
+ public global::DeepInfra.LoraModelUploadIn? Type102 { get; set; }
///
///
///
- public global::DeepInfra.MeIn? Type103 { get; set; }
+ public global::DeepInfra.Me? Type103 { get; set; }
///
///
///
- public global::DeepInfra.MeUsername? Type104 { get; set; }
+ public global::DeepInfra.MeIn? Type104 { get; set; }
///
///
///
- public global::DeepInfra.ModelDocBlock? Type105 { get; set; }
+ public global::DeepInfra.MeUsername? Type105 { get; set; }
///
///
///
- public global::DeepInfra.ModelDocBlockKey? Type106 { get; set; }
+ public global::DeepInfra.ModelDocBlock? Type106 { get; set; }
///
///
///
- public global::DeepInfra.ModelFieldInfo? Type107 { get; set; }
+ public global::DeepInfra.ModelDocBlockKey? Type107 { get; set; }
///
///
///
- public global::DeepInfra.ModelInfoOut? Type108 { get; set; }
+ public global::DeepInfra.ModelFieldInfo? Type108 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type109 { get; set; }
+ public global::DeepInfra.ModelInfoOut? Type109 { get; set; }
///
///
///
- public global::DeepInfra.AnyOf? Type110 { get; set; }
+ public global::System.Collections.Generic.IList? Type110 { get; set; }
///
///
///
- public global::DeepInfra.ModelPricingTime? Type111 { get; set; }
+ public global::DeepInfra.AnyOf? Type111 { get; set; }
///
///
///
- public global::DeepInfra.ModelPricingUptime? Type112 { get; set; }
+ public global::DeepInfra.ModelPricingTime? Type112 { get; set; }
///
///
///
- public global::DeepInfra.ModelPricingTokens? Type113 { get; set; }
+ public global::DeepInfra.ModelPricingUptime? Type113 { get; set; }
///
///
///
- public global::DeepInfra.ModelPricingInputLength? Type114 { get; set; }
+ public global::DeepInfra.ModelPricingTokens? Type114 { get; set; }
///
///
///
- public global::DeepInfra.ModelPricingInputTokens? Type115 { get; set; }
+ public global::DeepInfra.ModelPricingInputLength? Type115 { get; set; }
///
///
///
- public global::DeepInfra.ModelPricingInputCharacterLength? Type116 { get; set; }
+ public global::DeepInfra.ModelPricingInputTokens? Type116 { get; set; }
///
///
///
- public global::DeepInfra.ModelPricingImageUnits? Type117 { get; set; }
+ public global::DeepInfra.ModelPricingInputCharacterLength? Type117 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type118 { get; set; }
+ public global::DeepInfra.ModelPricingImageUnits? Type118 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type119 { get; set; }
+ public global::System.Collections.Generic.IList? Type119 { get; set; }
///
///
///
- public global::DeepInfra.SchemaVariant? Type120 { get; set; }
+ public global::System.Collections.Generic.IList? Type120 { get; set; }
///
///
///
- public global::DeepInfra.SchemaVariantKey? Type121 { get; set; }
+ public global::DeepInfra.SchemaVariant? Type121 { get; set; }
///
///
///
- public global::DeepInfra.ModelMetaIn? Type122 { get; set; }
+ public global::DeepInfra.SchemaVariantKey? Type122 { get; set; }
///
///
///
- public global::DeepInfra.ModelOut? Type123 { get; set; }
+ public global::DeepInfra.ModelMetaIn? Type123 { get; set; }
///
///
///
- public global::DeepInfra.AnyOf? Type124 { get; set; }
+ public global::DeepInfra.ModelOut? Type124 { get; set; }
///
///
///
- public global::DeepInfra.ModelPublicityIn? Type125 { get; set; }
+ public global::DeepInfra.AnyOf? Type125 { get; set; }
///
///
///
- public global::DeepInfra.ModelVersionOut? Type126 { get; set; }
+ public global::DeepInfra.ModelPublicityIn? Type126 { get; set; }
///
///
///
- public global::DeepInfra.OpenAIChatCompletionsIn? Type127 { get; set; }
+ public global::DeepInfra.ModelVersionOut? Type127 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList>? Type128 { get; set; }
+ public global::DeepInfra.OpenAIChatCompletionsIn? Type128 { get; set; }
///
///
///
- public global::DeepInfra.AnyOf? Type129 { get; set; }
+ public global::System.Collections.Generic.IList>? Type129 { get; set; }
///
///
///
- public global::DeepInfra.AnyOf>? Type130 { get; set; }
+ public global::DeepInfra.AnyOf? Type130 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type131 { get; set; }
+ public global::DeepInfra.AnyOf>? Type131 { get; set; }
///
///
///
- public global::DeepInfra.ResponseFormat? Type132 { get; set; }
+ public global::System.Collections.Generic.IList? Type132 { get; set; }
///
///
///
- public global::DeepInfra.ResponseFormatType? Type133 { get; set; }
+ public global::DeepInfra.ResponseFormat? Type133 { get; set; }
///
///
///
- public global::DeepInfra.OpenAICompletionsIn? Type134 { get; set; }
+ public global::DeepInfra.ResponseFormatType? Type134 { get; set; }
///
///
///
- public global::DeepInfra.OpenAIEmbeddingsIn? Type135 { get; set; }
+ public global::DeepInfra.OpenAICompletionsIn? Type135 { get; set; }
///
///
///
- public global::DeepInfra.AnyOf, string>? Type136 { get; set; }
+ public global::DeepInfra.OpenAIEmbeddingsIn? Type136 { get; set; }
///
///
///
- public global::DeepInfra.OpenAIEmbeddingsInEncodingFormat? Type137 { get; set; }
+ public global::DeepInfra.AnyOf, string>? Type137 { get; set; }
///
///
///
- public global::DeepInfra.OpenAIModelOut? Type138 { get; set; }
+ public global::DeepInfra.OpenAIEmbeddingsInEncodingFormat? Type138 { get; set; }
///
///
///
- public global::DeepInfra.OpenAIModelsOut? Type139 { get; set; }
+ public global::DeepInfra.OpenAIModelOut? Type139 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type140 { get; set; }
+ public global::DeepInfra.OpenAIModelsOut? Type140 { get; set; }
///
///
///
- public global::DeepInfra.OpenAITextToSpeechIn? Type141 { get; set; }
+ public global::System.Collections.Generic.IList? Type141 { get; set; }
///
///
///
- public global::DeepInfra.TtsVoice? Type142 { get; set; }
+ public global::DeepInfra.OpenAITextToSpeechIn? Type142 { get; set; }
///
///
///
- public global::DeepInfra.RateLimitOut? Type143 { get; set; }
+ public global::DeepInfra.TtsVoice? Type143 { get; set; }
///
///
///
- public global::DeepInfra.RateLimitRequestIn? Type144 { get; set; }
+ public global::DeepInfra.RateLimitOut? Type144 { get; set; }
///
///
///
- public global::DeepInfra.SchemaFieldOut? Type145 { get; set; }
+ public global::DeepInfra.RateLimitRequestIn? Type145 { get; set; }
///
///
///
- public global::DeepInfra.SchemaOut? Type146 { get; set; }
+ public global::DeepInfra.SchemaFieldOut? Type146 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type147 { get; set; }
+ public global::DeepInfra.SchemaOut? Type147 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type148 { get; set; }
+ public global::System.Collections.Generic.IList? Type148 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type149 { get; set; }
+ public global::System.Collections.Generic.IList? Type149 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type150 { get; set; }
+ public global::System.Collections.Generic.IList? Type150 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type151 { get; set; }
+ public global::System.Collections.Generic.IList? Type151 { get; set; }
+ ///
+ ///
+ ///
+ public global::System.Collections.Generic.IList? Type152 { get; set; }
}
}
\ No newline at end of file
diff --git a/src/libs/DeepInfra/openapi.yaml b/src/libs/DeepInfra/openapi.yaml
index defab70..9986a4a 100644
--- a/src/libs/DeepInfra/openapi.yaml
+++ b/src/libs/DeepInfra/openapi.yaml
@@ -792,6 +792,79 @@ paths:
$ref: '#/components/schemas/HTTPValidationError'
security:
- HTTPBearer: [ ]
+ /lora-model:
+ post:
+ summary: Upload Lora Model
+ operationId: upload_lora_model_lora_model_post
+ parameters:
+ - name: xi-api-key
+ in: header
+ schema:
+ title: Xi-Api-Key
+ type: string
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/LoraModelUploadIn'
+ required: true
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ModelOut'
+ '400':
+ description: Bad Request
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DeepError'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ security:
+ - HTTPBearer: [ ]
+ '/lora-model/{lora_model_name}':
+ delete:
+ summary: Delete Lora Model
+ operationId: delete_lora_model_lora_model__lora_model_name__delete
+ parameters:
+ - name: lora_model_name
+ in: path
+ required: true
+ schema:
+ title: Lora Model Name
+ type: string
+ - name: xi-api-key
+ in: header
+ schema:
+ title: Xi-Api-Key
+ type: string
+ responses:
+ '200':
+ description: Successful Response
+ content:
+ application/json:
+ schema: { }
+ '400':
+ description: Bad Request
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/DeepError'
+ '422':
+ description: Validation Error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HTTPValidationError'
+ security:
+ - HTTPBearer: [ ]
/models/list:
get:
summary: Models List
@@ -3578,6 +3651,22 @@ components:
items:
title: type
description: list of log lines ordered by increasing timestamp
+ LoraModelUploadIn:
+ title: LoraModelUploadIn
+ required:
+ - hf_model_name
+ - lora_model_name
+ type: object
+ properties:
+ hf_model_name:
+ title: Hf Model Name
+ type: string
+ hf_token:
+ title: Hf Token
+ type: string
+ lora_model_name:
+ title: Lora Model Name
+ type: string
Me:
title: Me
required: