openai/openai-dotnet
Publicmirrored from https://github.com/openai/openai-dotnetAvailable
src/Generated/Models/AssistantResponseFormat.Serialization.cs
27lines · modecode
| 1 | // <auto-generated/> |
| 2 | |
| 3 | #nullable disable |
| 4 | |
| 5 | using System; |
| 6 | using System.ClientModel; |
| 7 | using System.ClientModel.Primitives; |
| 8 | using System.Text.Json; |
| 9 | |
| 10 | namespace OpenAI.Assistants |
| 11 | { |
| 12 | public partial class AssistantResponseFormat : IJsonModel<AssistantResponseFormat> |
| 13 | { |
| 14 | string IPersistableModel<AssistantResponseFormat>.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; |
| 15 | |
| 16 | internal static AssistantResponseFormat FromResponse(PipelineResponse response) |
| 17 | { |
| 18 | using var document = JsonDocument.Parse(response.Content); |
| 19 | return DeserializeAssistantResponseFormat(document.RootElement); |
| 20 | } |
| 21 | |
| 22 | internal virtual BinaryContent ToBinaryContent() |
| 23 | { |
| 24 | return BinaryContent.Create(this, ModelSerializationExtensions.WireOptions); |
| 25 | } |
| 26 | } |
| 27 | } |
| 28 | |