@@ -35,8 +35,8 @@ public class AssistantsApiToolChoiceOptionJsonConverter : global::System.Text.Js
3535 if ( __score0 > __bestScore ) { __bestScore = __score0 ; __bestIndex = 0 ; }
3636 if ( __score1 > __bestScore ) { __bestScore = __score1 ; __bestIndex = 1 ; }
3737
38- global ::tryAGI . OpenAI . AssistantsApiToolChoiceOptionEnum ? value1 = default ;
39- global ::tryAGI . OpenAI . AssistantsNamedToolChoice ? value2 = default ;
38+ global ::tryAGI . OpenAI . AssistantsApiToolChoiceOptionEnum ? @enum = default ;
39+ global ::tryAGI . OpenAI . AssistantsNamedToolChoice ? named = default ;
4040 if ( __bestIndex >= 0 )
4141 {
4242 if ( __bestIndex == 0 )
@@ -45,7 +45,7 @@ public class AssistantsApiToolChoiceOptionJsonConverter : global::System.Text.Js
4545 {
4646 var typeInfo = typeInfoResolver . GetTypeInfo ( typeof ( global ::tryAGI . OpenAI . AssistantsApiToolChoiceOptionEnum ) , options ) as global ::System . Text . Json . Serialization . Metadata . JsonTypeInfo < global ::tryAGI . OpenAI . AssistantsApiToolChoiceOptionEnum > ??
4747 throw new global ::System . InvalidOperationException ( $ "Cannot get type info for { typeof ( global ::tryAGI . OpenAI . AssistantsApiToolChoiceOptionEnum ) . Name } ") ;
48- value1 = global ::System . Text . Json . JsonSerializer . Deserialize ( __rawJson , typeInfo ) ;
48+ @enum = global ::System . Text . Json . JsonSerializer . Deserialize ( __rawJson , typeInfo ) ;
4949 }
5050 catch ( global ::System . Text . Json . JsonException )
5151 {
@@ -60,7 +60,7 @@ public class AssistantsApiToolChoiceOptionJsonConverter : global::System.Text.Js
6060 {
6161 var typeInfo = typeInfoResolver . GetTypeInfo ( typeof ( global ::tryAGI . OpenAI . AssistantsNamedToolChoice ) , options ) as global ::System . Text . Json . Serialization . Metadata . JsonTypeInfo < global ::tryAGI . OpenAI . AssistantsNamedToolChoice > ??
6262 throw new global ::System . InvalidOperationException ( $ "Cannot get type info for { typeof ( global ::tryAGI . OpenAI . AssistantsNamedToolChoice ) . Name } ") ;
63- value2 = global ::System . Text . Json . JsonSerializer . Deserialize ( __rawJson , typeInfo ) ;
63+ named = global ::System . Text . Json . JsonSerializer . Deserialize ( __rawJson , typeInfo ) ;
6464 }
6565 catch ( global ::System . Text . Json . JsonException )
6666 {
@@ -71,13 +71,13 @@ public class AssistantsApiToolChoiceOptionJsonConverter : global::System.Text.Js
7171 }
7272 }
7373
74- if ( value1 == null && value2 == null )
74+ if ( @enum == null && named == null )
7575 {
7676 try
7777 {
7878 var typeInfo = typeInfoResolver . GetTypeInfo ( typeof ( global ::tryAGI . OpenAI . AssistantsApiToolChoiceOptionEnum ) , options ) as global ::System . Text . Json . Serialization . Metadata . JsonTypeInfo < global ::tryAGI . OpenAI . AssistantsApiToolChoiceOptionEnum > ??
7979 throw new global ::System . InvalidOperationException ( $ "Cannot get type info for { typeof ( global ::tryAGI . OpenAI . AssistantsApiToolChoiceOptionEnum ) . Name } ") ;
80- value1 = global ::System . Text . Json . JsonSerializer . Deserialize ( __rawJson , typeInfo ) ;
80+ @enum = global ::System . Text . Json . JsonSerializer . Deserialize ( __rawJson , typeInfo ) ;
8181 }
8282 catch ( global ::System . Text . Json . JsonException )
8383 {
@@ -90,7 +90,7 @@ public class AssistantsApiToolChoiceOptionJsonConverter : global::System.Text.Js
9090 {
9191 var typeInfo = typeInfoResolver . GetTypeInfo ( typeof ( global ::tryAGI . OpenAI . AssistantsNamedToolChoice ) , options ) as global ::System . Text . Json . Serialization . Metadata . JsonTypeInfo < global ::tryAGI . OpenAI . AssistantsNamedToolChoice > ??
9292 throw new global ::System . InvalidOperationException ( $ "Cannot get type info for { typeof ( global ::tryAGI . OpenAI . AssistantsNamedToolChoice ) . Name } ") ;
93- value2 = global ::System . Text . Json . JsonSerializer . Deserialize ( __rawJson , typeInfo ) ;
93+ named = global ::System . Text . Json . JsonSerializer . Deserialize ( __rawJson , typeInfo ) ;
9494 }
9595 catch ( global ::System . Text . Json . JsonException )
9696 {
@@ -101,9 +101,9 @@ public class AssistantsApiToolChoiceOptionJsonConverter : global::System.Text.Js
101101 }
102102
103103 var __value = new global ::tryAGI . OpenAI . AssistantsApiToolChoiceOption (
104- value1 ,
104+ @enum ,
105105
106- value2
106+ named
107107 ) ;
108108
109109 return __value ;
@@ -118,17 +118,17 @@ public override void Write(
118118 options = options ?? throw new global ::System . ArgumentNullException ( nameof ( options ) ) ;
119119 var typeInfoResolver = options . TypeInfoResolver ?? throw new global ::System . InvalidOperationException ( "TypeInfoResolver is not set." ) ;
120120
121- if ( value . IsValue1 )
121+ if ( value . IsEnum )
122122 {
123123 var typeInfo = typeInfoResolver . GetTypeInfo ( typeof ( global ::tryAGI . OpenAI . AssistantsApiToolChoiceOptionEnum ) , options ) as global ::System . Text . Json . Serialization . Metadata . JsonTypeInfo < global ::tryAGI . OpenAI . AssistantsApiToolChoiceOptionEnum > ??
124124 throw new global ::System . InvalidOperationException ( $ "Cannot get type info for { typeof ( global ::tryAGI . OpenAI . AssistantsApiToolChoiceOptionEnum ) . Name } ") ;
125- global ::System . Text . Json . JsonSerializer . Serialize ( writer , value . Value1 ! . Value , typeInfo ) ;
125+ global ::System . Text . Json . JsonSerializer . Serialize ( writer , value . Enum ! . Value , typeInfo ) ;
126126 }
127- else if ( value . IsValue2 )
127+ else if ( value . IsNamed )
128128 {
129129 var typeInfo = typeInfoResolver . GetTypeInfo ( typeof ( global ::tryAGI . OpenAI . AssistantsNamedToolChoice ) , options ) as global ::System . Text . Json . Serialization . Metadata . JsonTypeInfo < global ::tryAGI . OpenAI . AssistantsNamedToolChoice ? > ??
130130 throw new global ::System . InvalidOperationException ( $ "Cannot get type info for { typeof ( global ::tryAGI . OpenAI . AssistantsNamedToolChoice ) . Name } ") ;
131- global ::System . Text . Json . JsonSerializer . Serialize ( writer , value . Value2 ! , typeInfo ) ;
131+ global ::System . Text . Json . JsonSerializer . Serialize ( writer , value . Named ! , typeInfo ) ;
132132 }
133133 }
134134 }
0 commit comments