Skip to content

Commit

Permalink
Merge pull request #7 from tryAGI/bot/update-openapi_202409200123
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Sep 20, 2024
2 parents 3462df1 + 668e266 commit a177b40
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ public partial interface IVisionClient
/// <param name="cancellationToken">The token to cancel the operation with</param>
/// <exception cref="global::System.InvalidOperationException"></exception>
global::System.Threading.Tasks.Task<global::Ideogram.DescribeResponse> PostDescribeAsync(
byte[]? imageFile = default,
string? imageFilename = default,
byte[] imageFile,
string imageFilename,
global::System.Threading.CancellationToken cancellationToken = default);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@ public sealed partial class DescribeRequest
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("image_file")]
public byte[]? ImageFile { get; set; }
[global::System.Text.Json.Serialization.JsonRequired]
public required byte[] ImageFile { get; set; }

/// <summary>
///
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("image_filename")]
public string? ImageFilename { get; set; }
[global::System.Text.Json.Serialization.JsonRequired]
public required string ImageFilename { get; set; }

/// <summary>
/// Additional properties that are not explicitly defined in the schema
Expand Down
6 changes: 6 additions & 0 deletions src/libs/Ideogram/Generated/Ideogram.Models.StyleType.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ namespace Ideogram
/// </summary>
public enum StyleType
{
/// <summary>
///
/// </summary>
AUTO,
/// <summary>
///
/// </summary>
Expand Down Expand Up @@ -43,6 +47,7 @@ public static string ToValueString(this StyleType value)
{
return value switch
{
StyleType.AUTO => "AUTO",
StyleType.GENERAL => "GENERAL",
StyleType.REALISTIC => "REALISTIC",
StyleType.DESIGN => "DESIGN",
Expand All @@ -58,6 +63,7 @@ public static string ToValueString(this StyleType value)
{
return value switch
{
"AUTO" => StyleType.AUTO,
"GENERAL" => StyleType.GENERAL,
"REALISTIC" => StyleType.REALISTIC,
"DESIGN" => StyleType.DESIGN,
Expand Down
23 changes: 10 additions & 13 deletions src/libs/Ideogram/Generated/Ideogram.VisionClient.PostDescribe.g.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,16 @@ partial void ProcessPostDescribeResponseContent(
method: global::System.Net.Http.HttpMethod.Post,
requestUri: new global::System.Uri(_httpClient.BaseAddress?.AbsoluteUri.TrimEnd('/') + "/describe", global::System.UriKind.RelativeOrAbsolute));
using var __httpRequestContent = new global::System.Net.Http.MultipartFormDataContent();
if (request.ImageFile != default)
{
__httpRequestContent.Add(
content: new global::System.Net.Http.ByteArrayContent(request.ImageFile ?? global::System.Array.Empty<byte>())
__httpRequestContent.Add(
content: new global::System.Net.Http.ByteArrayContent(request.ImageFile ?? global::System.Array.Empty<byte>())
{
Headers =
{
Headers =
{
ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("multipart/form-data"),
},
ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("multipart/form-data"),
},
name: "image_file",
fileName: request.ImageFilename ?? string.Empty);
}
},
name: "image_file",
fileName: request.ImageFilename ?? string.Empty);
httpRequest.Content = __httpRequestContent;

PrepareRequest(
Expand Down Expand Up @@ -111,8 +108,8 @@ partial void ProcessPostDescribeResponseContent(
/// <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::Ideogram.DescribeResponse> PostDescribeAsync(
byte[]? imageFile = default,
string? imageFilename = default,
byte[] imageFile,
string imageFilename,
global::System.Threading.CancellationToken cancellationToken = default)
{
var request = new global::Ideogram.DescribeRequest
Expand Down
5 changes: 5 additions & 0 deletions src/libs/Ideogram/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ paths:
description: Not authorized
'402':
description: Payment is required; is your payment method setup?
'404':
description: User does not have a subscription to reactivate.
security:
- BearerAuth: [ ]
x-openapi-router-controller: external_api.generated.openapi.controllers.manage_controller
Expand Down Expand Up @@ -374,6 +376,8 @@ components:
- text: 'A meticulously illustrated cat with striped patterns, sitting upright. The cat''s eyes are a captivating shade of yellow, and it appears to be gazing intently at something. The background consists of abstract, swirling patterns in shades of black, white, and beige, creating an almost fluid or wavy appearance. The cat is positioned in the foreground, with the background elements fading into the distance, giving a sense of depth to the image.'
- text: 'A meticulously illustrated cat with striped patterns, sitting upright. The cat''s eyes are a captivating shade of yellow, and it appears to be gazing intently at something. The background consists of abstract, swirling patterns in shades of black, white, and beige, creating an almost fluid or wavy appearance. The cat is positioned in the foreground, with the background elements fading into the distance, giving a sense of depth to the image.'
DescribeRequest:
required:
- image_file
type: object
properties:
image_file:
Expand Down Expand Up @@ -943,6 +947,7 @@ components:
StyleType:
title: StyleType
enum:
- AUTO
- GENERAL
- REALISTIC
- DESIGN
Expand Down

0 comments on commit a177b40

Please sign in to comment.