@@ -17,24 +17,24 @@ public class AnnotationJsonConverter : global::System.Text.Json.Serialization.Js
1717
1818 var
1919 readerCopy = reader ;
20- global ::tryAGI . OpenAI . FileCitation ? fileCitation = default ;
20+ global ::tryAGI . OpenAI . FileCitationBody ? fileCitationBody = default ;
2121 try
2222 {
23- var typeInfo = typeInfoResolver . GetTypeInfo ( typeof ( global ::tryAGI . OpenAI . FileCitation ) , options ) as global ::System . Text . Json . Serialization . Metadata . JsonTypeInfo < global ::tryAGI . OpenAI . FileCitation > ??
24- throw new global ::System . InvalidOperationException ( $ "Cannot get type info for { typeof ( global ::tryAGI . OpenAI . FileCitation ) . Name } ") ;
25- fileCitation = global ::System . Text . Json . JsonSerializer . Deserialize ( ref readerCopy , typeInfo ) ;
23+ var typeInfo = typeInfoResolver . GetTypeInfo ( typeof ( global ::tryAGI . OpenAI . FileCitationBody ) , options ) as global ::System . Text . Json . Serialization . Metadata . JsonTypeInfo < global ::tryAGI . OpenAI . FileCitationBody > ??
24+ throw new global ::System . InvalidOperationException ( $ "Cannot get type info for { typeof ( global ::tryAGI . OpenAI . FileCitationBody ) . Name } ") ;
25+ fileCitationBody = global ::System . Text . Json . JsonSerializer . Deserialize ( ref readerCopy , typeInfo ) ;
2626 }
2727 catch ( global ::System . Text . Json . JsonException )
2828 {
2929 }
3030
3131 readerCopy = reader ;
32- global ::tryAGI . OpenAI . UrlCitation ? urlCitation = default ;
32+ global ::tryAGI . OpenAI . UrlCitationBody ? urlCitationBody = default ;
3333 try
3434 {
35- var typeInfo = typeInfoResolver . GetTypeInfo ( typeof ( global ::tryAGI . OpenAI . UrlCitation ) , options ) as global ::System . Text . Json . Serialization . Metadata . JsonTypeInfo < global ::tryAGI . OpenAI . UrlCitation > ??
36- throw new global ::System . InvalidOperationException ( $ "Cannot get type info for { typeof ( global ::tryAGI . OpenAI . UrlCitation ) . Name } ") ;
37- urlCitation = global ::System . Text . Json . JsonSerializer . Deserialize ( ref readerCopy , typeInfo ) ;
35+ var typeInfo = typeInfoResolver . GetTypeInfo ( typeof ( global ::tryAGI . OpenAI . UrlCitationBody ) , options ) as global ::System . Text . Json . Serialization . Metadata . JsonTypeInfo < global ::tryAGI . OpenAI . UrlCitationBody > ??
36+ throw new global ::System . InvalidOperationException ( $ "Cannot get type info for { typeof ( global ::tryAGI . OpenAI . UrlCitationBody ) . Name } ") ;
37+ urlCitationBody = global ::System . Text . Json . JsonSerializer . Deserialize ( ref readerCopy , typeInfo ) ;
3838 }
3939 catch ( global ::System . Text . Json . JsonException )
4040 {
@@ -53,21 +53,21 @@ public class AnnotationJsonConverter : global::System.Text.Json.Serialization.Js
5353 }
5454
5555 var result = new global ::tryAGI . OpenAI . Annotation (
56- fileCitation ,
57- urlCitation ,
56+ fileCitationBody ,
57+ urlCitationBody ,
5858 filePath
5959 ) ;
6060
61- if ( fileCitation != null )
61+ if ( fileCitationBody != null )
6262 {
63- var typeInfo = typeInfoResolver . GetTypeInfo ( typeof ( global ::tryAGI . OpenAI . FileCitation ) , options ) as global ::System . Text . Json . Serialization . Metadata . JsonTypeInfo < global ::tryAGI . OpenAI . FileCitation > ??
64- throw new global ::System . InvalidOperationException ( $ "Cannot get type info for { typeof ( global ::tryAGI . OpenAI . FileCitation ) . Name } ") ;
63+ var typeInfo = typeInfoResolver . GetTypeInfo ( typeof ( global ::tryAGI . OpenAI . FileCitationBody ) , options ) as global ::System . Text . Json . Serialization . Metadata . JsonTypeInfo < global ::tryAGI . OpenAI . FileCitationBody > ??
64+ throw new global ::System . InvalidOperationException ( $ "Cannot get type info for { typeof ( global ::tryAGI . OpenAI . FileCitationBody ) . Name } ") ;
6565 _ = global ::System . Text . Json . JsonSerializer . Deserialize ( ref reader , typeInfo ) ;
6666 }
67- else if ( urlCitation != null )
67+ else if ( urlCitationBody != null )
6868 {
69- var typeInfo = typeInfoResolver . GetTypeInfo ( typeof ( global ::tryAGI . OpenAI . UrlCitation ) , options ) as global ::System . Text . Json . Serialization . Metadata . JsonTypeInfo < global ::tryAGI . OpenAI . UrlCitation > ??
70- throw new global ::System . InvalidOperationException ( $ "Cannot get type info for { typeof ( global ::tryAGI . OpenAI . UrlCitation ) . Name } ") ;
69+ var typeInfo = typeInfoResolver . GetTypeInfo ( typeof ( global ::tryAGI . OpenAI . UrlCitationBody ) , options ) as global ::System . Text . Json . Serialization . Metadata . JsonTypeInfo < global ::tryAGI . OpenAI . UrlCitationBody > ??
70+ throw new global ::System . InvalidOperationException ( $ "Cannot get type info for { typeof ( global ::tryAGI . OpenAI . UrlCitationBody ) . Name } ") ;
7171 _ = global ::System . Text . Json . JsonSerializer . Deserialize ( ref reader , typeInfo ) ;
7272 }
7373 else if ( filePath != null )
@@ -89,17 +89,17 @@ public override void Write(
8989 options = options ?? throw new global ::System . ArgumentNullException ( nameof ( options ) ) ;
9090 var typeInfoResolver = options . TypeInfoResolver ?? throw new global ::System . InvalidOperationException ( "TypeInfoResolver is not set." ) ;
9191
92- if ( value . IsFileCitation )
92+ if ( value . IsFileCitationBody )
9393 {
94- var typeInfo = typeInfoResolver . GetTypeInfo ( typeof ( global ::tryAGI . OpenAI . FileCitation ) , options ) as global ::System . Text . Json . Serialization . Metadata . JsonTypeInfo < global ::tryAGI . OpenAI . FileCitation ? > ??
95- throw new global ::System . InvalidOperationException ( $ "Cannot get type info for { typeof ( global ::tryAGI . OpenAI . FileCitation ) . Name } ") ;
96- global ::System . Text . Json . JsonSerializer . Serialize ( writer , value . FileCitation , typeInfo ) ;
94+ var typeInfo = typeInfoResolver . GetTypeInfo ( typeof ( global ::tryAGI . OpenAI . FileCitationBody ) , options ) as global ::System . Text . Json . Serialization . Metadata . JsonTypeInfo < global ::tryAGI . OpenAI . FileCitationBody ? > ??
95+ throw new global ::System . InvalidOperationException ( $ "Cannot get type info for { typeof ( global ::tryAGI . OpenAI . FileCitationBody ) . Name } ") ;
96+ global ::System . Text . Json . JsonSerializer . Serialize ( writer , value . FileCitationBody , typeInfo ) ;
9797 }
98- else if ( value . IsUrlCitation )
98+ else if ( value . IsUrlCitationBody )
9999 {
100- var typeInfo = typeInfoResolver . GetTypeInfo ( typeof ( global ::tryAGI . OpenAI . UrlCitation ) , options ) as global ::System . Text . Json . Serialization . Metadata . JsonTypeInfo < global ::tryAGI . OpenAI . UrlCitation ? > ??
101- throw new global ::System . InvalidOperationException ( $ "Cannot get type info for { typeof ( global ::tryAGI . OpenAI . UrlCitation ) . Name } ") ;
102- global ::System . Text . Json . JsonSerializer . Serialize ( writer , value . UrlCitation , typeInfo ) ;
100+ var typeInfo = typeInfoResolver . GetTypeInfo ( typeof ( global ::tryAGI . OpenAI . UrlCitationBody ) , options ) as global ::System . Text . Json . Serialization . Metadata . JsonTypeInfo < global ::tryAGI . OpenAI . UrlCitationBody ? > ??
101+ throw new global ::System . InvalidOperationException ( $ "Cannot get type info for { typeof ( global ::tryAGI . OpenAI . UrlCitationBody ) . Name } ") ;
102+ global ::System . Text . Json . JsonSerializer . Serialize ( writer , value . UrlCitationBody , typeInfo ) ;
103103 }
104104 else if ( value . IsFilePath )
105105 {
0 commit comments