1010
1111namespace OpenAI . Responses
1212{
13- public partial class FileCitationAnnotation : IJsonModel < FileCitationAnnotation >
13+ public partial class FileCitationMessageAnnotation : IJsonModel < FileCitationMessageAnnotation >
1414 {
15- internal FileCitationAnnotation ( ) : this ( ResponseMessageAnnotationKind . FileCitation , null , null , default )
15+ internal FileCitationMessageAnnotation ( ) : this ( ResponseMessageAnnotationKind . FileCitation , null , null , default )
1616 {
1717 }
1818
19- void IJsonModel < FileCitationAnnotation > . Write ( Utf8JsonWriter writer , ModelReaderWriterOptions options )
19+ void IJsonModel < FileCitationMessageAnnotation > . Write ( Utf8JsonWriter writer , ModelReaderWriterOptions options )
2020 {
2121 writer . WriteStartObject ( ) ;
2222 JsonModelWriteCore ( writer , options ) ;
@@ -25,10 +25,10 @@ void IJsonModel<FileCitationAnnotation>.Write(Utf8JsonWriter writer, ModelReader
2525
2626 protected override void JsonModelWriteCore ( Utf8JsonWriter writer , ModelReaderWriterOptions options )
2727 {
28- string format = options . Format == "W" ? ( ( IPersistableModel < FileCitationAnnotation > ) this ) . GetFormatFromOptions ( options ) : options . Format ;
28+ string format = options . Format == "W" ? ( ( IPersistableModel < FileCitationMessageAnnotation > ) this ) . GetFormatFromOptions ( options ) : options . Format ;
2929 if ( format != "J" )
3030 {
31- throw new FormatException ( $ "The model { nameof ( FileCitationAnnotation ) } does not support writing '{ format } ' format.") ;
31+ throw new FormatException ( $ "The model { nameof ( FileCitationMessageAnnotation ) } does not support writing '{ format } ' format.") ;
3232 }
3333 base . JsonModelWriteCore ( writer , options ) ;
3434 if ( _additionalBinaryDataProperties ? . ContainsKey ( "file_id" ) != true )
@@ -43,20 +43,20 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri
4343 }
4444 }
4545
46- FileCitationAnnotation IJsonModel < FileCitationAnnotation > . Create ( ref Utf8JsonReader reader , ModelReaderWriterOptions options ) => ( FileCitationAnnotation ) JsonModelCreateCore ( ref reader , options ) ;
46+ FileCitationMessageAnnotation IJsonModel < FileCitationMessageAnnotation > . Create ( ref Utf8JsonReader reader , ModelReaderWriterOptions options ) => ( FileCitationMessageAnnotation ) JsonModelCreateCore ( ref reader , options ) ;
4747
4848 protected override ResponseMessageAnnotation JsonModelCreateCore ( ref Utf8JsonReader reader , ModelReaderWriterOptions options )
4949 {
50- string format = options . Format == "W" ? ( ( IPersistableModel < FileCitationAnnotation > ) this ) . GetFormatFromOptions ( options ) : options . Format ;
50+ string format = options . Format == "W" ? ( ( IPersistableModel < FileCitationMessageAnnotation > ) this ) . GetFormatFromOptions ( options ) : options . Format ;
5151 if ( format != "J" )
5252 {
53- throw new FormatException ( $ "The model { nameof ( FileCitationAnnotation ) } does not support reading '{ format } ' format.") ;
53+ throw new FormatException ( $ "The model { nameof ( FileCitationMessageAnnotation ) } does not support reading '{ format } ' format.") ;
5454 }
5555 using JsonDocument document = JsonDocument . ParseValue ( ref reader ) ;
56- return DeserializeFileCitationAnnotation ( document . RootElement , options ) ;
56+ return DeserializeFileCitationMessageAnnotation ( document . RootElement , options ) ;
5757 }
5858
59- internal static FileCitationAnnotation DeserializeFileCitationAnnotation ( JsonElement element , ModelReaderWriterOptions options )
59+ internal static FileCitationMessageAnnotation DeserializeFileCitationMessageAnnotation ( JsonElement element , ModelReaderWriterOptions options )
6060 {
6161 if ( element . ValueKind == JsonValueKind . Null )
6262 {
@@ -86,40 +86,40 @@ internal static FileCitationAnnotation DeserializeFileCitationAnnotation(JsonEle
8686 // Plugin customization: remove options.Format != "W" check
8787 additionalBinaryDataProperties . Add ( prop . Name , BinaryData . FromString ( prop . Value . GetRawText ( ) ) ) ;
8888 }
89- return new FileCitationAnnotation ( kind , additionalBinaryDataProperties , fileId , index ) ;
89+ return new FileCitationMessageAnnotation ( kind , additionalBinaryDataProperties , fileId , index ) ;
9090 }
9191
92- BinaryData IPersistableModel < FileCitationAnnotation > . Write ( ModelReaderWriterOptions options ) => PersistableModelWriteCore ( options ) ;
92+ BinaryData IPersistableModel < FileCitationMessageAnnotation > . Write ( ModelReaderWriterOptions options ) => PersistableModelWriteCore ( options ) ;
9393
9494 protected override BinaryData PersistableModelWriteCore ( ModelReaderWriterOptions options )
9595 {
96- string format = options . Format == "W" ? ( ( IPersistableModel < FileCitationAnnotation > ) this ) . GetFormatFromOptions ( options ) : options . Format ;
96+ string format = options . Format == "W" ? ( ( IPersistableModel < FileCitationMessageAnnotation > ) this ) . GetFormatFromOptions ( options ) : options . Format ;
9797 switch ( format )
9898 {
9999 case "J" :
100100 return ModelReaderWriter . Write ( this , options , OpenAIContext . Default ) ;
101101 default :
102- throw new FormatException ( $ "The model { nameof ( FileCitationAnnotation ) } does not support writing '{ options . Format } ' format.") ;
102+ throw new FormatException ( $ "The model { nameof ( FileCitationMessageAnnotation ) } does not support writing '{ options . Format } ' format.") ;
103103 }
104104 }
105105
106- FileCitationAnnotation IPersistableModel < FileCitationAnnotation > . Create ( BinaryData data , ModelReaderWriterOptions options ) => ( FileCitationAnnotation ) PersistableModelCreateCore ( data , options ) ;
106+ FileCitationMessageAnnotation IPersistableModel < FileCitationMessageAnnotation > . Create ( BinaryData data , ModelReaderWriterOptions options ) => ( FileCitationMessageAnnotation ) PersistableModelCreateCore ( data , options ) ;
107107
108108 protected override ResponseMessageAnnotation PersistableModelCreateCore ( BinaryData data , ModelReaderWriterOptions options )
109109 {
110- string format = options . Format == "W" ? ( ( IPersistableModel < FileCitationAnnotation > ) this ) . GetFormatFromOptions ( options ) : options . Format ;
110+ string format = options . Format == "W" ? ( ( IPersistableModel < FileCitationMessageAnnotation > ) this ) . GetFormatFromOptions ( options ) : options . Format ;
111111 switch ( format )
112112 {
113113 case "J" :
114114 using ( JsonDocument document = JsonDocument . Parse ( data ) )
115115 {
116- return DeserializeFileCitationAnnotation ( document . RootElement , options ) ;
116+ return DeserializeFileCitationMessageAnnotation ( document . RootElement , options ) ;
117117 }
118118 default :
119- throw new FormatException ( $ "The model { nameof ( FileCitationAnnotation ) } does not support reading '{ options . Format } ' format.") ;
119+ throw new FormatException ( $ "The model { nameof ( FileCitationMessageAnnotation ) } does not support reading '{ options . Format } ' format.") ;
120120 }
121121 }
122122
123- string IPersistableModel < FileCitationAnnotation > . GetFormatFromOptions ( ModelReaderWriterOptions options ) => "J" ;
123+ string IPersistableModel < FileCitationMessageAnnotation > . GetFormatFromOptions ( ModelReaderWriterOptions options ) => "J" ;
124124 }
125125}
0 commit comments