openai/openai-dotnet
Publicmirrored from https://github.com/openai/openai-dotnetAvailable
OpenAI.Responses/src/Custom/Tools/CodeInterpreterTool/CodeInterpreterToolContainer.cs
48lines · modecode
| 1 | using Microsoft.TypeSpec.Generator.Customizations; |
| 2 | |
| 3 | namespace OpenAI.Responses; |
| 4 | |
| 5 | // CUSTOM: This type represents a non-discriminated union of the following components: |
| 6 | // * A container ID defined as a string. |
| 7 | // * A container configuration defined as an object. |
| 8 | /// <summary> |
| 9 | /// Represents a container for the code interpreter tool. |
| 10 | /// </summary> |
| 11 | [CodeGenType("DotNetCodeInterpreterToolContainer")] |
| 12 | public partial class CodeInterpreterToolContainer |
| 13 | { |
| 14 | // CUSTOM: Made internal. |
| 15 | internal CodeInterpreterToolContainer() |
| 16 | { |
| 17 | } |
| 18 | |
| 19 | // CUSTOM: Added to support the corresponding component of the union. |
| 20 | /// <summary> |
| 21 | /// Initializes a new instance of the <see cref="CodeInterpreterContainer"/> class. |
| 22 | /// </summary> |
| 23 | /// <param name="containerId">The ID of the container.</param> |
| 24 | public CodeInterpreterToolContainer(string containerId) |
| 25 | { |
| 26 | ContainerId = containerId; |
| 27 | } |
| 28 | |
| 29 | // CUSTOM: Added to support the corresponding component of the union. |
| 30 | /// <summary> |
| 31 | /// Initializes a new instance of the <see cref="CodeInterpreterContainer"/> class. |
| 32 | /// </summary> |
| 33 | /// <param name="containerConfiguration">The configuration of the container.</param> |
| 34 | public CodeInterpreterToolContainer(CodeInterpreterToolContainerConfiguration containerConfiguration) |
| 35 | { |
| 36 | ContainerConfiguration = containerConfiguration; |
| 37 | } |
| 38 | |
| 39 | // CUSTOM: Removed setter. |
| 40 | [CodeGenMember("ContainerId")] |
| 41 | public string ContainerId { get; } |
| 42 | |
| 43 | // CUSTOM: |
| 44 | // - Renamed. |
| 45 | // - Removed setter. |
| 46 | [CodeGenMember("Container")] |
| 47 | public CodeInterpreterToolContainerConfiguration ContainerConfiguration { get; } |
| 48 | } |