Skip to content

Commit cbb6509

Browse files
committed
export
1 parent 86dc577 commit cbb6509

File tree

3 files changed

+98
-5
lines changed

3 files changed

+98
-5
lines changed

api/OpenAI.net8.0.cs

Lines changed: 51 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4608,10 +4608,10 @@ public class AutomaticCodeInterpreterContainerConfiguration : CodeInterpreterCon
46084608
}
46094609
[Experimental("OPENAI001")]
46104610
public class CodeInterpreterCallResponseItem : ResponseItem, IJsonModel<CodeInterpreterCallResponseItem>, IPersistableModel<CodeInterpreterCallResponseItem> {
4611-
public CodeInterpreterCallResponseItem(CodeInterpreterCallStatus status, string code, IEnumerable<BinaryData> results);
4611+
public CodeInterpreterCallResponseItem(CodeInterpreterCallStatus status, string code);
46124612
public string Code { get; set; }
46134613
public string ContainerId { get; set; }
4614-
public IList<BinaryData> Results { get; }
4614+
public IList<CodeInterpreterToolOutput> Outputs { get; }
46154615
public CodeInterpreterCallStatus Status { get; set; }
46164616
protected override ResponseItem JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options);
46174617
protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options);
@@ -4652,6 +4652,48 @@ public class CodeInterpreterTool : ResponseTool, IJsonModel<CodeInterpreterTool>
46524652
protected override ResponseTool PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options);
46534653
protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options);
46544654
}
4655+
[Experimental("OPENAI001")]
4656+
public class CodeInterpreterToolImageOutput : CodeInterpreterToolOutput, IJsonModel<CodeInterpreterToolImageOutput>, IPersistableModel<CodeInterpreterToolImageOutput> {
4657+
public CodeInterpreterToolImageOutput(Uri url);
4658+
public Uri Url { get; set; }
4659+
protected override CodeInterpreterToolOutput JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options);
4660+
protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options);
4661+
protected override CodeInterpreterToolOutput PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options);
4662+
protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options);
4663+
}
4664+
[Experimental("OPENAI001")]
4665+
public class CodeInterpreterToolLogsOutput : CodeInterpreterToolOutput, IJsonModel<CodeInterpreterToolLogsOutput>, IPersistableModel<CodeInterpreterToolLogsOutput> {
4666+
public CodeInterpreterToolLogsOutput(string logs);
4667+
public string Logs { get; set; }
4668+
protected override CodeInterpreterToolOutput JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options);
4669+
protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options);
4670+
protected override CodeInterpreterToolOutput PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options);
4671+
protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options);
4672+
}
4673+
[Experimental("OPENAI001")]
4674+
[PersistableModelProxy(typeof(UnknownCodeInterpreterToolOutput))]
4675+
public class CodeInterpreterToolOutput : IJsonModel<CodeInterpreterToolOutput>, IPersistableModel<CodeInterpreterToolOutput> {
4676+
protected virtual CodeInterpreterToolOutput JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options);
4677+
protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options);
4678+
protected virtual CodeInterpreterToolOutput PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options);
4679+
protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options);
4680+
}
4681+
[Experimental("OPENAI001")]
4682+
public readonly partial struct CodeInterpreterToolOutputType : IEquatable<CodeInterpreterToolOutputType> {
4683+
public CodeInterpreterToolOutputType(string value);
4684+
public static CodeInterpreterToolOutputType Image { get; }
4685+
public static CodeInterpreterToolOutputType Logs { get; }
4686+
public readonly bool Equals(CodeInterpreterToolOutputType other);
4687+
[EditorBrowsable(EditorBrowsableState.Never)]
4688+
public override readonly bool Equals(object obj);
4689+
[EditorBrowsable(EditorBrowsableState.Never)]
4690+
public override readonly int GetHashCode();
4691+
public static bool operator ==(CodeInterpreterToolOutputType left, CodeInterpreterToolOutputType right);
4692+
public static implicit operator CodeInterpreterToolOutputType(string value);
4693+
public static implicit operator CodeInterpreterToolOutputType?(string value);
4694+
public static bool operator !=(CodeInterpreterToolOutputType left, CodeInterpreterToolOutputType right);
4695+
public override readonly string ToString();
4696+
}
46554697
[Experimental("OPENAICUA001")]
46564698
public class ComputerCallAction : IJsonModel<ComputerCallAction>, IPersistableModel<ComputerCallAction> {
46574699
public Drawing.Point? ClickCoordinates { get; }
@@ -5937,6 +5979,13 @@ public class StreamingResponseWebSearchCallSearchingUpdate : StreamingResponseUp
59375979
protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options);
59385980
}
59395981
[Experimental("OPENAI001")]
5982+
public class UnknownCodeInterpreterToolOutput : CodeInterpreterToolOutput, IJsonModel<CodeInterpreterToolOutput>, IPersistableModel<CodeInterpreterToolOutput> {
5983+
protected override CodeInterpreterToolOutput JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options);
5984+
protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options);
5985+
protected override CodeInterpreterToolOutput PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options);
5986+
protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options);
5987+
}
5988+
[Experimental("OPENAI001")]
59405989
public class UriCitationMessageAnnotation : ResponseMessageAnnotation, IJsonModel<UriCitationMessageAnnotation>, IPersistableModel<UriCitationMessageAnnotation> {
59415990
public UriCitationMessageAnnotation(Uri uri, int startIndex, int endIndex, string title);
59425991
public int EndIndex { get; set; }

api/OpenAI.netstandard2.0.cs

Lines changed: 46 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4040,10 +4040,10 @@ public class AutomaticCodeInterpreterContainerConfiguration : CodeInterpreterCon
40404040
public IList<string> FileIds { get; }
40414041
}
40424042
public class CodeInterpreterCallResponseItem : ResponseItem, IJsonModel<CodeInterpreterCallResponseItem>, IPersistableModel<CodeInterpreterCallResponseItem> {
4043-
public CodeInterpreterCallResponseItem(CodeInterpreterCallStatus status, string code, IEnumerable<BinaryData> results);
4043+
public CodeInterpreterCallResponseItem(CodeInterpreterCallStatus status, string code);
40444044
public string Code { get; set; }
40454045
public string ContainerId { get; set; }
4046-
public IList<BinaryData> Results { get; }
4046+
public IList<CodeInterpreterToolOutput> Outputs { get; }
40474047
public CodeInterpreterCallStatus Status { get; set; }
40484048
protected override ResponseItem JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options);
40494049
protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options);
@@ -4082,6 +4082,44 @@ public class CodeInterpreterTool : ResponseTool, IJsonModel<CodeInterpreterTool>
40824082
protected override ResponseTool PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options);
40834083
protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options);
40844084
}
4085+
public class CodeInterpreterToolImageOutput : CodeInterpreterToolOutput, IJsonModel<CodeInterpreterToolImageOutput>, IPersistableModel<CodeInterpreterToolImageOutput> {
4086+
public CodeInterpreterToolImageOutput(Uri url);
4087+
public Uri Url { get; set; }
4088+
protected override CodeInterpreterToolOutput JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options);
4089+
protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options);
4090+
protected override CodeInterpreterToolOutput PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options);
4091+
protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options);
4092+
}
4093+
public class CodeInterpreterToolLogsOutput : CodeInterpreterToolOutput, IJsonModel<CodeInterpreterToolLogsOutput>, IPersistableModel<CodeInterpreterToolLogsOutput> {
4094+
public CodeInterpreterToolLogsOutput(string logs);
4095+
public string Logs { get; set; }
4096+
protected override CodeInterpreterToolOutput JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options);
4097+
protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options);
4098+
protected override CodeInterpreterToolOutput PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options);
4099+
protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options);
4100+
}
4101+
[PersistableModelProxy(typeof(UnknownCodeInterpreterToolOutput))]
4102+
public class CodeInterpreterToolOutput : IJsonModel<CodeInterpreterToolOutput>, IPersistableModel<CodeInterpreterToolOutput> {
4103+
protected virtual CodeInterpreterToolOutput JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options);
4104+
protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options);
4105+
protected virtual CodeInterpreterToolOutput PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options);
4106+
protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options);
4107+
}
4108+
public readonly partial struct CodeInterpreterToolOutputType : IEquatable<CodeInterpreterToolOutputType> {
4109+
public CodeInterpreterToolOutputType(string value);
4110+
public static CodeInterpreterToolOutputType Image { get; }
4111+
public static CodeInterpreterToolOutputType Logs { get; }
4112+
public readonly bool Equals(CodeInterpreterToolOutputType other);
4113+
[EditorBrowsable(EditorBrowsableState.Never)]
4114+
public override readonly bool Equals(object obj);
4115+
[EditorBrowsable(EditorBrowsableState.Never)]
4116+
public override readonly int GetHashCode();
4117+
public static bool operator ==(CodeInterpreterToolOutputType left, CodeInterpreterToolOutputType right);
4118+
public static implicit operator CodeInterpreterToolOutputType(string value);
4119+
public static implicit operator CodeInterpreterToolOutputType?(string value);
4120+
public static bool operator !=(CodeInterpreterToolOutputType left, CodeInterpreterToolOutputType right);
4121+
public override readonly string ToString();
4122+
}
40854123
public class ComputerCallAction : IJsonModel<ComputerCallAction>, IPersistableModel<ComputerCallAction> {
40864124
public Drawing.Point? ClickCoordinates { get; }
40874125
public ComputerCallActionMouseButton? ClickMouseButton { get; }
@@ -5249,6 +5287,12 @@ public class StreamingResponseWebSearchCallSearchingUpdate : StreamingResponseUp
52495287
protected override StreamingResponseUpdate PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options);
52505288
protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options);
52515289
}
5290+
public class UnknownCodeInterpreterToolOutput : CodeInterpreterToolOutput, IJsonModel<CodeInterpreterToolOutput>, IPersistableModel<CodeInterpreterToolOutput> {
5291+
protected override CodeInterpreterToolOutput JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options);
5292+
protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options);
5293+
protected override CodeInterpreterToolOutput PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options);
5294+
protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options);
5295+
}
52525296
public class UriCitationMessageAnnotation : ResponseMessageAnnotation, IJsonModel<UriCitationMessageAnnotation>, IPersistableModel<UriCitationMessageAnnotation> {
52535297
public UriCitationMessageAnnotation(Uri uri, int startIndex, int endIndex, string title);
52545298
public int EndIndex { get; set; }

tests/Responses/ResponsesTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ public async Task CodeInterpreterToolWithEmptyFileIds()
273273
};
274274

275275
OpenAIResponse response = await client.CreateResponseAsync(
276-
"Generate a simple chart using matplotlib.",
276+
"Generate a simple chart using matplotlib. Ensure you emit debug logging and include any resulting log file output.",
277277
responseOptions);
278278

279279
Assert.That(response, Is.Not.Null);

0 commit comments

Comments
 (0)