@@ -4897,6 +4897,135 @@ public class FunctionTool : ResponseTool, IJsonModel<FunctionTool>, IPersistable
48974897 public override readonly string ToString ( ) ;
48984898 }
48994899 [ Experimental ( "OPENAI001" ) ]
4900+ public class ImageGenerationCallResponseItem : ResponseItem , IJsonModel < ImageGenerationCallResponseItem > , IPersistableModel < ImageGenerationCallResponseItem > {
4901+ public ImageGenerationCallResponseItem ( ImageGenerationCallStatus status , string result ) ;
4902+ public string Result { get ; set ; }
4903+ public ImageGenerationCallStatus Status { get ; set ; }
4904+ protected override ResponseItem JsonModelCreateCore ( ref Utf8JsonReader reader , ModelReaderWriterOptions options ) ;
4905+ protected override void JsonModelWriteCore ( Utf8JsonWriter writer , ModelReaderWriterOptions options ) ;
4906+ protected override ResponseItem PersistableModelCreateCore ( BinaryData data , ModelReaderWriterOptions options ) ;
4907+ protected override BinaryData PersistableModelWriteCore ( ModelReaderWriterOptions options ) ;
4908+ }
4909+ [ Experimental ( "OPENAI001" ) ]
4910+ public enum ImageGenerationCallStatus {
4911+ InProgress = 0 ,
4912+ Completed = 1 ,
4913+ Generating = 2 ,
4914+ Failed = 3
4915+ }
4916+ [ Experimental ( "OPENAI001" ) ]
4917+ public class ImageGenerationTool : ResponseTool , IJsonModel < ImageGenerationTool > , IPersistableModel < ImageGenerationTool > {
4918+ public ImageGenerationTool ( ) ;
4919+ public ImageGenerationToolBackground ? Background { get ; set ; }
4920+ public ImageGenerationToolInputImageMask InputImageMask { get ; set ; }
4921+ public string Model { get ; set ; }
4922+ public ImageGenerationToolModeration ? Moderation { get ; set ; }
4923+ public int ? OutputCompression { get ; set ; }
4924+ public ImageGenerationToolOutputFormat ? OutputFormat { get ; set ; }
4925+ public int ? PartialImages { get ; set ; }
4926+ public ImageGenerationToolQuality ? Quality { get ; set ; }
4927+ public ImageGenerationToolSize ? Size { get ; set ; }
4928+ protected override ResponseTool JsonModelCreateCore ( ref Utf8JsonReader reader , ModelReaderWriterOptions options ) ;
4929+ protected override void JsonModelWriteCore ( Utf8JsonWriter writer , ModelReaderWriterOptions options ) ;
4930+ protected override ResponseTool PersistableModelCreateCore ( BinaryData data , ModelReaderWriterOptions options ) ;
4931+ protected override BinaryData PersistableModelWriteCore ( ModelReaderWriterOptions options ) ;
4932+ }
4933+ [ Experimental ( "OPENAI001" ) ]
4934+ public readonly partial struct ImageGenerationToolBackground : IEquatable < ImageGenerationToolBackground > {
4935+ public ImageGenerationToolBackground ( string value ) ;
4936+ public static ImageGenerationToolBackground Auto { get ; }
4937+ public static ImageGenerationToolBackground Opaque { get ; }
4938+ public static ImageGenerationToolBackground Transparent { get ; }
4939+ public readonly bool Equals ( ImageGenerationToolBackground other ) ;
4940+ [ EditorBrowsable ( EditorBrowsableState . Never ) ]
4941+ public override readonly bool Equals ( object obj ) ;
4942+ [ EditorBrowsable ( EditorBrowsableState . Never ) ]
4943+ public override readonly int GetHashCode ( ) ;
4944+ public static bool operator == ( ImageGenerationToolBackground left , ImageGenerationToolBackground right ) ;
4945+ public static implicit operator ImageGenerationToolBackground ( string value ) ;
4946+ public static implicit operator ImageGenerationToolBackground ? ( string value ) ;
4947+ public static bool operator != ( ImageGenerationToolBackground left , ImageGenerationToolBackground right ) ;
4948+ public override readonly string ToString ( ) ;
4949+ }
4950+ [ Experimental ( "OPENAI001" ) ]
4951+ public class ImageGenerationToolInputImageMask : IJsonModel < ImageGenerationToolInputImageMask > , IPersistableModel < ImageGenerationToolInputImageMask > {
4952+ public string FileId { get ; set ; }
4953+ public string ImageUrl { get ; set ; }
4954+ protected virtual ImageGenerationToolInputImageMask JsonModelCreateCore ( ref Utf8JsonReader reader , ModelReaderWriterOptions options ) ;
4955+ protected virtual void JsonModelWriteCore ( Utf8JsonWriter writer , ModelReaderWriterOptions options ) ;
4956+ protected virtual ImageGenerationToolInputImageMask PersistableModelCreateCore ( BinaryData data , ModelReaderWriterOptions options ) ;
4957+ protected virtual BinaryData PersistableModelWriteCore ( ModelReaderWriterOptions options ) ;
4958+ }
4959+ [ Experimental ( "OPENAI001" ) ]
4960+ public readonly partial struct ImageGenerationToolModeration : IEquatable < ImageGenerationToolModeration > {
4961+ public ImageGenerationToolModeration ( string value ) ;
4962+ public static ImageGenerationToolModeration Auto { get ; }
4963+ public static ImageGenerationToolModeration Low { get ; }
4964+ public readonly bool Equals ( ImageGenerationToolModeration other ) ;
4965+ [ EditorBrowsable ( EditorBrowsableState . Never ) ]
4966+ public override readonly bool Equals ( object obj ) ;
4967+ [ EditorBrowsable ( EditorBrowsableState . Never ) ]
4968+ public override readonly int GetHashCode ( ) ;
4969+ public static bool operator == ( ImageGenerationToolModeration left , ImageGenerationToolModeration right ) ;
4970+ public static implicit operator ImageGenerationToolModeration ( string value ) ;
4971+ public static implicit operator ImageGenerationToolModeration ? ( string value ) ;
4972+ public static bool operator != ( ImageGenerationToolModeration left , ImageGenerationToolModeration right ) ;
4973+ public override readonly string ToString ( ) ;
4974+ }
4975+ [ Experimental ( "OPENAI001" ) ]
4976+ public readonly partial struct ImageGenerationToolOutputFormat : IEquatable < ImageGenerationToolOutputFormat > {
4977+ public ImageGenerationToolOutputFormat ( string value ) ;
4978+ public static ImageGenerationToolOutputFormat Jpeg { get ; }
4979+ public static ImageGenerationToolOutputFormat Png { get ; }
4980+ public static ImageGenerationToolOutputFormat Webp { get ; }
4981+ public readonly bool Equals ( ImageGenerationToolOutputFormat other ) ;
4982+ [ EditorBrowsable ( EditorBrowsableState . Never ) ]
4983+ public override readonly bool Equals ( object obj ) ;
4984+ [ EditorBrowsable ( EditorBrowsableState . Never ) ]
4985+ public override readonly int GetHashCode ( ) ;
4986+ public static bool operator == ( ImageGenerationToolOutputFormat left , ImageGenerationToolOutputFormat right ) ;
4987+ public static implicit operator ImageGenerationToolOutputFormat ( string value ) ;
4988+ public static implicit operator ImageGenerationToolOutputFormat ? ( string value ) ;
4989+ public static bool operator != ( ImageGenerationToolOutputFormat left , ImageGenerationToolOutputFormat right ) ;
4990+ public override readonly string ToString ( ) ;
4991+ }
4992+ [ Experimental ( "OPENAI001" ) ]
4993+ public readonly partial struct ImageGenerationToolQuality : IEquatable < ImageGenerationToolQuality > {
4994+ public ImageGenerationToolQuality ( string value ) ;
4995+ public static ImageGenerationToolQuality Auto { get ; }
4996+ public static ImageGenerationToolQuality High { get ; }
4997+ public static ImageGenerationToolQuality Low { get ; }
4998+ public static ImageGenerationToolQuality Medium { get ; }
4999+ public readonly bool Equals ( ImageGenerationToolQuality other ) ;
5000+ [ EditorBrowsable ( EditorBrowsableState . Never ) ]
5001+ public override readonly bool Equals ( object obj ) ;
5002+ [ EditorBrowsable ( EditorBrowsableState . Never ) ]
5003+ public override readonly int GetHashCode ( ) ;
5004+ public static bool operator == ( ImageGenerationToolQuality left , ImageGenerationToolQuality right ) ;
5005+ public static implicit operator ImageGenerationToolQuality ( string value ) ;
5006+ public static implicit operator ImageGenerationToolQuality ? ( string value ) ;
5007+ public static bool operator != ( ImageGenerationToolQuality left , ImageGenerationToolQuality right ) ;
5008+ public override readonly string ToString ( ) ;
5009+ }
5010+ [ Experimental ( "OPENAI001" ) ]
5011+ public readonly partial struct ImageGenerationToolSize : IEquatable < ImageGenerationToolSize > {
5012+ public ImageGenerationToolSize ( string value ) ;
5013+ public static ImageGenerationToolSize _1024x1024 { get ; }
5014+ public static ImageGenerationToolSize _1024x1536 { get ; }
5015+ public static ImageGenerationToolSize _1536x1024 { get ; }
5016+ public static ImageGenerationToolSize Auto { get ; }
5017+ public readonly bool Equals ( ImageGenerationToolSize other ) ;
5018+ [ EditorBrowsable ( EditorBrowsableState . Never ) ]
5019+ public override readonly bool Equals ( object obj ) ;
5020+ [ EditorBrowsable ( EditorBrowsableState . Never ) ]
5021+ public override readonly int GetHashCode ( ) ;
5022+ public static bool operator == ( ImageGenerationToolSize left , ImageGenerationToolSize right ) ;
5023+ public static implicit operator ImageGenerationToolSize ( string value ) ;
5024+ public static implicit operator ImageGenerationToolSize ? ( string value ) ;
5025+ public static bool operator != ( ImageGenerationToolSize left , ImageGenerationToolSize right ) ;
5026+ public override readonly string ToString ( ) ;
5027+ }
5028+ [ Experimental ( "OPENAI001" ) ]
49005029 public class McpTool : ResponseTool , IJsonModel < McpTool > , IPersistableModel < McpTool > {
49015030 public McpTool ( string serverLabel , Uri serverUri ) ;
49025031 public McpToolFilter AllowedTools { get ; set ; }
@@ -5491,6 +5620,7 @@ public class ResponseTool : IJsonModel<ResponseTool>, IPersistableModel<Response
54915620 public static ComputerTool CreateComputerTool ( ComputerToolEnvironment environment , int displayWidth , int displayHeight ) ;
54925621 public static FileSearchTool CreateFileSearchTool ( IEnumerable < string > vectorStoreIds , int ? maxResultCount = null , FileSearchToolRankingOptions rankingOptions = null , BinaryData filters = null ) ;
54935622 public static FunctionTool CreateFunctionTool ( string functionName , BinaryData functionParameters , bool ? strictModeEnabled , string functionDescription = null ) ;
5623+ public static ImageGenerationTool CreateImageGenerationTool ( string model , ImageGenerationToolQuality ? quality = null , ImageGenerationToolSize ? size = null , ImageGenerationToolOutputFormat ? outputFormat = null , int ? outputCompression = null , ImageGenerationToolModeration ? moderation = null , ImageGenerationToolBackground ? background = null , ImageGenerationToolInputImageMask inputImageMask = null , int ? partialImages = null ) ;
54945624 public static McpTool CreateMcpTool ( string serverLabel , Uri serverUri , IDictionary < string , string > headers = null , McpToolFilter allowedTools = null , McpToolCallApprovalPolicy toolCallApprovalPolicy = null ) ;
54955625 public static WebSearchTool CreateWebSearchTool ( WebSearchToolLocation userLocation = null , WebSearchToolContextSize ? searchContextSize = null ) ;
54965626 protected virtual ResponseTool JsonModelCreateCore ( ref Utf8JsonReader reader , ModelReaderWriterOptions options ) ;
@@ -5642,6 +5772,44 @@ public class StreamingResponseFunctionCallArgumentsDoneUpdate : StreamingRespons
56425772 protected override BinaryData PersistableModelWriteCore ( ModelReaderWriterOptions options ) ;
56435773 }
56445774 [ Experimental ( "OPENAI001" ) ]
5775+ public class StreamingResponseImageGenerationCallCompletedUpdate : StreamingResponseUpdate , IJsonModel < StreamingResponseImageGenerationCallCompletedUpdate > , IPersistableModel < StreamingResponseImageGenerationCallCompletedUpdate > {
5776+ public string ItemId { get ; }
5777+ public int OutputIndex { get ; }
5778+ protected override StreamingResponseUpdate JsonModelCreateCore ( ref Utf8JsonReader reader , ModelReaderWriterOptions options ) ;
5779+ protected override void JsonModelWriteCore ( Utf8JsonWriter writer , ModelReaderWriterOptions options ) ;
5780+ protected override StreamingResponseUpdate PersistableModelCreateCore ( BinaryData data , ModelReaderWriterOptions options ) ;
5781+ protected override BinaryData PersistableModelWriteCore ( ModelReaderWriterOptions options ) ;
5782+ }
5783+ [ Experimental ( "OPENAI001" ) ]
5784+ public class StreamingResponseImageGenerationCallGeneratingUpdate : StreamingResponseUpdate , IJsonModel < StreamingResponseImageGenerationCallGeneratingUpdate > , IPersistableModel < StreamingResponseImageGenerationCallGeneratingUpdate > {
5785+ public string ItemId { get ; }
5786+ public int OutputIndex { get ; }
5787+ protected override StreamingResponseUpdate JsonModelCreateCore ( ref Utf8JsonReader reader , ModelReaderWriterOptions options ) ;
5788+ protected override void JsonModelWriteCore ( Utf8JsonWriter writer , ModelReaderWriterOptions options ) ;
5789+ protected override StreamingResponseUpdate PersistableModelCreateCore ( BinaryData data , ModelReaderWriterOptions options ) ;
5790+ protected override BinaryData PersistableModelWriteCore ( ModelReaderWriterOptions options ) ;
5791+ }
5792+ [ Experimental ( "OPENAI001" ) ]
5793+ public class StreamingResponseImageGenerationCallInProgressUpdate : StreamingResponseUpdate , IJsonModel < StreamingResponseImageGenerationCallInProgressUpdate > , IPersistableModel < StreamingResponseImageGenerationCallInProgressUpdate > {
5794+ public string ItemId { get ; }
5795+ public int OutputIndex { get ; }
5796+ protected override StreamingResponseUpdate JsonModelCreateCore ( ref Utf8JsonReader reader , ModelReaderWriterOptions options ) ;
5797+ protected override void JsonModelWriteCore ( Utf8JsonWriter writer , ModelReaderWriterOptions options ) ;
5798+ protected override StreamingResponseUpdate PersistableModelCreateCore ( BinaryData data , ModelReaderWriterOptions options ) ;
5799+ protected override BinaryData PersistableModelWriteCore ( ModelReaderWriterOptions options ) ;
5800+ }
5801+ [ Experimental ( "OPENAI001" ) ]
5802+ public class StreamingResponseImageGenerationCallPartialImageUpdate : StreamingResponseUpdate , IJsonModel < StreamingResponseImageGenerationCallPartialImageUpdate > , IPersistableModel < StreamingResponseImageGenerationCallPartialImageUpdate > {
5803+ public string ItemId { get ; }
5804+ public int OutputIndex { get ; }
5805+ public string PartialImageB64 { get ; }
5806+ public int PartialImageIndex { get ; }
5807+ protected override StreamingResponseUpdate JsonModelCreateCore ( ref Utf8JsonReader reader , ModelReaderWriterOptions options ) ;
5808+ protected override void JsonModelWriteCore ( Utf8JsonWriter writer , ModelReaderWriterOptions options ) ;
5809+ protected override StreamingResponseUpdate PersistableModelCreateCore ( BinaryData data , ModelReaderWriterOptions options ) ;
5810+ protected override BinaryData PersistableModelWriteCore ( ModelReaderWriterOptions options ) ;
5811+ }
5812+ [ Experimental ( "OPENAI001" ) ]
56455813 public class StreamingResponseIncompleteUpdate : StreamingResponseUpdate , IJsonModel < StreamingResponseIncompleteUpdate > , IPersistableModel < StreamingResponseIncompleteUpdate > {
56465814 public OpenAIResponse Response { get ; }
56475815 protected override StreamingResponseUpdate JsonModelCreateCore ( ref Utf8JsonReader reader , ModelReaderWriterOptions options ) ;
0 commit comments