Skip to content

Commit

Permalink
Merge pull request #45 from tryAGI/bot/update-openapi_202411131828
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Nov 13, 2024
2 parents 65f106a + 4e8d779 commit 3d70136
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,10 @@ partial void ProcessGenerateTextResponseContent(
};
}

using var __responseStream = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

var __responseValue = await global::System.Text.Json.JsonSerializer.DeserializeAsync(__responseStream, typeof(global::System.Collections.Generic.IList<global::HuggingFace.GenerateTextResponseValue>), JsonSerializerContext).ConfigureAwait(false) as global::System.Collections.Generic.IList<global::HuggingFace.GenerateTextResponseValue>;
using var __content = await __response.Content.ReadAsStreamAsync(cancellationToken).ConfigureAwait(false);

return
__responseValue ??
await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList<global::HuggingFace.GenerateTextResponseValue>), JsonSerializerContext).ConfigureAwait(false) as global::System.Collections.Generic.IList<global::HuggingFace.GenerateTextResponseValue> ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public sealed partial class ErrorResponse
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("error")]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::HuggingFace.JsonConverters.AnyOfJsonConverterFactory2))]
[global::System.Text.Json.Serialization.JsonConverter(typeof(global::HuggingFace.JsonConverters.AnyOfJsonConverter<string, global::System.Collections.Generic.IList<string>>))]
[global::System.Text.Json.Serialization.JsonRequired]
public required global::HuggingFace.AnyOf<string, global::System.Collections.Generic.IList<string>> Error { get; set; }

Expand Down
25 changes: 0 additions & 25 deletions src/libs/HuggingFace/Generated/JsonConverters.AnyOfFactory2.g.cs

This file was deleted.

2 changes: 1 addition & 1 deletion src/libs/HuggingFace/Generated/JsonSerializerContext.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace HuggingFace
DefaultIgnoreCondition = global::System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull,
Converters = new global::System.Type[]
{
typeof(global::HuggingFace.JsonConverters.AnyOfJsonConverterFactory2),
typeof(global::HuggingFace.JsonConverters.AnyOfJsonConverter<string, global::System.Collections.Generic.IList<string>>),
})]

[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::HuggingFace.JsonSerializerContextTypes))]
Expand Down

0 comments on commit 3d70136

Please sign in to comment.