1010
1111namespace OpenAI . Responses
1212{
13- internal partial class InternalCodeInterpreterTool : IJsonModel < InternalCodeInterpreterTool >
13+ public partial class CodeInterpreterTool : IJsonModel < CodeInterpreterTool >
1414 {
15- internal InternalCodeInterpreterTool ( ) : this ( InternalToolType . CodeInterpreter , null , null )
15+ internal CodeInterpreterTool ( ) : this ( InternalToolType . CodeInterpreter , null , null )
1616 {
1717 }
1818
19- void IJsonModel < InternalCodeInterpreterTool > . Write ( Utf8JsonWriter writer , ModelReaderWriterOptions options )
19+ void IJsonModel < CodeInterpreterTool > . Write ( Utf8JsonWriter writer , ModelReaderWriterOptions options )
2020 {
2121 writer . WriteStartObject ( ) ;
2222 JsonModelWriteCore ( writer , options ) ;
@@ -25,10 +25,10 @@ void IJsonModel<InternalCodeInterpreterTool>.Write(Utf8JsonWriter writer, ModelR
2525
2626 protected override void JsonModelWriteCore ( Utf8JsonWriter writer , ModelReaderWriterOptions options )
2727 {
28- string format = options . Format == "W" ? ( ( IPersistableModel < InternalCodeInterpreterTool > ) this ) . GetFormatFromOptions ( options ) : options . Format ;
28+ string format = options . Format == "W" ? ( ( IPersistableModel < CodeInterpreterTool > ) this ) . GetFormatFromOptions ( options ) : options . Format ;
2929 if ( format != "J" )
3030 {
31- throw new FormatException ( $ "The model { nameof ( InternalCodeInterpreterTool ) } does not support writing '{ format } ' format.") ;
31+ throw new FormatException ( $ "The model { nameof ( CodeInterpreterTool ) } does not support writing '{ format } ' format.") ;
3232 }
3333 base . JsonModelWriteCore ( writer , options ) ;
3434 if ( _additionalBinaryDataProperties ? . ContainsKey ( "container" ) != true )
@@ -45,20 +45,20 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri
4545 }
4646 }
4747
48- InternalCodeInterpreterTool IJsonModel < InternalCodeInterpreterTool > . Create ( ref Utf8JsonReader reader , ModelReaderWriterOptions options ) => ( InternalCodeInterpreterTool ) JsonModelCreateCore ( ref reader , options ) ;
48+ CodeInterpreterTool IJsonModel < CodeInterpreterTool > . Create ( ref Utf8JsonReader reader , ModelReaderWriterOptions options ) => ( CodeInterpreterTool ) JsonModelCreateCore ( ref reader , options ) ;
4949
5050 protected override ResponseTool JsonModelCreateCore ( ref Utf8JsonReader reader , ModelReaderWriterOptions options )
5151 {
52- string format = options . Format == "W" ? ( ( IPersistableModel < InternalCodeInterpreterTool > ) this ) . GetFormatFromOptions ( options ) : options . Format ;
52+ string format = options . Format == "W" ? ( ( IPersistableModel < CodeInterpreterTool > ) this ) . GetFormatFromOptions ( options ) : options . Format ;
5353 if ( format != "J" )
5454 {
55- throw new FormatException ( $ "The model { nameof ( InternalCodeInterpreterTool ) } does not support reading '{ format } ' format.") ;
55+ throw new FormatException ( $ "The model { nameof ( CodeInterpreterTool ) } does not support reading '{ format } ' format.") ;
5656 }
5757 using JsonDocument document = JsonDocument . ParseValue ( ref reader ) ;
58- return DeserializeInternalCodeInterpreterTool ( document . RootElement , options ) ;
58+ return DeserializeCodeInterpreterTool ( document . RootElement , options ) ;
5959 }
6060
61- internal static InternalCodeInterpreterTool DeserializeInternalCodeInterpreterTool ( JsonElement element , ModelReaderWriterOptions options )
61+ internal static CodeInterpreterTool DeserializeCodeInterpreterTool ( JsonElement element , ModelReaderWriterOptions options )
6262 {
6363 if ( element . ValueKind == JsonValueKind . Null )
6464 {
@@ -82,40 +82,40 @@ internal static InternalCodeInterpreterTool DeserializeInternalCodeInterpreterTo
8282 // Plugin customization: remove options.Format != "W" check
8383 additionalBinaryDataProperties . Add ( prop . Name , BinaryData . FromString ( prop . Value . GetRawText ( ) ) ) ;
8484 }
85- return new InternalCodeInterpreterTool ( kind , additionalBinaryDataProperties , container ) ;
85+ return new CodeInterpreterTool ( kind , additionalBinaryDataProperties , container ) ;
8686 }
8787
88- BinaryData IPersistableModel < InternalCodeInterpreterTool > . Write ( ModelReaderWriterOptions options ) => PersistableModelWriteCore ( options ) ;
88+ BinaryData IPersistableModel < CodeInterpreterTool > . Write ( ModelReaderWriterOptions options ) => PersistableModelWriteCore ( options ) ;
8989
9090 protected override BinaryData PersistableModelWriteCore ( ModelReaderWriterOptions options )
9191 {
92- string format = options . Format == "W" ? ( ( IPersistableModel < InternalCodeInterpreterTool > ) this ) . GetFormatFromOptions ( options ) : options . Format ;
92+ string format = options . Format == "W" ? ( ( IPersistableModel < CodeInterpreterTool > ) this ) . GetFormatFromOptions ( options ) : options . Format ;
9393 switch ( format )
9494 {
9595 case "J" :
9696 return ModelReaderWriter . Write ( this , options , OpenAIContext . Default ) ;
9797 default :
98- throw new FormatException ( $ "The model { nameof ( InternalCodeInterpreterTool ) } does not support writing '{ options . Format } ' format.") ;
98+ throw new FormatException ( $ "The model { nameof ( CodeInterpreterTool ) } does not support writing '{ options . Format } ' format.") ;
9999 }
100100 }
101101
102- InternalCodeInterpreterTool IPersistableModel < InternalCodeInterpreterTool > . Create ( BinaryData data , ModelReaderWriterOptions options ) => ( InternalCodeInterpreterTool ) PersistableModelCreateCore ( data , options ) ;
102+ CodeInterpreterTool IPersistableModel < CodeInterpreterTool > . Create ( BinaryData data , ModelReaderWriterOptions options ) => ( CodeInterpreterTool ) PersistableModelCreateCore ( data , options ) ;
103103
104104 protected override ResponseTool PersistableModelCreateCore ( BinaryData data , ModelReaderWriterOptions options )
105105 {
106- string format = options . Format == "W" ? ( ( IPersistableModel < InternalCodeInterpreterTool > ) this ) . GetFormatFromOptions ( options ) : options . Format ;
106+ string format = options . Format == "W" ? ( ( IPersistableModel < CodeInterpreterTool > ) this ) . GetFormatFromOptions ( options ) : options . Format ;
107107 switch ( format )
108108 {
109109 case "J" :
110110 using ( JsonDocument document = JsonDocument . Parse ( data ) )
111111 {
112- return DeserializeInternalCodeInterpreterTool ( document . RootElement , options ) ;
112+ return DeserializeCodeInterpreterTool ( document . RootElement , options ) ;
113113 }
114114 default :
115- throw new FormatException ( $ "The model { nameof ( InternalCodeInterpreterTool ) } does not support reading '{ options . Format } ' format.") ;
115+ throw new FormatException ( $ "The model { nameof ( CodeInterpreterTool ) } does not support reading '{ options . Format } ' format.") ;
116116 }
117117 }
118118
119- string IPersistableModel < InternalCodeInterpreterTool > . GetFormatFromOptions ( ModelReaderWriterOptions options ) => "J" ;
119+ string IPersistableModel < CodeInterpreterTool > . GetFormatFromOptions ( ModelReaderWriterOptions options ) => "J" ;
120120 }
121121}
0 commit comments