Skip to content
This repository was archived by the owner on Feb 12, 2025. It is now read-only.

Commit 213e5ff

Browse files
committed
Changed classes name
1 parent 3611aa7 commit 213e5ff

File tree

5 files changed

+34
-41
lines changed

5 files changed

+34
-41
lines changed

ManagedCode.OpenAI/ImageGenerator/Models/CreateImageResult.cs

Lines changed: 0 additions & 13 deletions
This file was deleted.

ManagedCode.OpenAI/ImageGenerator/Models/ImageRequest.cs

Lines changed: 0 additions & 21 deletions
This file was deleted.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
using System.Text.Json.Serialization;
2+
using ManagedCode.OpenAI.ImageGenerator.Enums;
3+
using ManagedCode.OpenAI.Interfaces;
4+
5+
namespace ManagedCode.OpenAI.ImageGenerator;
6+
7+
public class ImageRequestOptions : ICloneable<ImageRequestOptions>, IDeepCloneable<ImageRequestOptions>
8+
{
9+
[JsonPropertyName("prompt")]
10+
public string Prompt { get; set; }
11+
12+
[JsonPropertyName("n")]
13+
public int? N { get; set; }
14+
15+
[JsonPropertyName("size")]
16+
public ImageResolution? Size { get; set; }
17+
18+
[JsonPropertyName("response_format")]
19+
public ImageFormat? ResponseFormat { get; set; }
20+
21+
[JsonPropertyName("user")]
22+
public string? User { get; set; }
23+
24+
public ImageRequestOptions Clone() => (ImageRequestOptions) MemberwiseClone();
25+
26+
public ImageRequestOptions DeepClone() => Clone();
27+
}
Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1+
using System.Collections.Generic;
12
using System.Text.Json.Serialization;
23

34
namespace ManagedCode.OpenAI.ImageGenerator;
45

5-
public class ImageResult
6+
public class ImageResult<T>
67
{
7-
[JsonPropertyName("url")]
8-
public string Url { get; set; }
9-
10-
[JsonPropertyName("b64_json")]
11-
public string Base64Json { get; set; }
8+
[JsonPropertyName("created")]
9+
public int Created { get; set; }
10+
11+
[JsonPropertyName("data")]
12+
public List<T> Data { get; set; }
1213
}

ManagedCode.OpenAI/ManagedCode.OpenAI.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
</PropertyGroup>
1818
<ItemGroup>
1919
<Folder Include="Files\Enums" />
20-
<Folder Include="ImageGenerator\Manager" />
2120
<Folder Include="Methods" />
2221
</ItemGroup>
2322

0 commit comments

Comments
 (0)