From 000d51e077fade52ffe94494bb048df119bf3548 Mon Sep 17 00:00:00 2001 From: ShivangiReja Date: Wed, 28 Aug 2024 13:16:17 -0700 Subject: [PATCH 01/11] Add Experimental attribute to all public APIs in the OpenAI.Assistants namespace --- .../Example01_RetrievalAugmentedGeneration.cs | 1 - ...ample01_RetrievalAugmentedGenerationAsync.cs | 1 - .../Assistants/Example02_FunctionCalling.cs | 1 - .../Example02_FunctionCallingAsync.cs | 1 - .../Example02b_FunctionCallingStreaming.cs | 1 - .../Example03_ListAssistantsWithPagination.cs | 1 - ...ample03_ListAssistantsWithPaginationAsync.cs | 1 - .../Assistants/Example04_AllTheTools.cs | 2 -- .../Example05_AssistantsWithVision.cs | 1 - .../Example05_AssistantsWithVisionAsync.cs | 1 - .dotnet/examples/ClientExamples.cs | 2 -- .dotnet/examples/OpenAI.Examples.csproj | 2 +- .dotnet/src/Custom/Assistants/Assistant.cs | 3 +++ .../Assistants/AssistantCollectionOptions.cs | 3 +++ .../Assistants/AssistantCreationOptions.cs | 4 +++- .../Assistants/AssistantModificationOptions.cs | 4 +++- .../Assistants/AssistantResponseFormat.cs | 4 +++- .../src/Custom/Assistants/AssistantThread.cs | 3 +++ ...deInterpreterToolDefinition.Serialization.cs | 7 +++---- .../Assistants/CodeInterpreterToolResources.cs | 2 ++ .../FileSearchToolDefinition.Serialization.cs | 3 --- .../Assistants/FileSearchToolDefinition.cs | 3 +-- .../Assistants/FileSearchToolResources.cs | 2 ++ .../FunctionToolDefinition.Serialization.cs | 5 +---- .../Custom/Assistants/FunctionToolDefinition.cs | 1 + .dotnet/src/Custom/Assistants/GeneratorStubs.cs | 17 ++++++++++++++++- .../Internal/GeneratorStubs.Internal.cs | 9 +++++++++ .../Internal/InternalAssistantMessageClient.cs | 2 ++ ...lAssistantResponseFormatPlainTextNoObject.cs | 3 +++ .../Internal/InternalAssistantRunClient.cs | 2 ++ .../Internal/InternalAssistantThreadClient.cs | 2 ++ .../Internal/InternalMessageImageFileContent.cs | 2 ++ .../Internal/InternalMessageImageUrlContent.cs | 2 ++ .../Internal/InternalRequiredToolCall.cs | 3 +++ .../InternalResponseMessageTextContent.cs | 2 ++ .../InternalRunStepCodeInterpreterLogOutput.cs | 3 +++ ...rnalRunStepCodeInterpreterToolCallDetails.cs | 2 ++ ...ternalRunStepDetailsMessageCreationObject.cs | 3 +++ .../InternalRunStepToolCallDetailsCollection.cs | 2 ++ .../Pagination/AssistantsPageEnumerator.cs | 2 ++ .../Pagination/MessagesPageEnumerator.cs | 2 ++ .../Pagination/RunStepsPageEnumerator.cs | 2 ++ .../Internal/Pagination/RunsPageEnumerator.cs | 2 ++ ...nownAssistantToolDefinition.Serialization.cs | 5 ++--- .../Assistants/MessageCollectionOptions.cs | 3 +++ .../Assistants/MessageContent.Serialization.cs | 3 ++- .dotnet/src/Custom/Assistants/MessageContent.cs | 2 ++ .../Assistants/MessageCreationAttachment.cs | 4 +++- .../MessageCreationOptions.Serialization.cs | 1 + .../Custom/Assistants/MessageCreationOptions.cs | 4 +++- .../MessageImageDetail.Serialization.cs | 3 +++ .../src/Custom/Assistants/MessageImageDetail.cs | 3 +++ .../Assistants/MessageModificationOptions.cs | 5 ++++- .dotnet/src/Custom/Assistants/MessageRole.cs | 5 ++++- .dotnet/src/Custom/Assistants/RequiredAction.cs | 3 +++ .../Custom/Assistants/RunCollectionOptions.cs | 3 +++ .../src/Custom/Assistants/RunCreationOptions.cs | 4 +++- .../Custom/Assistants/RunModificationOptions.cs | 5 ++++- .dotnet/src/Custom/Assistants/RunStatus.cs | 5 ++++- .dotnet/src/Custom/Assistants/RunStep.cs | 3 +++ .../Assistants/RunStepCollectionOptions.cs | 3 +++ .dotnet/src/Custom/Assistants/RunStepDetails.cs | 2 ++ .../src/Custom/Assistants/RunStepToolCall.cs | 4 +++- .../RunStepToolCallKind.Serialization.cs | 3 +++ .../Custom/Assistants/RunStepToolCallKind.cs | 3 +++ .../Custom/Assistants/RunTruncationStrategy.cs | 2 ++ .../Streaming/AsyncStreamingUpdateCollection.cs | 2 ++ .../Streaming/MessageContentUpdate.cs | 2 ++ .../Assistants/Streaming/MessageStatusUpdate.cs | 2 ++ .../Streaming/RequiredActionUpdate.cs | 2 ++ .../Streaming/RunStepDetailsUpdate.cs | 2 ++ ...RunStepDetailsUpdateCodeInterpreterOutput.cs | 5 ++++- .../Assistants/Streaming/RunStepUpdate.cs | 2 ++ .../Custom/Assistants/Streaming/RunUpdate.cs | 2 ++ .../Assistants/Streaming/StreamingUpdate.cs | 3 +++ .../Streaming/StreamingUpdateCollection.cs | 2 ++ .../StreamingUpdateReason.Serialization.cs | 3 +++ .../Streaming/StreamingUpdateReason.cs | 3 +++ .../Streaming/TextAnnotationUpdate.cs | 2 ++ .../Custom/Assistants/Streaming/ThreadUpdate.cs | 2 ++ .dotnet/src/Custom/Assistants/TextAnnotation.cs | 2 ++ .../Custom/Assistants/ThreadCreationOptions.cs | 4 +++- .../Assistants/ThreadInitializationMessage.cs | 2 ++ .dotnet/src/Custom/Assistants/ThreadMessage.cs | 2 ++ .../Assistants/ThreadModificationOptions.cs | 5 ++++- .dotnet/src/Custom/Assistants/ThreadRun.cs | 2 ++ .../Assistants/ToolConstraint.Serialization.cs | 2 +- .dotnet/src/Custom/Assistants/ToolConstraint.cs | 2 ++ .../Assistants/ToolDefinition.Serialization.cs | 5 +---- .dotnet/src/Custom/Assistants/ToolDefinition.cs | 2 ++ .dotnet/src/Custom/Assistants/ToolOutput.cs | 5 ++++- .dotnet/src/Custom/Assistants/ToolResources.cs | 2 ++ .../Assistants/VectorStoreCreationHelper.cs | 2 ++ .dotnet/src/OpenAI.csproj | 3 +++ 94 files changed, 221 insertions(+), 52 deletions(-) diff --git a/.dotnet/examples/Assistants/Example01_RetrievalAugmentedGeneration.cs b/.dotnet/examples/Assistants/Example01_RetrievalAugmentedGeneration.cs index 6d9117e9c..9d9ffe4ad 100644 --- a/.dotnet/examples/Assistants/Example01_RetrievalAugmentedGeneration.cs +++ b/.dotnet/examples/Assistants/Example01_RetrievalAugmentedGeneration.cs @@ -15,7 +15,6 @@ public partial class AssistantExamples public void Example01_RetrievalAugmentedGeneration() { // Assistants is a beta API and subject to change; acknowledge its experimental status by suppressing the matching warning. -#pragma warning disable OPENAI001 OpenAIClient openAIClient = new(Environment.GetEnvironmentVariable("OPENAI_API_KEY")); FileClient fileClient = openAIClient.GetFileClient(); AssistantClient assistantClient = openAIClient.GetAssistantClient(); diff --git a/.dotnet/examples/Assistants/Example01_RetrievalAugmentedGenerationAsync.cs b/.dotnet/examples/Assistants/Example01_RetrievalAugmentedGenerationAsync.cs index 13b49145a..52f66a015 100644 --- a/.dotnet/examples/Assistants/Example01_RetrievalAugmentedGenerationAsync.cs +++ b/.dotnet/examples/Assistants/Example01_RetrievalAugmentedGenerationAsync.cs @@ -16,7 +16,6 @@ public partial class AssistantExamples public async Task Example01_RetrievalAugmentedGenerationAsync() { // Assistants is a beta API and subject to change; acknowledge its experimental status by suppressing the matching warning. -#pragma warning disable OPENAI001 OpenAIClient openAIClient = new(Environment.GetEnvironmentVariable("OPENAI_API_KEY")); FileClient fileClient = openAIClient.GetFileClient(); AssistantClient assistantClient = openAIClient.GetAssistantClient(); diff --git a/.dotnet/examples/Assistants/Example02_FunctionCalling.cs b/.dotnet/examples/Assistants/Example02_FunctionCalling.cs index a0eb05637..da0a16689 100644 --- a/.dotnet/examples/Assistants/Example02_FunctionCalling.cs +++ b/.dotnet/examples/Assistants/Example02_FunctionCalling.cs @@ -61,7 +61,6 @@ string GetCurrentWeather(string location, string unit = "celsius") #endregion // Assistants is a beta API and subject to change; acknowledge its experimental status by suppressing the matching warning. -#pragma warning disable OPENAI001 AssistantClient client = new(Environment.GetEnvironmentVariable("OPENAI_API_KEY")); #region diff --git a/.dotnet/examples/Assistants/Example02_FunctionCallingAsync.cs b/.dotnet/examples/Assistants/Example02_FunctionCallingAsync.cs index 2ee924c56..6619172fe 100644 --- a/.dotnet/examples/Assistants/Example02_FunctionCallingAsync.cs +++ b/.dotnet/examples/Assistants/Example02_FunctionCallingAsync.cs @@ -61,7 +61,6 @@ string GetCurrentWeather(string location, string unit = "celsius") #endregion // Assistants is a beta API and subject to change; acknowledge its experimental status by suppressing the matching warning. -#pragma warning disable OPENAI001 AssistantClient client = new(Environment.GetEnvironmentVariable("OPENAI_API_KEY")); #region diff --git a/.dotnet/examples/Assistants/Example02b_FunctionCallingStreaming.cs b/.dotnet/examples/Assistants/Example02b_FunctionCallingStreaming.cs index 9c3e0adfc..d4499015b 100644 --- a/.dotnet/examples/Assistants/Example02b_FunctionCallingStreaming.cs +++ b/.dotnet/examples/Assistants/Example02b_FunctionCallingStreaming.cs @@ -63,7 +63,6 @@ public async Task Example02b_FunctionCallingStreaming() #endregion // Assistants is a beta API and subject to change; acknowledge its experimental status by suppressing the matching warning. -#pragma warning disable OPENAI001 AssistantClient client = new(Environment.GetEnvironmentVariable("OPENAI_API_KEY")); #region Create a new assistant with function tools diff --git a/.dotnet/examples/Assistants/Example03_ListAssistantsWithPagination.cs b/.dotnet/examples/Assistants/Example03_ListAssistantsWithPagination.cs index 83776d7a1..ace0608fa 100644 --- a/.dotnet/examples/Assistants/Example03_ListAssistantsWithPagination.cs +++ b/.dotnet/examples/Assistants/Example03_ListAssistantsWithPagination.cs @@ -12,7 +12,6 @@ public partial class AssistantExamples public void Example03_ListAssistantsWithPagination() { // Assistants is a beta API and subject to change; acknowledge its experimental status by suppressing the matching warning. -#pragma warning disable OPENAI001 AssistantClient client = new(Environment.GetEnvironmentVariable("OPENAI_API_KEY")); int count = 0; diff --git a/.dotnet/examples/Assistants/Example03_ListAssistantsWithPaginationAsync.cs b/.dotnet/examples/Assistants/Example03_ListAssistantsWithPaginationAsync.cs index 1f4d8218e..57696ddb9 100644 --- a/.dotnet/examples/Assistants/Example03_ListAssistantsWithPaginationAsync.cs +++ b/.dotnet/examples/Assistants/Example03_ListAssistantsWithPaginationAsync.cs @@ -13,7 +13,6 @@ public partial class AssistantExamples public async Task Example03_ListAssistantsWithPaginationAsync() { // Assistants is a beta API and subject to change; acknowledge its experimental status by suppressing the matching warning. -#pragma warning disable OPENAI001 AssistantClient client = new(Environment.GetEnvironmentVariable("OPENAI_API_KEY")); int count = 0; diff --git a/.dotnet/examples/Assistants/Example04_AllTheTools.cs b/.dotnet/examples/Assistants/Example04_AllTheTools.cs index 5a8943052..e1d62db8d 100644 --- a/.dotnet/examples/Assistants/Example04_AllTheTools.cs +++ b/.dotnet/examples/Assistants/Example04_AllTheTools.cs @@ -14,8 +14,6 @@ public partial class AssistantExamples [Test] public void Example04_AllTheTools() { -#pragma warning disable OPENAI001 - #region Define a function tool static string GetNameOfFamilyMember(string relation) => relation switch diff --git a/.dotnet/examples/Assistants/Example05_AssistantsWithVision.cs b/.dotnet/examples/Assistants/Example05_AssistantsWithVision.cs index 99315cdfb..d7af06205 100644 --- a/.dotnet/examples/Assistants/Example05_AssistantsWithVision.cs +++ b/.dotnet/examples/Assistants/Example05_AssistantsWithVision.cs @@ -12,7 +12,6 @@ public partial class AssistantExamples public void Example05_AssistantsWithVision() { // Assistants is a beta API and subject to change; acknowledge its experimental status by suppressing the matching warning. -#pragma warning disable OPENAI001 OpenAIClient openAIClient = new(Environment.GetEnvironmentVariable("OPENAI_API_KEY")); FileClient fileClient = openAIClient.GetFileClient(); AssistantClient assistantClient = openAIClient.GetAssistantClient(); diff --git a/.dotnet/examples/Assistants/Example05_AssistantsWithVisionAsync.cs b/.dotnet/examples/Assistants/Example05_AssistantsWithVisionAsync.cs index db23818dd..1e1e521fc 100644 --- a/.dotnet/examples/Assistants/Example05_AssistantsWithVisionAsync.cs +++ b/.dotnet/examples/Assistants/Example05_AssistantsWithVisionAsync.cs @@ -13,7 +13,6 @@ public partial class AssistantExamples public async Task Example05_AssistantsWithVisionAsync() { // Assistants is a beta API and subject to change; acknowledge its experimental status by suppressing the matching warning. -#pragma warning disable OPENAI001 OpenAIClient openAIClient = new(Environment.GetEnvironmentVariable("OPENAI_API_KEY")); FileClient fileClient = openAIClient.GetFileClient(); AssistantClient assistantClient = openAIClient.GetAssistantClient(); diff --git a/.dotnet/examples/ClientExamples.cs b/.dotnet/examples/ClientExamples.cs index dff74f119..18947925d 100644 --- a/.dotnet/examples/ClientExamples.cs +++ b/.dotnet/examples/ClientExamples.cs @@ -42,8 +42,6 @@ public void CreateAssistantAndFileClients() { OpenAIClient openAIClient = new(Environment.GetEnvironmentVariable("OPENAI_API_KEY")); FileClient fileClient = openAIClient.GetFileClient(); -#pragma warning disable OPENAI001 AssistantClient assistantClient = openAIClient.GetAssistantClient(); -#pragma warning restore OPENAI001 } } diff --git a/.dotnet/examples/OpenAI.Examples.csproj b/.dotnet/examples/OpenAI.Examples.csproj index b33b036ea..1176e7d20 100644 --- a/.dotnet/examples/OpenAI.Examples.csproj +++ b/.dotnet/examples/OpenAI.Examples.csproj @@ -2,7 +2,7 @@ net8.0 - $(NoWarn);CS1591 + $(NoWarn);CS1591;OPENAI001; latest diff --git a/.dotnet/src/Custom/Assistants/Assistant.cs b/.dotnet/src/Custom/Assistants/Assistant.cs index 34ee40166..db714f552 100644 --- a/.dotnet/src/Custom/Assistants/Assistant.cs +++ b/.dotnet/src/Custom/Assistants/Assistant.cs @@ -1,5 +1,8 @@ +using System.Diagnostics.CodeAnalysis; + namespace OpenAI.Assistants; +[Experimental("OPENAI001")] [CodeGenModel("AssistantObject")] public partial class Assistant { diff --git a/.dotnet/src/Custom/Assistants/AssistantCollectionOptions.cs b/.dotnet/src/Custom/Assistants/AssistantCollectionOptions.cs index c7baa96d1..7791e3beb 100644 --- a/.dotnet/src/Custom/Assistants/AssistantCollectionOptions.cs +++ b/.dotnet/src/Custom/Assistants/AssistantCollectionOptions.cs @@ -1,8 +1,11 @@ +using System.Diagnostics.CodeAnalysis; + namespace OpenAI.Assistants; /// /// Represents addition options available when requesting a collection of instances. /// +[Experimental("OPENAI001")] public class AssistantCollectionOptions { /// diff --git a/.dotnet/src/Custom/Assistants/AssistantCreationOptions.cs b/.dotnet/src/Custom/Assistants/AssistantCreationOptions.cs index c00b6e82e..81a817f02 100644 --- a/.dotnet/src/Custom/Assistants/AssistantCreationOptions.cs +++ b/.dotnet/src/Custom/Assistants/AssistantCreationOptions.cs @@ -1,10 +1,12 @@ using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; namespace OpenAI.Assistants; /// /// Represents additional options available when creating a new . /// +[Experimental("OPENAI001")] [CodeGenModel("CreateAssistantRequest")] [CodeGenSuppress(nameof(AssistantCreationOptions), typeof(string))] public partial class AssistantCreationOptions @@ -51,4 +53,4 @@ public AssistantCreationOptions() Metadata = new ChangeTrackingDictionary(); Tools = new ChangeTrackingList(); } -} \ No newline at end of file +} diff --git a/.dotnet/src/Custom/Assistants/AssistantModificationOptions.cs b/.dotnet/src/Custom/Assistants/AssistantModificationOptions.cs index bbd8b2efb..6d2544983 100644 --- a/.dotnet/src/Custom/Assistants/AssistantModificationOptions.cs +++ b/.dotnet/src/Custom/Assistants/AssistantModificationOptions.cs @@ -1,10 +1,12 @@ using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; namespace OpenAI.Assistants; /// /// Represents additional options available when modifying an existing . /// +[Experimental("OPENAI001")] [CodeGenModel("ModifyAssistantRequest")] public partial class AssistantModificationOptions { @@ -40,4 +42,4 @@ public partial class AssistantModificationOptions /// [CodeGenMember("TopP")] public float? NucleusSamplingFactor { get; set; } -} \ No newline at end of file +} diff --git a/.dotnet/src/Custom/Assistants/AssistantResponseFormat.cs b/.dotnet/src/Custom/Assistants/AssistantResponseFormat.cs index c87b9b076..597bbb6b4 100644 --- a/.dotnet/src/Custom/Assistants/AssistantResponseFormat.cs +++ b/.dotnet/src/Custom/Assistants/AssistantResponseFormat.cs @@ -2,9 +2,11 @@ using System; using System.ClientModel.Primitives; using System.ComponentModel; +using System.Diagnostics.CodeAnalysis; namespace OpenAI.Assistants; +[Experimental("OPENAI001")] [CodeGenModel("AssistantResponseFormat")] public partial class AssistantResponseFormat : IEquatable, IEquatable { @@ -106,4 +108,4 @@ public override string ToString() return ModelReaderWriter.Write(this).ToString(); } } -} \ No newline at end of file +} diff --git a/.dotnet/src/Custom/Assistants/AssistantThread.cs b/.dotnet/src/Custom/Assistants/AssistantThread.cs index 376766668..ea5e65f72 100644 --- a/.dotnet/src/Custom/Assistants/AssistantThread.cs +++ b/.dotnet/src/Custom/Assistants/AssistantThread.cs @@ -1,5 +1,8 @@ +using System.Diagnostics.CodeAnalysis; + namespace OpenAI.Assistants; +[Experimental("OPENAI001")] [CodeGenModel("ThreadObject")] public partial class AssistantThread { diff --git a/.dotnet/src/Custom/Assistants/CodeInterpreterToolDefinition.Serialization.cs b/.dotnet/src/Custom/Assistants/CodeInterpreterToolDefinition.Serialization.cs index 6318e87c7..8d72bf750 100644 --- a/.dotnet/src/Custom/Assistants/CodeInterpreterToolDefinition.Serialization.cs +++ b/.dotnet/src/Custom/Assistants/CodeInterpreterToolDefinition.Serialization.cs @@ -1,11 +1,10 @@ -using System; -using System.ClientModel; using System.ClientModel.Primitives; -using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Text.Json; namespace OpenAI.Assistants; +[Experimental("OPENAI001")] [CodeGenSuppress("global::System.ClientModel.Primitives.IJsonModel.Write", typeof(Utf8JsonWriter), typeof(ModelReaderWriterOptions))] public partial class CodeInterpreterToolDefinition : IJsonModel { @@ -23,4 +22,4 @@ protected override void WriteCore(Utf8JsonWriter writer, ModelReaderWriterOption writer.WriteSerializedAdditionalRawData(SerializedAdditionalRawData, options); writer.WriteEndObject(); } -} \ No newline at end of file +} diff --git a/.dotnet/src/Custom/Assistants/CodeInterpreterToolResources.cs b/.dotnet/src/Custom/Assistants/CodeInterpreterToolResources.cs index 82f354922..6b763dc67 100644 --- a/.dotnet/src/Custom/Assistants/CodeInterpreterToolResources.cs +++ b/.dotnet/src/Custom/Assistants/CodeInterpreterToolResources.cs @@ -1,8 +1,10 @@ using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; namespace OpenAI.Assistants; /// The AssistantObjectToolResourcesCodeInterpreter. +[Experimental("OPENAI001")] [CodeGenModel("AssistantObjectToolResourcesCodeInterpreter")] public partial class CodeInterpreterToolResources { diff --git a/.dotnet/src/Custom/Assistants/FileSearchToolDefinition.Serialization.cs b/.dotnet/src/Custom/Assistants/FileSearchToolDefinition.Serialization.cs index 19cd98074..36968d793 100644 --- a/.dotnet/src/Custom/Assistants/FileSearchToolDefinition.Serialization.cs +++ b/.dotnet/src/Custom/Assistants/FileSearchToolDefinition.Serialization.cs @@ -1,7 +1,4 @@ -using System; -using System.ClientModel; using System.ClientModel.Primitives; -using System.Collections.Generic; using System.Text.Json; namespace OpenAI.Assistants; diff --git a/.dotnet/src/Custom/Assistants/FileSearchToolDefinition.cs b/.dotnet/src/Custom/Assistants/FileSearchToolDefinition.cs index 2bc8efff7..1fb69bec1 100644 --- a/.dotnet/src/Custom/Assistants/FileSearchToolDefinition.cs +++ b/.dotnet/src/Custom/Assistants/FileSearchToolDefinition.cs @@ -1,9 +1,8 @@ -using System; -using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; namespace OpenAI.Assistants; +[Experimental("OPENAI001")] [CodeGenModel("AssistantToolsFileSearch")] [CodeGenSuppress(nameof(FileSearchToolDefinition))] public partial class FileSearchToolDefinition : ToolDefinition diff --git a/.dotnet/src/Custom/Assistants/FileSearchToolResources.cs b/.dotnet/src/Custom/Assistants/FileSearchToolResources.cs index 53e0d6bcf..8c199b06d 100644 --- a/.dotnet/src/Custom/Assistants/FileSearchToolResources.cs +++ b/.dotnet/src/Custom/Assistants/FileSearchToolResources.cs @@ -1,9 +1,11 @@ using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Text.Json; namespace OpenAI.Assistants; +[Experimental("OPENAI001")] [CodeGenModel("ToolResourcesFileSearch")] [CodeGenSerialization(nameof(NewVectorStores), "vector_stores", SerializationValueHook = nameof(SerializeNewVectorStores))] public partial class FileSearchToolResources diff --git a/.dotnet/src/Custom/Assistants/FunctionToolDefinition.Serialization.cs b/.dotnet/src/Custom/Assistants/FunctionToolDefinition.Serialization.cs index 701725671..6d6147d47 100644 --- a/.dotnet/src/Custom/Assistants/FunctionToolDefinition.Serialization.cs +++ b/.dotnet/src/Custom/Assistants/FunctionToolDefinition.Serialization.cs @@ -1,7 +1,4 @@ -using System; -using System.ClientModel; using System.ClientModel.Primitives; -using System.Collections.Generic; using System.Text.Json; namespace OpenAI.Assistants; @@ -25,4 +22,4 @@ protected override void WriteCore(Utf8JsonWriter writer, ModelReaderWriterOption writer.WriteSerializedAdditionalRawData(SerializedAdditionalRawData, options); writer.WriteEndObject(); } -} \ No newline at end of file +} diff --git a/.dotnet/src/Custom/Assistants/FunctionToolDefinition.cs b/.dotnet/src/Custom/Assistants/FunctionToolDefinition.cs index 70e2ba163..7ceaa6435 100644 --- a/.dotnet/src/Custom/Assistants/FunctionToolDefinition.cs +++ b/.dotnet/src/Custom/Assistants/FunctionToolDefinition.cs @@ -4,6 +4,7 @@ namespace OpenAI.Assistants; +[Experimental("OPENAI001")] [CodeGenModel("AssistantToolsFunction")] [CodeGenSuppress(nameof(FunctionToolDefinition), typeof(InternalFunctionDefinition))] public partial class FunctionToolDefinition : ToolDefinition diff --git a/.dotnet/src/Custom/Assistants/GeneratorStubs.cs b/.dotnet/src/Custom/Assistants/GeneratorStubs.cs index 9efb3dfb5..ff9c45b78 100644 --- a/.dotnet/src/Custom/Assistants/GeneratorStubs.cs +++ b/.dotnet/src/Custom/Assistants/GeneratorStubs.cs @@ -1,51 +1,66 @@ +using System.Diagnostics.CodeAnalysis; + namespace OpenAI.Assistants; /* * This file stubs and performs minimal customization to generated public types for the OpenAI.Assistants namespace * that are not otherwise attributed elsewhere. */ - [CodeGenModel("AssistantToolsCode")] public partial class CodeInterpreterToolDefinition : ToolDefinition { } +[Experimental("OPENAI001")] [CodeGenModel("MessageObjectStatus")] public readonly partial struct MessageStatus { } +[Experimental("OPENAI001")] [CodeGenModel("MessageObjectIncompleteDetails")] public partial class MessageFailureDetails { } +[Experimental("OPENAI001")] [CodeGenModel("MessageObjectIncompleteDetailsReason")] public readonly partial struct MessageFailureReason { } +[Experimental("OPENAI001")] [CodeGenModel("RunCompletionUsage")] public partial class RunTokenUsage { } +[Experimental("OPENAI001")] [CodeGenModel("RunObjectLastError")] public partial class RunError { } +[Experimental("OPENAI001")] [CodeGenModel("RunObjectLastErrorCode")] public readonly partial struct RunErrorCode { } +[Experimental("OPENAI001")] [CodeGenModel("RunObjectIncompleteDetails")] public partial class RunIncompleteDetails { } +[Experimental("OPENAI001")] [CodeGenModel("RunObjectIncompleteDetailsReason")] public readonly partial struct RunIncompleteReason { } +[Experimental("OPENAI001")] [CodeGenModel("RunStepObjectType")] public readonly partial struct RunStepType { } +[Experimental("OPENAI001")] [CodeGenModel("RunStepObjectStatus")] public readonly partial struct RunStepStatus { } +[Experimental("OPENAI001")] [CodeGenModel("RunStepObjectLastError")] public partial class RunStepError { } +[Experimental("OPENAI001")] [CodeGenModel("RunStepObjectLastErrorCode")] public readonly partial struct RunStepErrorCode { } +[Experimental("OPENAI001")] [CodeGenModel("RunStepCompletionUsage")] public partial class RunStepTokenUsage { } +[Experimental("OPENAI001")] [CodeGenModel("RunStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject")] public partial class RunStepCodeInterpreterOutput { } diff --git a/.dotnet/src/Custom/Assistants/Internal/GeneratorStubs.Internal.cs b/.dotnet/src/Custom/Assistants/Internal/GeneratorStubs.Internal.cs index 08f753db0..4254faf50 100644 --- a/.dotnet/src/Custom/Assistants/Internal/GeneratorStubs.Internal.cs +++ b/.dotnet/src/Custom/Assistants/Internal/GeneratorStubs.Internal.cs @@ -1,3 +1,5 @@ +using System.Diagnostics.CodeAnalysis; + namespace OpenAI.Assistants; /* @@ -40,6 +42,7 @@ internal partial class InternalMessageDeltaContentImageFileObject { } internal partial class InternalMessageDeltaContentImageUrlObject { } [CodeGenModel("MessageDeltaObjectDelta")] +[Experimental("OPENAI001")] internal partial class InternalMessageDeltaObjectDelta { [CodeGenMember("Role")] @@ -95,6 +98,7 @@ internal partial class InternalDeleteMessageResponse { } internal readonly partial struct InternalDeleteMessageResponseObject { } [CodeGenModel("CreateThreadAndRunRequest")] +[Experimental("OPENAI001")] internal partial class InternalCreateThreadAndRunRequest { public string Model { get; set; } @@ -151,30 +155,35 @@ internal partial class InternalRunObjectRequiredActionSubmitToolOutputs { privat internal partial class InternalRunToolCallObjectFunction { } [CodeGenModel("ListAssistantsResponse")] +[Experimental("OPENAI001")] internal partial class InternalListAssistantsResponse : IInternalListResponse { } [CodeGenModel("ListAssistantsResponseObject")] internal readonly partial struct InternalListAssistantsResponseObject {} [CodeGenModel("ListThreadsResponse")] +[Experimental("OPENAI001")] internal partial class InternalListThreadsResponse : IInternalListResponse { } [CodeGenModel("ListThreadsResponseObject")] internal readonly partial struct InternalListThreadsResponseObject {} [CodeGenModel("ListMessagesResponse")] +[Experimental("OPENAI001")] internal partial class InternalListMessagesResponse : IInternalListResponse { } [CodeGenModel("ListMessagesResponseObject")] internal readonly partial struct InternalListMessagesResponseObject {} [CodeGenModel("ListRunsResponse")] +[Experimental("OPENAI001")] internal partial class InternalListRunsResponse : IInternalListResponse { } [CodeGenModel("ListRunsResponseObject")] internal readonly partial struct InternalListRunsResponseObject {} [CodeGenModel("ListRunStepsResponse")] +[Experimental("OPENAI001")] internal partial class InternalListRunStepsResponse : IInternalListResponse { } [CodeGenModel("ListRunStepsResponseObject")] diff --git a/.dotnet/src/Custom/Assistants/Internal/InternalAssistantMessageClient.cs b/.dotnet/src/Custom/Assistants/Internal/InternalAssistantMessageClient.cs index 625f36158..608c8f8b5 100644 --- a/.dotnet/src/Custom/Assistants/Internal/InternalAssistantMessageClient.cs +++ b/.dotnet/src/Custom/Assistants/Internal/InternalAssistantMessageClient.cs @@ -1,9 +1,11 @@ using System; using System.ClientModel; using System.ClientModel.Primitives; +using System.Diagnostics.CodeAnalysis; namespace OpenAI.Assistants; +[Experimental("OPENAI001")] [CodeGenClient("Messages")] [CodeGenSuppress("InternalAssistantMessageClient", typeof(ClientPipeline), typeof(ApiKeyCredential), typeof(Uri))] [CodeGenSuppress("CreateMessageAsync", typeof(string), typeof(MessageCreationOptions))] diff --git a/.dotnet/src/Custom/Assistants/Internal/InternalAssistantResponseFormatPlainTextNoObject.cs b/.dotnet/src/Custom/Assistants/Internal/InternalAssistantResponseFormatPlainTextNoObject.cs index 6c3e2ee7c..9dc7730da 100644 --- a/.dotnet/src/Custom/Assistants/Internal/InternalAssistantResponseFormatPlainTextNoObject.cs +++ b/.dotnet/src/Custom/Assistants/Internal/InternalAssistantResponseFormatPlainTextNoObject.cs @@ -1,5 +1,8 @@ +using System.Diagnostics.CodeAnalysis; + namespace OpenAI.Assistants; +[Experimental("OPENAI001")] internal partial class InternalAssistantResponseFormatPlainTextNoObject : AssistantResponseFormat { public string Value { get; set; } diff --git a/.dotnet/src/Custom/Assistants/Internal/InternalAssistantRunClient.cs b/.dotnet/src/Custom/Assistants/Internal/InternalAssistantRunClient.cs index 8b6474cfe..7fa86916c 100644 --- a/.dotnet/src/Custom/Assistants/Internal/InternalAssistantRunClient.cs +++ b/.dotnet/src/Custom/Assistants/Internal/InternalAssistantRunClient.cs @@ -1,9 +1,11 @@ using System; using System.ClientModel; using System.ClientModel.Primitives; +using System.Diagnostics.CodeAnalysis; namespace OpenAI.Assistants; +[Experimental("OPENAI001")] [CodeGenClient("Runs")] [CodeGenSuppress("InternalAssistantRunClient", typeof(ClientPipeline), typeof(ApiKeyCredential), typeof(Uri))] [CodeGenSuppress("CreateThreadAndRunAsync", typeof(InternalCreateThreadAndRunRequest))] diff --git a/.dotnet/src/Custom/Assistants/Internal/InternalAssistantThreadClient.cs b/.dotnet/src/Custom/Assistants/Internal/InternalAssistantThreadClient.cs index 295a8a492..79b0c1e9d 100644 --- a/.dotnet/src/Custom/Assistants/Internal/InternalAssistantThreadClient.cs +++ b/.dotnet/src/Custom/Assistants/Internal/InternalAssistantThreadClient.cs @@ -1,9 +1,11 @@ using System; using System.ClientModel; using System.ClientModel.Primitives; +using System.Diagnostics.CodeAnalysis; namespace OpenAI.Assistants; +[Experimental("OPENAI001")] [CodeGenClient("Threads")] [CodeGenSuppress("InternalAssistantThreadClient", typeof(ClientPipeline), typeof(ApiKeyCredential), typeof(Uri))] [CodeGenSuppress("CreateThreadAsync", typeof(ThreadCreationOptions))] diff --git a/.dotnet/src/Custom/Assistants/Internal/InternalMessageImageFileContent.cs b/.dotnet/src/Custom/Assistants/Internal/InternalMessageImageFileContent.cs index 222a44dc8..7403a0b41 100644 --- a/.dotnet/src/Custom/Assistants/Internal/InternalMessageImageFileContent.cs +++ b/.dotnet/src/Custom/Assistants/Internal/InternalMessageImageFileContent.cs @@ -1,4 +1,5 @@ using System; +using System.Diagnostics.CodeAnalysis; namespace OpenAI.Assistants; @@ -9,6 +10,7 @@ namespace OpenAI.Assistants; /// Use the method to /// create an instance of this type. /// +[Experimental("OPENAI001")] [CodeGenModel("MessageContentImageFileObject")] [CodeGenSuppress("InternalMessageImageFileContent", typeof(InternalMessageContentItemFileObjectImageFile))] internal partial class InternalMessageImageFileContent diff --git a/.dotnet/src/Custom/Assistants/Internal/InternalMessageImageUrlContent.cs b/.dotnet/src/Custom/Assistants/Internal/InternalMessageImageUrlContent.cs index f007fec8c..77364ffd2 100644 --- a/.dotnet/src/Custom/Assistants/Internal/InternalMessageImageUrlContent.cs +++ b/.dotnet/src/Custom/Assistants/Internal/InternalMessageImageUrlContent.cs @@ -1,4 +1,5 @@ using System; +using System.Diagnostics.CodeAnalysis; namespace OpenAI.Assistants; @@ -9,6 +10,7 @@ namespace OpenAI.Assistants; /// Use the method to /// create an instance of this type. /// +[Experimental("OPENAI001")] [CodeGenModel("MessageContentImageUrlObject")] [CodeGenSuppress("MessageImageUrlContent", typeof(InternalMessageContentImageUrlObjectImageUrl))] internal partial class InternalMessageImageUrlContent diff --git a/.dotnet/src/Custom/Assistants/Internal/InternalRequiredToolCall.cs b/.dotnet/src/Custom/Assistants/Internal/InternalRequiredToolCall.cs index 4d7fc35a1..3fa09051f 100644 --- a/.dotnet/src/Custom/Assistants/Internal/InternalRequiredToolCall.cs +++ b/.dotnet/src/Custom/Assistants/Internal/InternalRequiredToolCall.cs @@ -1,3 +1,5 @@ +using System.Diagnostics.CodeAnalysis; + namespace OpenAI.Assistants; /// @@ -11,4 +13,5 @@ namespace OpenAI.Assistants; /// /// /// +[Experimental("OPENAI001")] internal abstract partial class InternalRequiredToolCall : RequiredAction { } \ No newline at end of file diff --git a/.dotnet/src/Custom/Assistants/Internal/InternalResponseMessageTextContent.cs b/.dotnet/src/Custom/Assistants/Internal/InternalResponseMessageTextContent.cs index 0d7b79794..62557cdfe 100644 --- a/.dotnet/src/Custom/Assistants/Internal/InternalResponseMessageTextContent.cs +++ b/.dotnet/src/Custom/Assistants/Internal/InternalResponseMessageTextContent.cs @@ -1,10 +1,12 @@ using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; namespace OpenAI.Assistants; /// /// Represents an item of annotated text content within an Assistants API response message. /// +[Experimental("OPENAI001")] [CodeGenModel("MessageContentTextObject")] internal partial class InternalResponseMessageTextContent { diff --git a/.dotnet/src/Custom/Assistants/Internal/InternalRunStepCodeInterpreterLogOutput.cs b/.dotnet/src/Custom/Assistants/Internal/InternalRunStepCodeInterpreterLogOutput.cs index 4d0a1d8e0..b689fe8c5 100644 --- a/.dotnet/src/Custom/Assistants/Internal/InternalRunStepCodeInterpreterLogOutput.cs +++ b/.dotnet/src/Custom/Assistants/Internal/InternalRunStepCodeInterpreterLogOutput.cs @@ -1,6 +1,9 @@ +using System.Diagnostics.CodeAnalysis; + namespace OpenAI.Assistants { /// Text output from the Code Interpreter tool call as part of a run step. + [Experimental("OPENAI001")] [CodeGenModel("RunStepDetailsToolCallsCodeOutputLogsObject")] internal partial class InternalRunStepCodeInterpreterLogOutput : RunStepCodeInterpreterOutput { diff --git a/.dotnet/src/Custom/Assistants/Internal/InternalRunStepCodeInterpreterToolCallDetails.cs b/.dotnet/src/Custom/Assistants/Internal/InternalRunStepCodeInterpreterToolCallDetails.cs index 71f873f02..15a7b9d9a 100644 --- a/.dotnet/src/Custom/Assistants/Internal/InternalRunStepCodeInterpreterToolCallDetails.cs +++ b/.dotnet/src/Custom/Assistants/Internal/InternalRunStepCodeInterpreterToolCallDetails.cs @@ -1,7 +1,9 @@ using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; namespace OpenAI.Assistants; +[Experimental("OPENAI001")] [CodeGenModel("RunStepDetailsToolCallsCodeObject")] internal partial class InternalRunStepCodeInterpreterToolCallDetails { diff --git a/.dotnet/src/Custom/Assistants/Internal/InternalRunStepDetailsMessageCreationObject.cs b/.dotnet/src/Custom/Assistants/Internal/InternalRunStepDetailsMessageCreationObject.cs index 9c0ab12f5..7d2bb0fe8 100644 --- a/.dotnet/src/Custom/Assistants/Internal/InternalRunStepDetailsMessageCreationObject.cs +++ b/.dotnet/src/Custom/Assistants/Internal/InternalRunStepDetailsMessageCreationObject.cs @@ -1,5 +1,8 @@ +using System.Diagnostics.CodeAnalysis; + namespace OpenAI.Assistants; +[Experimental("OPENAI001")] [CodeGenModel("RunStepDetailsMessageCreationObject")] internal partial class InternalRunStepDetailsMessageCreationObject : RunStepDetails { diff --git a/.dotnet/src/Custom/Assistants/Internal/InternalRunStepToolCallDetailsCollection.cs b/.dotnet/src/Custom/Assistants/Internal/InternalRunStepToolCallDetailsCollection.cs index 59e91f6e1..98dcb7d3c 100644 --- a/.dotnet/src/Custom/Assistants/Internal/InternalRunStepToolCallDetailsCollection.cs +++ b/.dotnet/src/Custom/Assistants/Internal/InternalRunStepToolCallDetailsCollection.cs @@ -1,8 +1,10 @@ using System.Collections; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; namespace OpenAI.Assistants; +[Experimental("OPENAI001")] [CodeGenModel("RunStepDetailsToolCallsObject")] internal partial class InternalRunStepDetailsToolCallsObject : IReadOnlyList { diff --git a/.dotnet/src/Custom/Assistants/Internal/Pagination/AssistantsPageEnumerator.cs b/.dotnet/src/Custom/Assistants/Internal/Pagination/AssistantsPageEnumerator.cs index 7f970feca..3539840f1 100644 --- a/.dotnet/src/Custom/Assistants/Internal/Pagination/AssistantsPageEnumerator.cs +++ b/.dotnet/src/Custom/Assistants/Internal/Pagination/AssistantsPageEnumerator.cs @@ -1,6 +1,7 @@ using System; using System.ClientModel; using System.ClientModel.Primitives; +using System.Diagnostics.CodeAnalysis; using System.Text.Json; using System.Threading.Tasks; @@ -8,6 +9,7 @@ namespace OpenAI.Assistants; +[Experimental("OPENAI001")] internal partial class AssistantsPageEnumerator : PageEnumerator { private readonly ClientPipeline _pipeline; diff --git a/.dotnet/src/Custom/Assistants/Internal/Pagination/MessagesPageEnumerator.cs b/.dotnet/src/Custom/Assistants/Internal/Pagination/MessagesPageEnumerator.cs index 860bfbe0d..b8c22c225 100644 --- a/.dotnet/src/Custom/Assistants/Internal/Pagination/MessagesPageEnumerator.cs +++ b/.dotnet/src/Custom/Assistants/Internal/Pagination/MessagesPageEnumerator.cs @@ -1,6 +1,7 @@ using System; using System.ClientModel; using System.ClientModel.Primitives; +using System.Diagnostics.CodeAnalysis; using System.Text.Json; using System.Threading.Tasks; @@ -8,6 +9,7 @@ namespace OpenAI.Assistants; +[Experimental("OPENAI001")] internal partial class MessagesPageEnumerator : PageEnumerator { private readonly ClientPipeline _pipeline; diff --git a/.dotnet/src/Custom/Assistants/Internal/Pagination/RunStepsPageEnumerator.cs b/.dotnet/src/Custom/Assistants/Internal/Pagination/RunStepsPageEnumerator.cs index 1245c4763..8993701c3 100644 --- a/.dotnet/src/Custom/Assistants/Internal/Pagination/RunStepsPageEnumerator.cs +++ b/.dotnet/src/Custom/Assistants/Internal/Pagination/RunStepsPageEnumerator.cs @@ -1,6 +1,7 @@ using System; using System.ClientModel; using System.ClientModel.Primitives; +using System.Diagnostics.CodeAnalysis; using System.Text.Json; using System.Threading.Tasks; @@ -8,6 +9,7 @@ namespace OpenAI.Assistants; +[Experimental("OPENAI001")] internal partial class RunStepsPageEnumerator : PageEnumerator { private readonly ClientPipeline _pipeline; diff --git a/.dotnet/src/Custom/Assistants/Internal/Pagination/RunsPageEnumerator.cs b/.dotnet/src/Custom/Assistants/Internal/Pagination/RunsPageEnumerator.cs index 879f389be..061c3ddb7 100644 --- a/.dotnet/src/Custom/Assistants/Internal/Pagination/RunsPageEnumerator.cs +++ b/.dotnet/src/Custom/Assistants/Internal/Pagination/RunsPageEnumerator.cs @@ -1,6 +1,7 @@ using System; using System.ClientModel; using System.ClientModel.Primitives; +using System.Diagnostics.CodeAnalysis; using System.Text.Json; using System.Threading.Tasks; @@ -8,6 +9,7 @@ namespace OpenAI.Assistants; +[Experimental("OPENAI001")] internal partial class RunsPageEnumerator : PageEnumerator { private readonly ClientPipeline _pipeline; diff --git a/.dotnet/src/Custom/Assistants/Internal/UnknownAssistantToolDefinition.Serialization.cs b/.dotnet/src/Custom/Assistants/Internal/UnknownAssistantToolDefinition.Serialization.cs index 3a80df55e..b1e2c7dc0 100644 --- a/.dotnet/src/Custom/Assistants/Internal/UnknownAssistantToolDefinition.Serialization.cs +++ b/.dotnet/src/Custom/Assistants/Internal/UnknownAssistantToolDefinition.Serialization.cs @@ -1,11 +1,10 @@ -using System; -using System.ClientModel; using System.ClientModel.Primitives; -using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Text.Json; namespace OpenAI.Assistants; +[Experimental("OPENAI001")] [CodeGenSuppress("global::System.ClientModel.Primitives.IJsonModel.Write", typeof(Utf8JsonWriter), typeof(ModelReaderWriterOptions))] internal partial class UnknownAssistantToolDefinition : IJsonModel { diff --git a/.dotnet/src/Custom/Assistants/MessageCollectionOptions.cs b/.dotnet/src/Custom/Assistants/MessageCollectionOptions.cs index ac4bf2215..f46bebb21 100644 --- a/.dotnet/src/Custom/Assistants/MessageCollectionOptions.cs +++ b/.dotnet/src/Custom/Assistants/MessageCollectionOptions.cs @@ -1,8 +1,11 @@ +using System.Diagnostics.CodeAnalysis; + namespace OpenAI.Assistants; /// /// Represents addition options available when requesting a collection of instances. /// +[Experimental("OPENAI001")] public class MessageCollectionOptions { /// diff --git a/.dotnet/src/Custom/Assistants/MessageContent.Serialization.cs b/.dotnet/src/Custom/Assistants/MessageContent.Serialization.cs index 77d646504..6bd5ad674 100644 --- a/.dotnet/src/Custom/Assistants/MessageContent.Serialization.cs +++ b/.dotnet/src/Custom/Assistants/MessageContent.Serialization.cs @@ -1,4 +1,5 @@ using System.ClientModel.Primitives; +using System.Diagnostics.CodeAnalysis; using System.Text.Json; namespace OpenAI.Assistants; @@ -38,4 +39,4 @@ internal static MessageContent DeserializeMessageContent(JsonElement element, Mo return null; } -} \ No newline at end of file +} diff --git a/.dotnet/src/Custom/Assistants/MessageContent.cs b/.dotnet/src/Custom/Assistants/MessageContent.cs index 8043d79cb..f8b9840ee 100644 --- a/.dotnet/src/Custom/Assistants/MessageContent.cs +++ b/.dotnet/src/Custom/Assistants/MessageContent.cs @@ -1,8 +1,10 @@ using System; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; namespace OpenAI.Assistants; +[Experimental("OPENAI001")] [CodeGenModel("MessageContent")] public abstract partial class MessageContent { diff --git a/.dotnet/src/Custom/Assistants/MessageCreationAttachment.cs b/.dotnet/src/Custom/Assistants/MessageCreationAttachment.cs index 46827002a..d3409532f 100644 --- a/.dotnet/src/Custom/Assistants/MessageCreationAttachment.cs +++ b/.dotnet/src/Custom/Assistants/MessageCreationAttachment.cs @@ -1,9 +1,11 @@ using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Text.Json; namespace OpenAI.Assistants; +[Experimental("OPENAI001")] [CodeGenModel("CreateMessageRequestAttachment")] [CodeGenSerialization(nameof(Tools), "tools", SerializationValueHook = nameof(SerializeTools), DeserializationValueHook = nameof(DeserializeTools))] public partial class MessageCreationAttachment @@ -42,4 +44,4 @@ private static void DeserializeTools(JsonProperty property, ref IReadOnlyList /// Represents additional options available when creating a new . /// +[Experimental("OPENAI001")] [CodeGenModel("CreateMessageRequest")] [CodeGenSuppress("MessageCreationOptions", typeof(MessageRole), typeof(IEnumerable))] [CodeGenSerialization(nameof(Content), SerializationValueHook=nameof(SerializeContent))] @@ -38,4 +40,4 @@ internal MessageCreationOptions(IEnumerable content) : this() { Content = [.. content]; } -} \ No newline at end of file +} diff --git a/.dotnet/src/Custom/Assistants/MessageImageDetail.Serialization.cs b/.dotnet/src/Custom/Assistants/MessageImageDetail.Serialization.cs index 1aa776a84..a51e71db3 100644 --- a/.dotnet/src/Custom/Assistants/MessageImageDetail.Serialization.cs +++ b/.dotnet/src/Custom/Assistants/MessageImageDetail.Serialization.cs @@ -1,6 +1,9 @@ using System; +using System.Diagnostics.CodeAnalysis; namespace OpenAI.Assistants; + +[Experimental("OPENAI001")] internal static partial class MessageImageDetailExtensions { public static string ToSerialString(this MessageImageDetail value) => value switch diff --git a/.dotnet/src/Custom/Assistants/MessageImageDetail.cs b/.dotnet/src/Custom/Assistants/MessageImageDetail.cs index 17cc7827e..83768cfcd 100644 --- a/.dotnet/src/Custom/Assistants/MessageImageDetail.cs +++ b/.dotnet/src/Custom/Assistants/MessageImageDetail.cs @@ -1,9 +1,12 @@ +using System.Diagnostics.CodeAnalysis; + namespace OpenAI.Assistants; /// /// The available detail settings to use when processing an image. /// These settings balance token consumption and the resolution of evaluation performed. /// +[Experimental("OPENAI001")] public enum MessageImageDetail { /// Default. Allows the model to automatically select detail. diff --git a/.dotnet/src/Custom/Assistants/MessageModificationOptions.cs b/.dotnet/src/Custom/Assistants/MessageModificationOptions.cs index 3c43bea30..55cffbb38 100644 --- a/.dotnet/src/Custom/Assistants/MessageModificationOptions.cs +++ b/.dotnet/src/Custom/Assistants/MessageModificationOptions.cs @@ -1,9 +1,12 @@ +using System.Diagnostics.CodeAnalysis; + namespace OpenAI.Assistants; /// /// Represents additional options available when modifying an existing . /// +[Experimental("OPENAI001")] [CodeGenModel("ModifyMessageRequest")] public partial class MessageModificationOptions { -} \ No newline at end of file +} diff --git a/.dotnet/src/Custom/Assistants/MessageRole.cs b/.dotnet/src/Custom/Assistants/MessageRole.cs index 6aae4c418..28dce0718 100644 --- a/.dotnet/src/Custom/Assistants/MessageRole.cs +++ b/.dotnet/src/Custom/Assistants/MessageRole.cs @@ -1,5 +1,8 @@ +using System.Diagnostics.CodeAnalysis; + namespace OpenAI.Assistants; +[Experimental("OPENAI001")] [CodeGenModel("CreateMessageRequestRole")] public enum MessageRole { @@ -14,4 +17,4 @@ public enum MessageRole /// [CodeGenMember("Assistant")] Assistant, -} \ No newline at end of file +} diff --git a/.dotnet/src/Custom/Assistants/RequiredAction.cs b/.dotnet/src/Custom/Assistants/RequiredAction.cs index 3de39cd43..10e3a0d38 100644 --- a/.dotnet/src/Custom/Assistants/RequiredAction.cs +++ b/.dotnet/src/Custom/Assistants/RequiredAction.cs @@ -1,3 +1,5 @@ +using System.Diagnostics.CodeAnalysis; + namespace OpenAI.Assistants; /// @@ -11,6 +13,7 @@ namespace OpenAI.Assistants; /// /// /// +[Experimental("OPENAI001")] public abstract partial class RequiredAction { /// diff --git a/.dotnet/src/Custom/Assistants/RunCollectionOptions.cs b/.dotnet/src/Custom/Assistants/RunCollectionOptions.cs index f64482328..c72cb6a6a 100644 --- a/.dotnet/src/Custom/Assistants/RunCollectionOptions.cs +++ b/.dotnet/src/Custom/Assistants/RunCollectionOptions.cs @@ -1,8 +1,11 @@ +using System.Diagnostics.CodeAnalysis; + namespace OpenAI.Assistants; /// /// Represents addition options available when requesting a collection of instances. /// +[Experimental("OPENAI001")] public class RunCollectionOptions { /// diff --git a/.dotnet/src/Custom/Assistants/RunCreationOptions.cs b/.dotnet/src/Custom/Assistants/RunCreationOptions.cs index bcc45ee2f..f4d242f20 100644 --- a/.dotnet/src/Custom/Assistants/RunCreationOptions.cs +++ b/.dotnet/src/Custom/Assistants/RunCreationOptions.cs @@ -1,5 +1,6 @@ using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Text.Json; @@ -8,6 +9,7 @@ namespace OpenAI.Assistants; /// /// Represents additional options available when creating a new . /// +[Experimental("OPENAI001")] [CodeGenModel("CreateRunRequest")] [CodeGenSuppress("RunCreationOptions", typeof(string))] [CodeGenSerialization(nameof(ToolConstraint), "tool_choice", SerializationValueHook = nameof(SerializeToolConstraint))] @@ -135,4 +137,4 @@ public RunCreationOptions() private void SerializeToolConstraint(Utf8JsonWriter writer, ModelReaderWriterOptions options) => writer.WriteObjectValue(ToolConstraint, options); -} \ No newline at end of file +} diff --git a/.dotnet/src/Custom/Assistants/RunModificationOptions.cs b/.dotnet/src/Custom/Assistants/RunModificationOptions.cs index 561074b99..8b8a125b8 100644 --- a/.dotnet/src/Custom/Assistants/RunModificationOptions.cs +++ b/.dotnet/src/Custom/Assistants/RunModificationOptions.cs @@ -1,9 +1,12 @@ +using System.Diagnostics.CodeAnalysis; + namespace OpenAI.Assistants; /// /// Represents additional options available when modifying an existing . /// +[Experimental("OPENAI001")] [CodeGenModel("ModifyRunRequest")] public partial class RunModificationOptions { -} \ No newline at end of file +} diff --git a/.dotnet/src/Custom/Assistants/RunStatus.cs b/.dotnet/src/Custom/Assistants/RunStatus.cs index b2b5da90e..6075e7460 100644 --- a/.dotnet/src/Custom/Assistants/RunStatus.cs +++ b/.dotnet/src/Custom/Assistants/RunStatus.cs @@ -1,5 +1,8 @@ +using System.Diagnostics.CodeAnalysis; + namespace OpenAI.Assistants; +[Experimental("OPENAI001")] [CodeGenModel("RunObjectStatus")] public readonly partial struct RunStatus { @@ -17,4 +20,4 @@ public bool IsTerminal || _value == FailedValue || _value == IncompleteValue || _value == CancelledValue; -} \ No newline at end of file +} diff --git a/.dotnet/src/Custom/Assistants/RunStep.cs b/.dotnet/src/Custom/Assistants/RunStep.cs index 061cb3cd8..568e7bc82 100644 --- a/.dotnet/src/Custom/Assistants/RunStep.cs +++ b/.dotnet/src/Custom/Assistants/RunStep.cs @@ -1,5 +1,8 @@ +using System.Diagnostics.CodeAnalysis; + namespace OpenAI.Assistants; +[Experimental("OPENAI001")] [CodeGenModel("RunStepObject")] public partial class RunStep { diff --git a/.dotnet/src/Custom/Assistants/RunStepCollectionOptions.cs b/.dotnet/src/Custom/Assistants/RunStepCollectionOptions.cs index d85097058..a558c468c 100644 --- a/.dotnet/src/Custom/Assistants/RunStepCollectionOptions.cs +++ b/.dotnet/src/Custom/Assistants/RunStepCollectionOptions.cs @@ -1,8 +1,11 @@ +using System.Diagnostics.CodeAnalysis; + namespace OpenAI.Assistants; /// /// Represents addition options available when requesting a collection of instances. /// +[Experimental("OPENAI001")] public class RunStepCollectionOptions { /// diff --git a/.dotnet/src/Custom/Assistants/RunStepDetails.cs b/.dotnet/src/Custom/Assistants/RunStepDetails.cs index 8ade16fc9..e003f0ece 100644 --- a/.dotnet/src/Custom/Assistants/RunStepDetails.cs +++ b/.dotnet/src/Custom/Assistants/RunStepDetails.cs @@ -1,7 +1,9 @@ using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; namespace OpenAI.Assistants { + [Experimental("OPENAI001")] [CodeGenModel("RunStepObjectStepDetails")] public abstract partial class RunStepDetails { diff --git a/.dotnet/src/Custom/Assistants/RunStepToolCall.cs b/.dotnet/src/Custom/Assistants/RunStepToolCall.cs index 3cb729b12..8fa52a114 100644 --- a/.dotnet/src/Custom/Assistants/RunStepToolCall.cs +++ b/.dotnet/src/Custom/Assistants/RunStepToolCall.cs @@ -1,8 +1,10 @@ using System; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; namespace OpenAI.Assistants; +[Experimental("OPENAI001")] [CodeGenModel("RunStepDetailsToolCallsObjectToolCallsObject")] public partial class RunStepToolCall { @@ -31,4 +33,4 @@ private InternalRunStepCodeInterpreterToolCallDetails AsCodeInterpreter => this as InternalRunStepCodeInterpreterToolCallDetails; private InternalRunStepFunctionToolCallDetails AsFunction => this as InternalRunStepFunctionToolCallDetails; private InternalRunStepFileSearchToolCallDetails AsFileSearch => this as InternalRunStepFileSearchToolCallDetails; -} \ No newline at end of file +} diff --git a/.dotnet/src/Custom/Assistants/RunStepToolCallKind.Serialization.cs b/.dotnet/src/Custom/Assistants/RunStepToolCallKind.Serialization.cs index 869a9ad02..135008b84 100644 --- a/.dotnet/src/Custom/Assistants/RunStepToolCallKind.Serialization.cs +++ b/.dotnet/src/Custom/Assistants/RunStepToolCallKind.Serialization.cs @@ -1,6 +1,9 @@ using System; +using System.Diagnostics.CodeAnalysis; namespace OpenAI.Assistants; + +[Experimental("OPENAI001")] internal static partial class RunStepToolCallKindExtensions { public static string ToSerialString(this RunStepToolCallKind value) => value switch diff --git a/.dotnet/src/Custom/Assistants/RunStepToolCallKind.cs b/.dotnet/src/Custom/Assistants/RunStepToolCallKind.cs index f1d89ab29..6e5011fb7 100644 --- a/.dotnet/src/Custom/Assistants/RunStepToolCallKind.cs +++ b/.dotnet/src/Custom/Assistants/RunStepToolCallKind.cs @@ -1,5 +1,8 @@ +using System.Diagnostics.CodeAnalysis; + namespace OpenAI.Assistants; +[Experimental("OPENAI001")] public enum RunStepToolCallKind { Unknown, diff --git a/.dotnet/src/Custom/Assistants/RunTruncationStrategy.cs b/.dotnet/src/Custom/Assistants/RunTruncationStrategy.cs index 324723a0c..d4328f349 100644 --- a/.dotnet/src/Custom/Assistants/RunTruncationStrategy.cs +++ b/.dotnet/src/Custom/Assistants/RunTruncationStrategy.cs @@ -1,9 +1,11 @@ using System; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; namespace OpenAI.Assistants { /// Controls for how a thread will be truncated prior to the run. Use this to control the intial context window of the run. + [Experimental("OPENAI001")] [CodeGenModel("TruncationObject")] [CodeGenSuppress(nameof(RunTruncationStrategy), typeof(InternalTruncationObjectType))] public partial class RunTruncationStrategy diff --git a/.dotnet/src/Custom/Assistants/Streaming/AsyncStreamingUpdateCollection.cs b/.dotnet/src/Custom/Assistants/Streaming/AsyncStreamingUpdateCollection.cs index 1a44545a5..5873fad92 100644 --- a/.dotnet/src/Custom/Assistants/Streaming/AsyncStreamingUpdateCollection.cs +++ b/.dotnet/src/Custom/Assistants/Streaming/AsyncStreamingUpdateCollection.cs @@ -3,6 +3,7 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Net.ServerSentEvents; using System.Threading; @@ -15,6 +16,7 @@ namespace OpenAI.Assistants; /// /// Implementation of collection abstraction over streaming assistant updates. /// +[Experimental("OPENAI001")] internal class AsyncStreamingUpdateCollection : AsyncCollectionResult { private readonly Func> _getResultAsync; diff --git a/.dotnet/src/Custom/Assistants/Streaming/MessageContentUpdate.cs b/.dotnet/src/Custom/Assistants/Streaming/MessageContentUpdate.cs index ad6944617..579a93af1 100644 --- a/.dotnet/src/Custom/Assistants/Streaming/MessageContentUpdate.cs +++ b/.dotnet/src/Custom/Assistants/Streaming/MessageContentUpdate.cs @@ -1,5 +1,6 @@ using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Text.Json; namespace OpenAI.Assistants; @@ -12,6 +13,7 @@ namespace OpenAI.Assistants; /// and each content subcomponent, such as instances, even if this information /// arrived in the same response chunk. /// +[Experimental("OPENAI001")] public partial class MessageContentUpdate : StreamingUpdate { /// diff --git a/.dotnet/src/Custom/Assistants/Streaming/MessageStatusUpdate.cs b/.dotnet/src/Custom/Assistants/Streaming/MessageStatusUpdate.cs index d6b19cf29..b37fd98ea 100644 --- a/.dotnet/src/Custom/Assistants/Streaming/MessageStatusUpdate.cs +++ b/.dotnet/src/Custom/Assistants/Streaming/MessageStatusUpdate.cs @@ -1,5 +1,6 @@ using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Text.Json; namespace OpenAI.Assistants; @@ -7,6 +8,7 @@ namespace OpenAI.Assistants; /// /// The update type presented when the status of a message changes. /// +[Experimental("OPENAI001")] public class MessageStatusUpdate : StreamingUpdate { internal MessageStatusUpdate(ThreadMessage message, StreamingUpdateReason updateKind) diff --git a/.dotnet/src/Custom/Assistants/Streaming/RequiredActionUpdate.cs b/.dotnet/src/Custom/Assistants/Streaming/RequiredActionUpdate.cs index 2c1899236..bfebfe8b9 100644 --- a/.dotnet/src/Custom/Assistants/Streaming/RequiredActionUpdate.cs +++ b/.dotnet/src/Custom/Assistants/Streaming/RequiredActionUpdate.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Text.Json; namespace OpenAI.Assistants; @@ -11,6 +12,7 @@ namespace OpenAI.Assistants; /// Distinct instances will generated for each required action, meaning that /// parallel function calling will present multiple updates even if the tool calls arrive at the same time. /// +[Experimental("OPENAI001")] public class RequiredActionUpdate : RunUpdate { /// diff --git a/.dotnet/src/Custom/Assistants/Streaming/RunStepDetailsUpdate.cs b/.dotnet/src/Custom/Assistants/Streaming/RunStepDetailsUpdate.cs index 588d3fd7b..710216011 100644 --- a/.dotnet/src/Custom/Assistants/Streaming/RunStepDetailsUpdate.cs +++ b/.dotnet/src/Custom/Assistants/Streaming/RunStepDetailsUpdate.cs @@ -1,6 +1,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Text.Json; namespace OpenAI.Assistants; @@ -8,6 +9,7 @@ namespace OpenAI.Assistants; /// /// The update type presented when run step details, including tool call progress, have changed. /// +[Experimental("OPENAI001")] public class RunStepDetailsUpdate : StreamingUpdate { internal readonly InternalRunStepDelta _delta; diff --git a/.dotnet/src/Custom/Assistants/Streaming/RunStepDetailsUpdateCodeInterpreterOutput.cs b/.dotnet/src/Custom/Assistants/Streaming/RunStepDetailsUpdateCodeInterpreterOutput.cs index c24ea9dd4..77c041f15 100644 --- a/.dotnet/src/Custom/Assistants/Streaming/RunStepDetailsUpdateCodeInterpreterOutput.cs +++ b/.dotnet/src/Custom/Assistants/Streaming/RunStepDetailsUpdateCodeInterpreterOutput.cs @@ -1,5 +1,8 @@ +using System.Diagnostics.CodeAnalysis; + namespace OpenAI.Assistants; +[Experimental("OPENAI001")] [CodeGenModel("RunStepDeltaStepDetailsToolCallsCodeObjectCodeInterpreterOutputsObject")] public partial class RunStepUpdateCodeInterpreterOutput { @@ -16,4 +19,4 @@ private InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject AsLogs => this as InternalRunStepDeltaStepDetailsToolCallsCodeOutputLogsObject; private InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject AsImage => this as InternalRunStepDeltaStepDetailsToolCallsCodeOutputImageObject; -} \ No newline at end of file +} diff --git a/.dotnet/src/Custom/Assistants/Streaming/RunStepUpdate.cs b/.dotnet/src/Custom/Assistants/Streaming/RunStepUpdate.cs index c34345a8e..80e20766a 100644 --- a/.dotnet/src/Custom/Assistants/Streaming/RunStepUpdate.cs +++ b/.dotnet/src/Custom/Assistants/Streaming/RunStepUpdate.cs @@ -1,5 +1,6 @@ using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Text.Json; namespace OpenAI.Assistants; @@ -7,6 +8,7 @@ namespace OpenAI.Assistants; /// /// The update type presented when the status of a run step changes. /// +[Experimental("OPENAI001")] public class RunStepUpdate : StreamingUpdate { internal RunStepUpdate(RunStep runStep, StreamingUpdateReason updateKind) diff --git a/.dotnet/src/Custom/Assistants/Streaming/RunUpdate.cs b/.dotnet/src/Custom/Assistants/Streaming/RunUpdate.cs index 77df3f678..c94bc01b5 100644 --- a/.dotnet/src/Custom/Assistants/Streaming/RunUpdate.cs +++ b/.dotnet/src/Custom/Assistants/Streaming/RunUpdate.cs @@ -1,5 +1,6 @@ using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Text.Json; namespace OpenAI.Assistants; @@ -7,6 +8,7 @@ namespace OpenAI.Assistants; /// /// The update type presented when the status of a has changed. /// +[Experimental("OPENAI001")] public class RunUpdate : StreamingUpdate { internal RunUpdate(ThreadRun run, StreamingUpdateReason updateKind) : base(run, updateKind) diff --git a/.dotnet/src/Custom/Assistants/Streaming/StreamingUpdate.cs b/.dotnet/src/Custom/Assistants/Streaming/StreamingUpdate.cs index 7940993d3..9f6a362b8 100644 --- a/.dotnet/src/Custom/Assistants/Streaming/StreamingUpdate.cs +++ b/.dotnet/src/Custom/Assistants/Streaming/StreamingUpdate.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Net.ServerSentEvents; using System.Text.Json; @@ -21,6 +22,7 @@ namespace OpenAI.Assistants; /// For threads: /// /// +[Experimental("OPENAI001")] public abstract partial class StreamingUpdate { /// @@ -79,6 +81,7 @@ or StreamingUpdateReason.MessageCompleted /// Represents a single item of streamed data that encapsulates an underlying response value type. /// /// The response value type of the "delta" payload. +[Experimental("OPENAI001")] public partial class StreamingUpdate : StreamingUpdate where T : class { diff --git a/.dotnet/src/Custom/Assistants/Streaming/StreamingUpdateCollection.cs b/.dotnet/src/Custom/Assistants/Streaming/StreamingUpdateCollection.cs index d0099d995..5f9c3dffe 100644 --- a/.dotnet/src/Custom/Assistants/Streaming/StreamingUpdateCollection.cs +++ b/.dotnet/src/Custom/Assistants/Streaming/StreamingUpdateCollection.cs @@ -4,6 +4,7 @@ using System.Collections; using System.Collections.Generic; using System.Diagnostics; +using System.Diagnostics.CodeAnalysis; using System.Net.ServerSentEvents; #nullable enable @@ -13,6 +14,7 @@ namespace OpenAI.Assistants; /// /// Implementation of collection abstraction over streaming assistant updates. /// +[Experimental("OPENAI001")] internal class StreamingUpdateCollection : CollectionResult { private readonly Func _getResult; diff --git a/.dotnet/src/Custom/Assistants/Streaming/StreamingUpdateReason.Serialization.cs b/.dotnet/src/Custom/Assistants/Streaming/StreamingUpdateReason.Serialization.cs index 6445528ad..6a3ba61fe 100644 --- a/.dotnet/src/Custom/Assistants/Streaming/StreamingUpdateReason.Serialization.cs +++ b/.dotnet/src/Custom/Assistants/Streaming/StreamingUpdateReason.Serialization.cs @@ -1,5 +1,8 @@ +using System.Diagnostics.CodeAnalysis; + namespace OpenAI.Assistants; +[Experimental("OPENAI001")] internal static class StreamingUpdateReasonExtensions { internal static string ToSseEventLabel(this StreamingUpdateReason value) => value switch diff --git a/.dotnet/src/Custom/Assistants/Streaming/StreamingUpdateReason.cs b/.dotnet/src/Custom/Assistants/Streaming/StreamingUpdateReason.cs index e23673342..40dfd76d6 100644 --- a/.dotnet/src/Custom/Assistants/Streaming/StreamingUpdateReason.cs +++ b/.dotnet/src/Custom/Assistants/Streaming/StreamingUpdateReason.cs @@ -1,3 +1,5 @@ +using System.Diagnostics.CodeAnalysis; + namespace OpenAI.Assistants; /// @@ -5,6 +7,7 @@ namespace OpenAI.Assistants; /// expected downcast data type of the as well as to the expected data present in the /// payload. /// +[Experimental("OPENAI001")] public enum StreamingUpdateReason { /// diff --git a/.dotnet/src/Custom/Assistants/Streaming/TextAnnotationUpdate.cs b/.dotnet/src/Custom/Assistants/Streaming/TextAnnotationUpdate.cs index e7abb4030..caab5bf29 100644 --- a/.dotnet/src/Custom/Assistants/Streaming/TextAnnotationUpdate.cs +++ b/.dotnet/src/Custom/Assistants/Streaming/TextAnnotationUpdate.cs @@ -1,7 +1,9 @@ using System; +using System.Diagnostics.CodeAnalysis; namespace OpenAI.Assistants; +[Experimental("OPENAI001")] public class TextAnnotationUpdate { /// diff --git a/.dotnet/src/Custom/Assistants/Streaming/ThreadUpdate.cs b/.dotnet/src/Custom/Assistants/Streaming/ThreadUpdate.cs index c839281ff..636dc3038 100644 --- a/.dotnet/src/Custom/Assistants/Streaming/ThreadUpdate.cs +++ b/.dotnet/src/Custom/Assistants/Streaming/ThreadUpdate.cs @@ -1,6 +1,7 @@ using System; using System.ClientModel.Primitives; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Text.Json; namespace OpenAI.Assistants; @@ -8,6 +9,7 @@ namespace OpenAI.Assistants; /// /// The update type presented when a streamed event indicates a thread was created. /// +[Experimental("OPENAI001")] public class ThreadUpdate : StreamingUpdate { /// diff --git a/.dotnet/src/Custom/Assistants/TextAnnotation.cs b/.dotnet/src/Custom/Assistants/TextAnnotation.cs index 2a4652b54..3a2980838 100644 --- a/.dotnet/src/Custom/Assistants/TextAnnotation.cs +++ b/.dotnet/src/Custom/Assistants/TextAnnotation.cs @@ -1,7 +1,9 @@ using System; +using System.Diagnostics.CodeAnalysis; namespace OpenAI.Assistants; +[Experimental("OPENAI001")] public class TextAnnotation { internal readonly InternalMessageContentTextObjectAnnotation _internalAnnotation; diff --git a/.dotnet/src/Custom/Assistants/ThreadCreationOptions.cs b/.dotnet/src/Custom/Assistants/ThreadCreationOptions.cs index f0ae040f7..82d02e471 100644 --- a/.dotnet/src/Custom/Assistants/ThreadCreationOptions.cs +++ b/.dotnet/src/Custom/Assistants/ThreadCreationOptions.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Linq; namespace OpenAI.Assistants; @@ -6,6 +7,7 @@ namespace OpenAI.Assistants; /// /// Represents additional options available when creating a new . /// +[Experimental("OPENAI001")] [CodeGenModel("CreateThreadRequest")] public partial class ThreadCreationOptions { @@ -48,4 +50,4 @@ private set /// /// public IList InitialMessages { get; } = new ChangeTrackingList(); -} \ No newline at end of file +} diff --git a/.dotnet/src/Custom/Assistants/ThreadInitializationMessage.cs b/.dotnet/src/Custom/Assistants/ThreadInitializationMessage.cs index 60c443977..bcae23ac5 100644 --- a/.dotnet/src/Custom/Assistants/ThreadInitializationMessage.cs +++ b/.dotnet/src/Custom/Assistants/ThreadInitializationMessage.cs @@ -1,7 +1,9 @@ using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; namespace OpenAI.Assistants; +[Experimental("OPENAI001")] public partial class ThreadInitializationMessage : MessageCreationOptions { /// diff --git a/.dotnet/src/Custom/Assistants/ThreadMessage.cs b/.dotnet/src/Custom/Assistants/ThreadMessage.cs index 1e831a070..944d01481 100644 --- a/.dotnet/src/Custom/Assistants/ThreadMessage.cs +++ b/.dotnet/src/Custom/Assistants/ThreadMessage.cs @@ -1,7 +1,9 @@ using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; namespace OpenAI.Assistants; +[Experimental("OPENAI001")] [CodeGenModel("MessageObject")] public partial class ThreadMessage { diff --git a/.dotnet/src/Custom/Assistants/ThreadModificationOptions.cs b/.dotnet/src/Custom/Assistants/ThreadModificationOptions.cs index 5216abe20..31c81001c 100644 --- a/.dotnet/src/Custom/Assistants/ThreadModificationOptions.cs +++ b/.dotnet/src/Custom/Assistants/ThreadModificationOptions.cs @@ -1,8 +1,11 @@ +using System.Diagnostics.CodeAnalysis; + namespace OpenAI.Assistants; /// /// Represents additional options available when modifying an existing . /// +[Experimental("OPENAI001")] [CodeGenModel("ModifyThreadRequest")] public partial class ThreadModificationOptions { @@ -12,4 +15,4 @@ public partial class ThreadModificationOptions /// [CodeGenMember("ToolResources")] public ToolResources ToolResources { get; set; } -} \ No newline at end of file +} diff --git a/.dotnet/src/Custom/Assistants/ThreadRun.cs b/.dotnet/src/Custom/Assistants/ThreadRun.cs index b2a0f3f43..1eb62ecc5 100644 --- a/.dotnet/src/Custom/Assistants/ThreadRun.cs +++ b/.dotnet/src/Custom/Assistants/ThreadRun.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Linq; namespace OpenAI.Assistants; @@ -8,6 +9,7 @@ namespace OpenAI.Assistants; // - Required actions are abstracted into a forward-compatible, strongly-typed conceptual // hierarchy and formatted into a more intuitive collection for the consumer. +[Experimental("OPENAI001")] [CodeGenModel("RunObject")] public partial class ThreadRun { diff --git a/.dotnet/src/Custom/Assistants/ToolConstraint.Serialization.cs b/.dotnet/src/Custom/Assistants/ToolConstraint.Serialization.cs index 7d2a335e4..ccba3e954 100644 --- a/.dotnet/src/Custom/Assistants/ToolConstraint.Serialization.cs +++ b/.dotnet/src/Custom/Assistants/ToolConstraint.Serialization.cs @@ -94,4 +94,4 @@ internal static ToolConstraint DeserializeToolConstraint(JsonElement element, Mo return new ToolConstraint(plainTextValue, objectType, objectFunctionName, rawDataDictionary); } -} \ No newline at end of file +} diff --git a/.dotnet/src/Custom/Assistants/ToolConstraint.cs b/.dotnet/src/Custom/Assistants/ToolConstraint.cs index dc3de61ac..b333236f8 100644 --- a/.dotnet/src/Custom/Assistants/ToolConstraint.cs +++ b/.dotnet/src/Custom/Assistants/ToolConstraint.cs @@ -1,8 +1,10 @@ using System; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; namespace OpenAI.Assistants; +[Experimental("OPENAI001")] [CodeGenModel("AssistantsNamedToolChoice")] public partial class ToolConstraint { diff --git a/.dotnet/src/Custom/Assistants/ToolDefinition.Serialization.cs b/.dotnet/src/Custom/Assistants/ToolDefinition.Serialization.cs index 9894fb1ed..629e0f53b 100644 --- a/.dotnet/src/Custom/Assistants/ToolDefinition.Serialization.cs +++ b/.dotnet/src/Custom/Assistants/ToolDefinition.Serialization.cs @@ -1,7 +1,4 @@ -using System; using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Runtime.CompilerServices; using System.Text.Json; namespace OpenAI.Assistants; @@ -16,4 +13,4 @@ internal static void WriteCore(ToolDefinition instance, Utf8JsonWriter writer, M => instance.WriteCore(writer, options); protected abstract void WriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options); -} \ No newline at end of file +} diff --git a/.dotnet/src/Custom/Assistants/ToolDefinition.cs b/.dotnet/src/Custom/Assistants/ToolDefinition.cs index 0b876e1c1..b23360510 100644 --- a/.dotnet/src/Custom/Assistants/ToolDefinition.cs +++ b/.dotnet/src/Custom/Assistants/ToolDefinition.cs @@ -1,7 +1,9 @@ using System; +using System.Diagnostics.CodeAnalysis; namespace OpenAI.Assistants; +[Experimental("OPENAI001")] [CodeGenModel("AssistantToolDefinition")] public abstract partial class ToolDefinition { diff --git a/.dotnet/src/Custom/Assistants/ToolOutput.cs b/.dotnet/src/Custom/Assistants/ToolOutput.cs index ad32112d0..8024e0693 100644 --- a/.dotnet/src/Custom/Assistants/ToolOutput.cs +++ b/.dotnet/src/Custom/Assistants/ToolOutput.cs @@ -1,5 +1,8 @@ +using System.Diagnostics.CodeAnalysis; + namespace OpenAI.Assistants; +[Experimental("OPENAI001")] [CodeGenModel("SubmitToolOutputsRunRequestToolOutput")] public partial class ToolOutput { @@ -13,4 +16,4 @@ public partial class ToolOutput public ToolOutput(string toolCallId, string output) : this(toolCallId, output, null) {} -} \ No newline at end of file +} diff --git a/.dotnet/src/Custom/Assistants/ToolResources.cs b/.dotnet/src/Custom/Assistants/ToolResources.cs index 1043eead2..be3cb1ac1 100644 --- a/.dotnet/src/Custom/Assistants/ToolResources.cs +++ b/.dotnet/src/Custom/Assistants/ToolResources.cs @@ -1,8 +1,10 @@ using System.ClientModel.Primitives; +using System.Diagnostics.CodeAnalysis; using System.Text.Json; namespace OpenAI.Assistants; +[Experimental("OPENAI001")] [CodeGenModel("AssistantObjectToolResources")] [CodeGenSerialization(nameof(FileSearch), "file_search", SerializationValueHook = nameof(SerializeFileSearch))] public partial class ToolResources diff --git a/.dotnet/src/Custom/Assistants/VectorStoreCreationHelper.cs b/.dotnet/src/Custom/Assistants/VectorStoreCreationHelper.cs index cba26fb8e..70c5b4eae 100644 --- a/.dotnet/src/Custom/Assistants/VectorStoreCreationHelper.cs +++ b/.dotnet/src/Custom/Assistants/VectorStoreCreationHelper.cs @@ -1,10 +1,12 @@ using OpenAI.Files; using OpenAI.VectorStores; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Linq; namespace OpenAI.Assistants; +[Experimental("OPENAI001")] [CodeGenModel("ToolResourcesFileSearchVectorStore")] public partial class VectorStoreCreationHelper { diff --git a/.dotnet/src/OpenAI.csproj b/.dotnet/src/OpenAI.csproj index 2a1dd21b7..1cde7e12b 100644 --- a/.dotnet/src/OpenAI.csproj +++ b/.dotnet/src/OpenAI.csproj @@ -36,6 +36,9 @@ $(NoWarn),0169 + + $(NoWarn),OPENAI001; + Debug;Release;Unsigned From 890fbbf2a9350d607a770e24dca1508ce41eab97 Mon Sep 17 00:00:00 2001 From: ShivangiReja Date: Wed, 28 Aug 2024 13:22:02 -0700 Subject: [PATCH 02/11] Update comment --- .dotnet/examples/OpenAI.Examples.csproj | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.dotnet/examples/OpenAI.Examples.csproj b/.dotnet/examples/OpenAI.Examples.csproj index 1176e7d20..26925ceb6 100644 --- a/.dotnet/examples/OpenAI.Examples.csproj +++ b/.dotnet/examples/OpenAI.Examples.csproj @@ -1,7 +1,8 @@ net8.0 - + + $(NoWarn);CS1591;OPENAI001; latest From d1c99ca08a4c240b34239dbfcf027f64dc36d2e2 Mon Sep 17 00:00:00 2001 From: ShivangiReja Date: Wed, 28 Aug 2024 13:43:39 -0700 Subject: [PATCH 03/11] Fix Azure OpenAI --- .../Internal/Pagination/AzureAssistantsPageEnumerator.cs | 2 ++ .../Internal/Pagination/AzureMessagesPageEnumerator.cs | 1 + .../Internal/Pagination/AzureRunStepsPageEnumerator.cs | 2 ++ .../Assistants/Internal/Pagination/AzureRunsPageEnumerator.cs | 2 ++ 4 files changed, 7 insertions(+) diff --git a/.dotnet.azure/src/Custom/Assistants/Internal/Pagination/AzureAssistantsPageEnumerator.cs b/.dotnet.azure/src/Custom/Assistants/Internal/Pagination/AzureAssistantsPageEnumerator.cs index f351279a7..ba2d2b2ce 100644 --- a/.dotnet.azure/src/Custom/Assistants/Internal/Pagination/AzureAssistantsPageEnumerator.cs +++ b/.dotnet.azure/src/Custom/Assistants/Internal/Pagination/AzureAssistantsPageEnumerator.cs @@ -3,11 +3,13 @@ using System.ClientModel; using System.ClientModel.Primitives; +using System.Diagnostics.CodeAnalysis; #nullable enable namespace Azure.AI.OpenAI.Assistants; +[Experimental("OPENAI001")] internal partial class AzureAssistantsPageEnumerator : AssistantsPageEnumerator { private readonly Uri _endpoint; diff --git a/.dotnet.azure/src/Custom/Assistants/Internal/Pagination/AzureMessagesPageEnumerator.cs b/.dotnet.azure/src/Custom/Assistants/Internal/Pagination/AzureMessagesPageEnumerator.cs index 79ad28d13..fcff10050 100644 --- a/.dotnet.azure/src/Custom/Assistants/Internal/Pagination/AzureMessagesPageEnumerator.cs +++ b/.dotnet.azure/src/Custom/Assistants/Internal/Pagination/AzureMessagesPageEnumerator.cs @@ -6,6 +6,7 @@ namespace Azure.AI.OpenAI.Assistants; +[Experimental("OPENAI001")] internal partial class AzureMessagesPageEnumerator : MessagesPageEnumerator { private readonly Uri _endpoint; diff --git a/.dotnet.azure/src/Custom/Assistants/Internal/Pagination/AzureRunStepsPageEnumerator.cs b/.dotnet.azure/src/Custom/Assistants/Internal/Pagination/AzureRunStepsPageEnumerator.cs index e7f6ae902..882567c64 100644 --- a/.dotnet.azure/src/Custom/Assistants/Internal/Pagination/AzureRunStepsPageEnumerator.cs +++ b/.dotnet.azure/src/Custom/Assistants/Internal/Pagination/AzureRunStepsPageEnumerator.cs @@ -3,9 +3,11 @@ using System.ClientModel; using System.ClientModel.Primitives; +using System.Diagnostics.CodeAnalysis; namespace Azure.AI.OpenAI.Assistants; +[Experimental("OPENAI001")] internal partial class AzureRunStepsPageEnumerator : RunStepsPageEnumerator { private readonly Uri _endpoint; diff --git a/.dotnet.azure/src/Custom/Assistants/Internal/Pagination/AzureRunsPageEnumerator.cs b/.dotnet.azure/src/Custom/Assistants/Internal/Pagination/AzureRunsPageEnumerator.cs index 65afbca20..b8e6e5f15 100644 --- a/.dotnet.azure/src/Custom/Assistants/Internal/Pagination/AzureRunsPageEnumerator.cs +++ b/.dotnet.azure/src/Custom/Assistants/Internal/Pagination/AzureRunsPageEnumerator.cs @@ -3,9 +3,11 @@ using System.ClientModel; using System.ClientModel.Primitives; +using System.Diagnostics.CodeAnalysis; namespace Azure.AI.OpenAI.Assistants; +[Experimental("OPENAI001")] internal partial class AzureRunsPageEnumerator : RunsPageEnumerator { private readonly Uri _endpoint; From 109e9ecfc04a87b1c1d65220ecca469aa9f0c0db Mon Sep 17 00:00:00 2001 From: ShivangiReja Date: Wed, 28 Aug 2024 13:49:39 -0700 Subject: [PATCH 04/11] Fix namespace --- .../Internal/Pagination/AzureMessagesPageEnumerator.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/.dotnet.azure/src/Custom/Assistants/Internal/Pagination/AzureMessagesPageEnumerator.cs b/.dotnet.azure/src/Custom/Assistants/Internal/Pagination/AzureMessagesPageEnumerator.cs index fcff10050..d6b77dc3a 100644 --- a/.dotnet.azure/src/Custom/Assistants/Internal/Pagination/AzureMessagesPageEnumerator.cs +++ b/.dotnet.azure/src/Custom/Assistants/Internal/Pagination/AzureMessagesPageEnumerator.cs @@ -3,6 +3,7 @@ using System.ClientModel; using System.ClientModel.Primitives; +using System.Diagnostics.CodeAnalysis; namespace Azure.AI.OpenAI.Assistants; From 7a0d0ded1ccc89096ae4f113a2d64838a2085a8f Mon Sep 17 00:00:00 2001 From: ShivangiReja Date: Wed, 28 Aug 2024 16:57:43 -0700 Subject: [PATCH 05/11] Feedback --- .dotnet/examples/OpenAI.Examples.csproj | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.dotnet/examples/OpenAI.Examples.csproj b/.dotnet/examples/OpenAI.Examples.csproj index 26925ceb6..74bf8c489 100644 --- a/.dotnet/examples/OpenAI.Examples.csproj +++ b/.dotnet/examples/OpenAI.Examples.csproj @@ -1,9 +1,13 @@ net8.0 + + $(NoWarn);CS1591; + - $(NoWarn);CS1591;OPENAI001; + $(NoWarn);OPENAI001; + latest From a04ca9e0cb52219906bfd45204ae975f79eb1d0e Mon Sep 17 00:00:00 2001 From: ShivangiReja Date: Wed, 28 Aug 2024 17:33:26 -0700 Subject: [PATCH 06/11] Remove Experimental from internal types --- .../Assistants/Internal/GeneratorStubs.Internal.cs | 9 --------- .../Internal/InternalAssistantMessageClient.cs | 2 -- .../InternalAssistantResponseFormatPlainTextNoObject.cs | 3 --- .../Assistants/Internal/InternalAssistantRunClient.cs | 2 -- .../Assistants/Internal/InternalAssistantThreadClient.cs | 2 -- .../InternalMessageImageFileContent.Serialization.cs | 3 --- .../Internal/InternalMessageImageFileContent.cs | 2 -- .../InternalMessageImageUrlContent.Serialization.cs | 3 --- .../Internal/InternalMessageImageUrlContent.cs | 2 -- .../InternalMessageRefusalContent.Serialization.cs | 3 --- .../InternalRequestMessageTextContent.Serialization.cs | 3 --- .../Assistants/Internal/InternalRequiredToolCall.cs | 3 --- .../InternalResponseMessageTextContent.Serialization.cs | 3 --- .../Internal/InternalResponseMessageTextContent.cs | 2 -- .../Internal/InternalRunStepCodeInterpreterLogOutput.cs | 3 --- .../InternalRunStepCodeInterpreterToolCallDetails.cs | 2 -- .../InternalRunStepDetailsMessageCreationObject.cs | 3 --- .../Internal/InternalRunStepToolCallDetailsCollection.cs | 2 -- .../Internal/Pagination/AssistantsPageEnumerator.cs | 2 -- .../Internal/Pagination/MessagesPageEnumerator.cs | 2 -- .../Internal/Pagination/RunStepsPageEnumerator.cs | 2 -- .../Assistants/Internal/Pagination/RunsPageEnumerator.cs | 2 -- .../UnknownAssistantToolDefinition.Serialization.cs | 2 -- .../Assistants/MessageImageDetail.Serialization.cs | 2 -- .../Streaming/AsyncStreamingUpdateCollection.cs | 2 -- .../Assistants/Streaming/StreamingUpdateCollection.cs | 2 -- .../Streaming/StreamingUpdateReason.Serialization.cs | 3 --- 27 files changed, 71 deletions(-) diff --git a/.dotnet/src/Custom/Assistants/Internal/GeneratorStubs.Internal.cs b/.dotnet/src/Custom/Assistants/Internal/GeneratorStubs.Internal.cs index 7b1125a91..ef35a4168 100644 --- a/.dotnet/src/Custom/Assistants/Internal/GeneratorStubs.Internal.cs +++ b/.dotnet/src/Custom/Assistants/Internal/GeneratorStubs.Internal.cs @@ -1,5 +1,3 @@ -using System.Diagnostics.CodeAnalysis; - namespace OpenAI.Assistants; /* @@ -42,7 +40,6 @@ internal partial class InternalMessageDeltaContentImageFileObject { } internal partial class InternalMessageDeltaContentImageUrlObject { } [CodeGenModel("MessageDeltaObjectDelta")] -[Experimental("OPENAI001")] internal partial class InternalMessageDeltaObjectDelta { [CodeGenMember("Role")] @@ -98,7 +95,6 @@ internal partial class InternalDeleteMessageResponse { } internal readonly partial struct InternalDeleteMessageResponseObject { } [CodeGenModel("CreateThreadAndRunRequest")] -[Experimental("OPENAI001")] internal partial class InternalCreateThreadAndRunRequest { public string Model { get; set; } @@ -155,35 +151,30 @@ internal partial class InternalRunObjectRequiredActionSubmitToolOutputs { privat internal partial class InternalRunToolCallObjectFunction { } [CodeGenModel("ListAssistantsResponse")] -[Experimental("OPENAI001")] internal partial class InternalListAssistantsResponse : IInternalListResponse { } [CodeGenModel("ListAssistantsResponseObject")] internal readonly partial struct InternalListAssistantsResponseObject { } [CodeGenModel("ListThreadsResponse")] -[Experimental("OPENAI001")] internal partial class InternalListThreadsResponse : IInternalListResponse { } [CodeGenModel("ListThreadsResponseObject")] internal readonly partial struct InternalListThreadsResponseObject { } [CodeGenModel("ListMessagesResponse")] -[Experimental("OPENAI001")] internal partial class InternalListMessagesResponse : IInternalListResponse { } [CodeGenModel("ListMessagesResponseObject")] internal readonly partial struct InternalListMessagesResponseObject { } [CodeGenModel("ListRunsResponse")] -[Experimental("OPENAI001")] internal partial class InternalListRunsResponse : IInternalListResponse { } [CodeGenModel("ListRunsResponseObject")] internal readonly partial struct InternalListRunsResponseObject { } [CodeGenModel("ListRunStepsResponse")] -[Experimental("OPENAI001")] internal partial class InternalListRunStepsResponse : IInternalListResponse { } [CodeGenModel("ListRunStepsResponseObject")] diff --git a/.dotnet/src/Custom/Assistants/Internal/InternalAssistantMessageClient.cs b/.dotnet/src/Custom/Assistants/Internal/InternalAssistantMessageClient.cs index 608c8f8b5..625f36158 100644 --- a/.dotnet/src/Custom/Assistants/Internal/InternalAssistantMessageClient.cs +++ b/.dotnet/src/Custom/Assistants/Internal/InternalAssistantMessageClient.cs @@ -1,11 +1,9 @@ using System; using System.ClientModel; using System.ClientModel.Primitives; -using System.Diagnostics.CodeAnalysis; namespace OpenAI.Assistants; -[Experimental("OPENAI001")] [CodeGenClient("Messages")] [CodeGenSuppress("InternalAssistantMessageClient", typeof(ClientPipeline), typeof(ApiKeyCredential), typeof(Uri))] [CodeGenSuppress("CreateMessageAsync", typeof(string), typeof(MessageCreationOptions))] diff --git a/.dotnet/src/Custom/Assistants/Internal/InternalAssistantResponseFormatPlainTextNoObject.cs b/.dotnet/src/Custom/Assistants/Internal/InternalAssistantResponseFormatPlainTextNoObject.cs index 9dc7730da..6c3e2ee7c 100644 --- a/.dotnet/src/Custom/Assistants/Internal/InternalAssistantResponseFormatPlainTextNoObject.cs +++ b/.dotnet/src/Custom/Assistants/Internal/InternalAssistantResponseFormatPlainTextNoObject.cs @@ -1,8 +1,5 @@ -using System.Diagnostics.CodeAnalysis; - namespace OpenAI.Assistants; -[Experimental("OPENAI001")] internal partial class InternalAssistantResponseFormatPlainTextNoObject : AssistantResponseFormat { public string Value { get; set; } diff --git a/.dotnet/src/Custom/Assistants/Internal/InternalAssistantRunClient.cs b/.dotnet/src/Custom/Assistants/Internal/InternalAssistantRunClient.cs index 7fa86916c..8b6474cfe 100644 --- a/.dotnet/src/Custom/Assistants/Internal/InternalAssistantRunClient.cs +++ b/.dotnet/src/Custom/Assistants/Internal/InternalAssistantRunClient.cs @@ -1,11 +1,9 @@ using System; using System.ClientModel; using System.ClientModel.Primitives; -using System.Diagnostics.CodeAnalysis; namespace OpenAI.Assistants; -[Experimental("OPENAI001")] [CodeGenClient("Runs")] [CodeGenSuppress("InternalAssistantRunClient", typeof(ClientPipeline), typeof(ApiKeyCredential), typeof(Uri))] [CodeGenSuppress("CreateThreadAndRunAsync", typeof(InternalCreateThreadAndRunRequest))] diff --git a/.dotnet/src/Custom/Assistants/Internal/InternalAssistantThreadClient.cs b/.dotnet/src/Custom/Assistants/Internal/InternalAssistantThreadClient.cs index 79b0c1e9d..295a8a492 100644 --- a/.dotnet/src/Custom/Assistants/Internal/InternalAssistantThreadClient.cs +++ b/.dotnet/src/Custom/Assistants/Internal/InternalAssistantThreadClient.cs @@ -1,11 +1,9 @@ using System; using System.ClientModel; using System.ClientModel.Primitives; -using System.Diagnostics.CodeAnalysis; namespace OpenAI.Assistants; -[Experimental("OPENAI001")] [CodeGenClient("Threads")] [CodeGenSuppress("InternalAssistantThreadClient", typeof(ClientPipeline), typeof(ApiKeyCredential), typeof(Uri))] [CodeGenSuppress("CreateThreadAsync", typeof(ThreadCreationOptions))] diff --git a/.dotnet/src/Custom/Assistants/Internal/InternalMessageImageFileContent.Serialization.cs b/.dotnet/src/Custom/Assistants/Internal/InternalMessageImageFileContent.Serialization.cs index c6dd038a1..1aeb34fbb 100644 --- a/.dotnet/src/Custom/Assistants/Internal/InternalMessageImageFileContent.Serialization.cs +++ b/.dotnet/src/Custom/Assistants/Internal/InternalMessageImageFileContent.Serialization.cs @@ -1,7 +1,4 @@ -using System; -using System.ClientModel; using System.ClientModel.Primitives; -using System.Collections.Generic; using System.Text.Json; namespace OpenAI.Assistants; diff --git a/.dotnet/src/Custom/Assistants/Internal/InternalMessageImageFileContent.cs b/.dotnet/src/Custom/Assistants/Internal/InternalMessageImageFileContent.cs index 120dae6fb..1aac69dd4 100644 --- a/.dotnet/src/Custom/Assistants/Internal/InternalMessageImageFileContent.cs +++ b/.dotnet/src/Custom/Assistants/Internal/InternalMessageImageFileContent.cs @@ -1,5 +1,4 @@ using System; -using System.Diagnostics.CodeAnalysis; namespace OpenAI.Assistants; @@ -10,7 +9,6 @@ namespace OpenAI.Assistants; /// Use the method to /// create an instance of this type. /// -[Experimental("OPENAI001")] [CodeGenModel("MessageContentImageFileObject")] [CodeGenSuppress("InternalMessageImageFileContent", typeof(InternalMessageContentItemFileObjectImageFile))] internal partial class InternalMessageImageFileContent diff --git a/.dotnet/src/Custom/Assistants/Internal/InternalMessageImageUrlContent.Serialization.cs b/.dotnet/src/Custom/Assistants/Internal/InternalMessageImageUrlContent.Serialization.cs index 48d0f7751..71abe7d89 100644 --- a/.dotnet/src/Custom/Assistants/Internal/InternalMessageImageUrlContent.Serialization.cs +++ b/.dotnet/src/Custom/Assistants/Internal/InternalMessageImageUrlContent.Serialization.cs @@ -1,7 +1,4 @@ -using System; -using System.ClientModel; using System.ClientModel.Primitives; -using System.Collections.Generic; using System.Text.Json; namespace OpenAI.Assistants; diff --git a/.dotnet/src/Custom/Assistants/Internal/InternalMessageImageUrlContent.cs b/.dotnet/src/Custom/Assistants/Internal/InternalMessageImageUrlContent.cs index 617c5460b..76388449d 100644 --- a/.dotnet/src/Custom/Assistants/Internal/InternalMessageImageUrlContent.cs +++ b/.dotnet/src/Custom/Assistants/Internal/InternalMessageImageUrlContent.cs @@ -1,5 +1,4 @@ using System; -using System.Diagnostics.CodeAnalysis; namespace OpenAI.Assistants; @@ -10,7 +9,6 @@ namespace OpenAI.Assistants; /// Use the method to /// create an instance of this type. /// -[Experimental("OPENAI001")] [CodeGenModel("MessageContentImageUrlObject")] [CodeGenSuppress("MessageImageUrlContent", typeof(InternalMessageContentImageUrlObjectImageUrl))] internal partial class InternalMessageImageUrlContent diff --git a/.dotnet/src/Custom/Assistants/Internal/InternalMessageRefusalContent.Serialization.cs b/.dotnet/src/Custom/Assistants/Internal/InternalMessageRefusalContent.Serialization.cs index b14bf17a6..660fde6e0 100644 --- a/.dotnet/src/Custom/Assistants/Internal/InternalMessageRefusalContent.Serialization.cs +++ b/.dotnet/src/Custom/Assistants/Internal/InternalMessageRefusalContent.Serialization.cs @@ -1,7 +1,4 @@ -using System; -using System.ClientModel; using System.ClientModel.Primitives; -using System.Collections.Generic; using System.Text.Json; namespace OpenAI.Assistants; diff --git a/.dotnet/src/Custom/Assistants/Internal/InternalRequestMessageTextContent.Serialization.cs b/.dotnet/src/Custom/Assistants/Internal/InternalRequestMessageTextContent.Serialization.cs index 565c34ee4..93f479e8a 100644 --- a/.dotnet/src/Custom/Assistants/Internal/InternalRequestMessageTextContent.Serialization.cs +++ b/.dotnet/src/Custom/Assistants/Internal/InternalRequestMessageTextContent.Serialization.cs @@ -1,7 +1,4 @@ -using System; -using System.ClientModel; using System.ClientModel.Primitives; -using System.Collections.Generic; using System.Text.Json; namespace OpenAI.Assistants; diff --git a/.dotnet/src/Custom/Assistants/Internal/InternalRequiredToolCall.cs b/.dotnet/src/Custom/Assistants/Internal/InternalRequiredToolCall.cs index 3fa09051f..4d7fc35a1 100644 --- a/.dotnet/src/Custom/Assistants/Internal/InternalRequiredToolCall.cs +++ b/.dotnet/src/Custom/Assistants/Internal/InternalRequiredToolCall.cs @@ -1,5 +1,3 @@ -using System.Diagnostics.CodeAnalysis; - namespace OpenAI.Assistants; /// @@ -13,5 +11,4 @@ namespace OpenAI.Assistants; /// /// /// -[Experimental("OPENAI001")] internal abstract partial class InternalRequiredToolCall : RequiredAction { } \ No newline at end of file diff --git a/.dotnet/src/Custom/Assistants/Internal/InternalResponseMessageTextContent.Serialization.cs b/.dotnet/src/Custom/Assistants/Internal/InternalResponseMessageTextContent.Serialization.cs index 5cb19bb15..f78582afe 100644 --- a/.dotnet/src/Custom/Assistants/Internal/InternalResponseMessageTextContent.Serialization.cs +++ b/.dotnet/src/Custom/Assistants/Internal/InternalResponseMessageTextContent.Serialization.cs @@ -1,7 +1,4 @@ -using System; -using System.ClientModel; using System.ClientModel.Primitives; -using System.Collections.Generic; using System.Text.Json; namespace OpenAI.Assistants; diff --git a/.dotnet/src/Custom/Assistants/Internal/InternalResponseMessageTextContent.cs b/.dotnet/src/Custom/Assistants/Internal/InternalResponseMessageTextContent.cs index 62557cdfe..0d7b79794 100644 --- a/.dotnet/src/Custom/Assistants/Internal/InternalResponseMessageTextContent.cs +++ b/.dotnet/src/Custom/Assistants/Internal/InternalResponseMessageTextContent.cs @@ -1,12 +1,10 @@ using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; namespace OpenAI.Assistants; /// /// Represents an item of annotated text content within an Assistants API response message. /// -[Experimental("OPENAI001")] [CodeGenModel("MessageContentTextObject")] internal partial class InternalResponseMessageTextContent { diff --git a/.dotnet/src/Custom/Assistants/Internal/InternalRunStepCodeInterpreterLogOutput.cs b/.dotnet/src/Custom/Assistants/Internal/InternalRunStepCodeInterpreterLogOutput.cs index b689fe8c5..4d0a1d8e0 100644 --- a/.dotnet/src/Custom/Assistants/Internal/InternalRunStepCodeInterpreterLogOutput.cs +++ b/.dotnet/src/Custom/Assistants/Internal/InternalRunStepCodeInterpreterLogOutput.cs @@ -1,9 +1,6 @@ -using System.Diagnostics.CodeAnalysis; - namespace OpenAI.Assistants { /// Text output from the Code Interpreter tool call as part of a run step. - [Experimental("OPENAI001")] [CodeGenModel("RunStepDetailsToolCallsCodeOutputLogsObject")] internal partial class InternalRunStepCodeInterpreterLogOutput : RunStepCodeInterpreterOutput { diff --git a/.dotnet/src/Custom/Assistants/Internal/InternalRunStepCodeInterpreterToolCallDetails.cs b/.dotnet/src/Custom/Assistants/Internal/InternalRunStepCodeInterpreterToolCallDetails.cs index 1f1d34008..db9e2eb30 100644 --- a/.dotnet/src/Custom/Assistants/Internal/InternalRunStepCodeInterpreterToolCallDetails.cs +++ b/.dotnet/src/Custom/Assistants/Internal/InternalRunStepCodeInterpreterToolCallDetails.cs @@ -1,9 +1,7 @@ using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; namespace OpenAI.Assistants; -[Experimental("OPENAI001")] [CodeGenModel("RunStepDetailsToolCallsCodeObject")] internal partial class InternalRunStepCodeInterpreterToolCallDetails { diff --git a/.dotnet/src/Custom/Assistants/Internal/InternalRunStepDetailsMessageCreationObject.cs b/.dotnet/src/Custom/Assistants/Internal/InternalRunStepDetailsMessageCreationObject.cs index 7d2bb0fe8..9c0ab12f5 100644 --- a/.dotnet/src/Custom/Assistants/Internal/InternalRunStepDetailsMessageCreationObject.cs +++ b/.dotnet/src/Custom/Assistants/Internal/InternalRunStepDetailsMessageCreationObject.cs @@ -1,8 +1,5 @@ -using System.Diagnostics.CodeAnalysis; - namespace OpenAI.Assistants; -[Experimental("OPENAI001")] [CodeGenModel("RunStepDetailsMessageCreationObject")] internal partial class InternalRunStepDetailsMessageCreationObject : RunStepDetails { diff --git a/.dotnet/src/Custom/Assistants/Internal/InternalRunStepToolCallDetailsCollection.cs b/.dotnet/src/Custom/Assistants/Internal/InternalRunStepToolCallDetailsCollection.cs index 98dcb7d3c..59e91f6e1 100644 --- a/.dotnet/src/Custom/Assistants/Internal/InternalRunStepToolCallDetailsCollection.cs +++ b/.dotnet/src/Custom/Assistants/Internal/InternalRunStepToolCallDetailsCollection.cs @@ -1,10 +1,8 @@ using System.Collections; using System.Collections.Generic; -using System.Diagnostics.CodeAnalysis; namespace OpenAI.Assistants; -[Experimental("OPENAI001")] [CodeGenModel("RunStepDetailsToolCallsObject")] internal partial class InternalRunStepDetailsToolCallsObject : IReadOnlyList { diff --git a/.dotnet/src/Custom/Assistants/Internal/Pagination/AssistantsPageEnumerator.cs b/.dotnet/src/Custom/Assistants/Internal/Pagination/AssistantsPageEnumerator.cs index ab068c6f5..7fb974d72 100644 --- a/.dotnet/src/Custom/Assistants/Internal/Pagination/AssistantsPageEnumerator.cs +++ b/.dotnet/src/Custom/Assistants/Internal/Pagination/AssistantsPageEnumerator.cs @@ -1,7 +1,6 @@ using System; using System.ClientModel; using System.ClientModel.Primitives; -using System.Diagnostics.CodeAnalysis; using System.Text.Json; using System.Threading.Tasks; @@ -9,7 +8,6 @@ namespace OpenAI.Assistants; -[Experimental("OPENAI001")] internal partial class AssistantsPageEnumerator : PageEnumerator { private readonly ClientPipeline _pipeline; diff --git a/.dotnet/src/Custom/Assistants/Internal/Pagination/MessagesPageEnumerator.cs b/.dotnet/src/Custom/Assistants/Internal/Pagination/MessagesPageEnumerator.cs index 33a8617cf..a5488cc6d 100644 --- a/.dotnet/src/Custom/Assistants/Internal/Pagination/MessagesPageEnumerator.cs +++ b/.dotnet/src/Custom/Assistants/Internal/Pagination/MessagesPageEnumerator.cs @@ -1,7 +1,6 @@ using System; using System.ClientModel; using System.ClientModel.Primitives; -using System.Diagnostics.CodeAnalysis; using System.Text.Json; using System.Threading.Tasks; @@ -9,7 +8,6 @@ namespace OpenAI.Assistants; -[Experimental("OPENAI001")] internal partial class MessagesPageEnumerator : PageEnumerator { private readonly ClientPipeline _pipeline; diff --git a/.dotnet/src/Custom/Assistants/Internal/Pagination/RunStepsPageEnumerator.cs b/.dotnet/src/Custom/Assistants/Internal/Pagination/RunStepsPageEnumerator.cs index ec83d88ca..b5992ce78 100644 --- a/.dotnet/src/Custom/Assistants/Internal/Pagination/RunStepsPageEnumerator.cs +++ b/.dotnet/src/Custom/Assistants/Internal/Pagination/RunStepsPageEnumerator.cs @@ -1,7 +1,6 @@ using System; using System.ClientModel; using System.ClientModel.Primitives; -using System.Diagnostics.CodeAnalysis; using System.Text.Json; using System.Threading.Tasks; @@ -9,7 +8,6 @@ namespace OpenAI.Assistants; -[Experimental("OPENAI001")] internal partial class RunStepsPageEnumerator : PageEnumerator { private readonly ClientPipeline _pipeline; diff --git a/.dotnet/src/Custom/Assistants/Internal/Pagination/RunsPageEnumerator.cs b/.dotnet/src/Custom/Assistants/Internal/Pagination/RunsPageEnumerator.cs index aa5114f9f..f48ceb3c1 100644 --- a/.dotnet/src/Custom/Assistants/Internal/Pagination/RunsPageEnumerator.cs +++ b/.dotnet/src/Custom/Assistants/Internal/Pagination/RunsPageEnumerator.cs @@ -1,7 +1,6 @@ using System; using System.ClientModel; using System.ClientModel.Primitives; -using System.Diagnostics.CodeAnalysis; using System.Text.Json; using System.Threading.Tasks; @@ -9,7 +8,6 @@ namespace OpenAI.Assistants; -[Experimental("OPENAI001")] internal partial class RunsPageEnumerator : PageEnumerator { private readonly ClientPipeline _pipeline; diff --git a/.dotnet/src/Custom/Assistants/Internal/UnknownAssistantToolDefinition.Serialization.cs b/.dotnet/src/Custom/Assistants/Internal/UnknownAssistantToolDefinition.Serialization.cs index b1e2c7dc0..b990dcbad 100644 --- a/.dotnet/src/Custom/Assistants/Internal/UnknownAssistantToolDefinition.Serialization.cs +++ b/.dotnet/src/Custom/Assistants/Internal/UnknownAssistantToolDefinition.Serialization.cs @@ -1,10 +1,8 @@ using System.ClientModel.Primitives; -using System.Diagnostics.CodeAnalysis; using System.Text.Json; namespace OpenAI.Assistants; -[Experimental("OPENAI001")] [CodeGenSuppress("global::System.ClientModel.Primitives.IJsonModel.Write", typeof(Utf8JsonWriter), typeof(ModelReaderWriterOptions))] internal partial class UnknownAssistantToolDefinition : IJsonModel { diff --git a/.dotnet/src/Custom/Assistants/MessageImageDetail.Serialization.cs b/.dotnet/src/Custom/Assistants/MessageImageDetail.Serialization.cs index a51e71db3..1fb868534 100644 --- a/.dotnet/src/Custom/Assistants/MessageImageDetail.Serialization.cs +++ b/.dotnet/src/Custom/Assistants/MessageImageDetail.Serialization.cs @@ -1,9 +1,7 @@ using System; -using System.Diagnostics.CodeAnalysis; namespace OpenAI.Assistants; -[Experimental("OPENAI001")] internal static partial class MessageImageDetailExtensions { public static string ToSerialString(this MessageImageDetail value) => value switch diff --git a/.dotnet/src/Custom/Assistants/Streaming/AsyncStreamingUpdateCollection.cs b/.dotnet/src/Custom/Assistants/Streaming/AsyncStreamingUpdateCollection.cs index c2965dacb..1a50d6d4c 100644 --- a/.dotnet/src/Custom/Assistants/Streaming/AsyncStreamingUpdateCollection.cs +++ b/.dotnet/src/Custom/Assistants/Streaming/AsyncStreamingUpdateCollection.cs @@ -3,7 +3,6 @@ using System.ClientModel.Primitives; using System.Collections.Generic; using System.Diagnostics; -using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Net.ServerSentEvents; using System.Threading; @@ -16,7 +15,6 @@ namespace OpenAI.Assistants; /// /// Implementation of collection abstraction over streaming assistant updates. /// -[Experimental("OPENAI001")] internal class AsyncStreamingUpdateCollection : AsyncCollectionResult { private readonly Func> _getResultAsync; diff --git a/.dotnet/src/Custom/Assistants/Streaming/StreamingUpdateCollection.cs b/.dotnet/src/Custom/Assistants/Streaming/StreamingUpdateCollection.cs index 30a8a1e15..cad7ca61d 100644 --- a/.dotnet/src/Custom/Assistants/Streaming/StreamingUpdateCollection.cs +++ b/.dotnet/src/Custom/Assistants/Streaming/StreamingUpdateCollection.cs @@ -4,7 +4,6 @@ using System.Collections; using System.Collections.Generic; using System.Diagnostics; -using System.Diagnostics.CodeAnalysis; using System.Net.ServerSentEvents; #nullable enable @@ -14,7 +13,6 @@ namespace OpenAI.Assistants; /// /// Implementation of collection abstraction over streaming assistant updates. /// -[Experimental("OPENAI001")] internal class StreamingUpdateCollection : CollectionResult { private readonly Func _getResult; diff --git a/.dotnet/src/Custom/Assistants/Streaming/StreamingUpdateReason.Serialization.cs b/.dotnet/src/Custom/Assistants/Streaming/StreamingUpdateReason.Serialization.cs index 6a3ba61fe..6445528ad 100644 --- a/.dotnet/src/Custom/Assistants/Streaming/StreamingUpdateReason.Serialization.cs +++ b/.dotnet/src/Custom/Assistants/Streaming/StreamingUpdateReason.Serialization.cs @@ -1,8 +1,5 @@ -using System.Diagnostics.CodeAnalysis; - namespace OpenAI.Assistants; -[Experimental("OPENAI001")] internal static class StreamingUpdateReasonExtensions { internal static string ToSseEventLabel(this StreamingUpdateReason value) => value switch From aae3a9317de10baf1a69bb376e7ba5c031970f29 Mon Sep 17 00:00:00 2001 From: ShivangiReja Date: Wed, 28 Aug 2024 17:40:20 -0700 Subject: [PATCH 07/11] Remove Experimental from internal Azure OpenAI types --- .../Internal/Pagination/AzureAssistantsPageEnumerator.cs | 2 -- .../Internal/Pagination/AzureMessagesPageEnumerator.cs | 2 -- .../Internal/Pagination/AzureRunStepsPageEnumerator.cs | 2 -- .../Assistants/Internal/Pagination/AzureRunsPageEnumerator.cs | 2 -- 4 files changed, 8 deletions(-) diff --git a/.dotnet.azure/src/Custom/Assistants/Internal/Pagination/AzureAssistantsPageEnumerator.cs b/.dotnet.azure/src/Custom/Assistants/Internal/Pagination/AzureAssistantsPageEnumerator.cs index ba2d2b2ce..f351279a7 100644 --- a/.dotnet.azure/src/Custom/Assistants/Internal/Pagination/AzureAssistantsPageEnumerator.cs +++ b/.dotnet.azure/src/Custom/Assistants/Internal/Pagination/AzureAssistantsPageEnumerator.cs @@ -3,13 +3,11 @@ using System.ClientModel; using System.ClientModel.Primitives; -using System.Diagnostics.CodeAnalysis; #nullable enable namespace Azure.AI.OpenAI.Assistants; -[Experimental("OPENAI001")] internal partial class AzureAssistantsPageEnumerator : AssistantsPageEnumerator { private readonly Uri _endpoint; diff --git a/.dotnet.azure/src/Custom/Assistants/Internal/Pagination/AzureMessagesPageEnumerator.cs b/.dotnet.azure/src/Custom/Assistants/Internal/Pagination/AzureMessagesPageEnumerator.cs index d6b77dc3a..79ad28d13 100644 --- a/.dotnet.azure/src/Custom/Assistants/Internal/Pagination/AzureMessagesPageEnumerator.cs +++ b/.dotnet.azure/src/Custom/Assistants/Internal/Pagination/AzureMessagesPageEnumerator.cs @@ -3,11 +3,9 @@ using System.ClientModel; using System.ClientModel.Primitives; -using System.Diagnostics.CodeAnalysis; namespace Azure.AI.OpenAI.Assistants; -[Experimental("OPENAI001")] internal partial class AzureMessagesPageEnumerator : MessagesPageEnumerator { private readonly Uri _endpoint; diff --git a/.dotnet.azure/src/Custom/Assistants/Internal/Pagination/AzureRunStepsPageEnumerator.cs b/.dotnet.azure/src/Custom/Assistants/Internal/Pagination/AzureRunStepsPageEnumerator.cs index 882567c64..e7f6ae902 100644 --- a/.dotnet.azure/src/Custom/Assistants/Internal/Pagination/AzureRunStepsPageEnumerator.cs +++ b/.dotnet.azure/src/Custom/Assistants/Internal/Pagination/AzureRunStepsPageEnumerator.cs @@ -3,11 +3,9 @@ using System.ClientModel; using System.ClientModel.Primitives; -using System.Diagnostics.CodeAnalysis; namespace Azure.AI.OpenAI.Assistants; -[Experimental("OPENAI001")] internal partial class AzureRunStepsPageEnumerator : RunStepsPageEnumerator { private readonly Uri _endpoint; diff --git a/.dotnet.azure/src/Custom/Assistants/Internal/Pagination/AzureRunsPageEnumerator.cs b/.dotnet.azure/src/Custom/Assistants/Internal/Pagination/AzureRunsPageEnumerator.cs index b8e6e5f15..65afbca20 100644 --- a/.dotnet.azure/src/Custom/Assistants/Internal/Pagination/AzureRunsPageEnumerator.cs +++ b/.dotnet.azure/src/Custom/Assistants/Internal/Pagination/AzureRunsPageEnumerator.cs @@ -3,11 +3,9 @@ using System.ClientModel; using System.ClientModel.Primitives; -using System.Diagnostics.CodeAnalysis; namespace Azure.AI.OpenAI.Assistants; -[Experimental("OPENAI001")] internal partial class AzureRunsPageEnumerator : RunsPageEnumerator { private readonly Uri _endpoint; From 370f530836cd8fc20e96d0823f8fab68e20bbf8c Mon Sep 17 00:00:00 2001 From: ShivangiReja Date: Wed, 28 Aug 2024 17:52:40 -0700 Subject: [PATCH 08/11] Remove Experimental from an internal type --- .../src/Custom/Assistants/RunStepToolCallKind.Serialization.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/.dotnet/src/Custom/Assistants/RunStepToolCallKind.Serialization.cs b/.dotnet/src/Custom/Assistants/RunStepToolCallKind.Serialization.cs index 135008b84..5bdf3a347 100644 --- a/.dotnet/src/Custom/Assistants/RunStepToolCallKind.Serialization.cs +++ b/.dotnet/src/Custom/Assistants/RunStepToolCallKind.Serialization.cs @@ -1,9 +1,7 @@ using System; -using System.Diagnostics.CodeAnalysis; namespace OpenAI.Assistants; -[Experimental("OPENAI001")] internal static partial class RunStepToolCallKindExtensions { public static string ToSerialString(this RunStepToolCallKind value) => value switch From 4a92279ee3cf91a51a8f9628b52593828b0253be Mon Sep 17 00:00:00 2001 From: ShivangiReja Date: Wed, 28 Aug 2024 17:58:48 -0700 Subject: [PATCH 09/11] Remove unused usings --- .dotnet/src/Custom/Assistants/MessageCollectionOptions.cs | 4 +--- .dotnet/src/Custom/Assistants/MessageContent.Serialization.cs | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.dotnet/src/Custom/Assistants/MessageCollectionOptions.cs b/.dotnet/src/Custom/Assistants/MessageCollectionOptions.cs index f46bebb21..db5db8291 100644 --- a/.dotnet/src/Custom/Assistants/MessageCollectionOptions.cs +++ b/.dotnet/src/Custom/Assistants/MessageCollectionOptions.cs @@ -1,5 +1,3 @@ -using System.Diagnostics.CodeAnalysis; - namespace OpenAI.Assistants; /// @@ -33,4 +31,4 @@ public MessageCollectionOptions() { } /// The id of the item following the last item in the collection. /// public string BeforeId { get; set; } -} +} \ No newline at end of file diff --git a/.dotnet/src/Custom/Assistants/MessageContent.Serialization.cs b/.dotnet/src/Custom/Assistants/MessageContent.Serialization.cs index 6bd5ad674..77d646504 100644 --- a/.dotnet/src/Custom/Assistants/MessageContent.Serialization.cs +++ b/.dotnet/src/Custom/Assistants/MessageContent.Serialization.cs @@ -1,5 +1,4 @@ using System.ClientModel.Primitives; -using System.Diagnostics.CodeAnalysis; using System.Text.Json; namespace OpenAI.Assistants; @@ -39,4 +38,4 @@ internal static MessageContent DeserializeMessageContent(JsonElement element, Mo return null; } -} +} \ No newline at end of file From 4fcdfc74a6e2d83560a6d7c0fd64eb30aa075f36 Mon Sep 17 00:00:00 2001 From: ShivangiReja Date: Wed, 28 Aug 2024 18:01:01 -0700 Subject: [PATCH 10/11] Fix --- .dotnet/src/Custom/Assistants/MessageCollectionOptions.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.dotnet/src/Custom/Assistants/MessageCollectionOptions.cs b/.dotnet/src/Custom/Assistants/MessageCollectionOptions.cs index db5db8291..113ebbf69 100644 --- a/.dotnet/src/Custom/Assistants/MessageCollectionOptions.cs +++ b/.dotnet/src/Custom/Assistants/MessageCollectionOptions.cs @@ -1,3 +1,5 @@ +using System.Diagnostics.CodeAnalysis; + namespace OpenAI.Assistants; /// From 421052aaeb07714a18fc5ce00f2742c19e44b3bc Mon Sep 17 00:00:00 2001 From: ShivangiReja Date: Wed, 28 Aug 2024 18:20:48 -0700 Subject: [PATCH 11/11] Feedback --- .dotnet/CHANGELOG.md | 1 + .../Assistants/CodeInterpreterToolDefinition.Serialization.cs | 2 -- .dotnet/src/Custom/Assistants/GeneratorStubs.cs | 1 + .../Custom/Assistants/MessageCreationOptions.Serialization.cs | 1 - .dotnet/src/OpenAI.csproj | 2 +- 5 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.dotnet/CHANGELOG.md b/.dotnet/CHANGELOG.md index 424fb2758..4b68913e6 100644 --- a/.dotnet/CHANGELOG.md +++ b/.dotnet/CHANGELOG.md @@ -15,6 +15,7 @@ ### Other Changes - Reverted the removal of the version path parameter "v1" from the default endpoint URL. (commit_hash) +- Added `Experimental` attribute to all public APIs in the `OpenAI.Assistants` namespace. (commit_hash) ## 2.0.0-beta.10 (2024-08-26) diff --git a/.dotnet/src/Custom/Assistants/CodeInterpreterToolDefinition.Serialization.cs b/.dotnet/src/Custom/Assistants/CodeInterpreterToolDefinition.Serialization.cs index 8d72bf750..eae645a69 100644 --- a/.dotnet/src/Custom/Assistants/CodeInterpreterToolDefinition.Serialization.cs +++ b/.dotnet/src/Custom/Assistants/CodeInterpreterToolDefinition.Serialization.cs @@ -1,10 +1,8 @@ using System.ClientModel.Primitives; -using System.Diagnostics.CodeAnalysis; using System.Text.Json; namespace OpenAI.Assistants; -[Experimental("OPENAI001")] [CodeGenSuppress("global::System.ClientModel.Primitives.IJsonModel.Write", typeof(Utf8JsonWriter), typeof(ModelReaderWriterOptions))] public partial class CodeInterpreterToolDefinition : IJsonModel { diff --git a/.dotnet/src/Custom/Assistants/GeneratorStubs.cs b/.dotnet/src/Custom/Assistants/GeneratorStubs.cs index ff9c45b78..93223b656 100644 --- a/.dotnet/src/Custom/Assistants/GeneratorStubs.cs +++ b/.dotnet/src/Custom/Assistants/GeneratorStubs.cs @@ -6,6 +6,7 @@ namespace OpenAI.Assistants; * This file stubs and performs minimal customization to generated public types for the OpenAI.Assistants namespace * that are not otherwise attributed elsewhere. */ +[Experimental("OPENAI001")] [CodeGenModel("AssistantToolsCode")] public partial class CodeInterpreterToolDefinition : ToolDefinition { } diff --git a/.dotnet/src/Custom/Assistants/MessageCreationOptions.Serialization.cs b/.dotnet/src/Custom/Assistants/MessageCreationOptions.Serialization.cs index c66e3d925..abbbc25d8 100644 --- a/.dotnet/src/Custom/Assistants/MessageCreationOptions.Serialization.cs +++ b/.dotnet/src/Custom/Assistants/MessageCreationOptions.Serialization.cs @@ -1,5 +1,4 @@ using System.ClientModel.Primitives; -using System.Diagnostics.CodeAnalysis; using System.Text.Json; namespace OpenAI.Assistants diff --git a/.dotnet/src/OpenAI.csproj b/.dotnet/src/OpenAI.csproj index 1cde7e12b..3abe4d9b4 100644 --- a/.dotnet/src/OpenAI.csproj +++ b/.dotnet/src/OpenAI.csproj @@ -36,7 +36,7 @@ $(NoWarn),0169 - + $(NoWarn),OPENAI001; Debug;Release;Unsigned