diff --git a/eng/Packages.Data.props b/eng/Packages.Data.props index ec461fe6ea6f..a75f06561ce6 100644 --- a/eng/Packages.Data.props +++ b/eng/Packages.Data.props @@ -176,7 +176,7 @@ All should have PrivateAssets="All" set so they don't become package dependencies --> - + diff --git a/eng/emitter-package-lock.json b/eng/emitter-package-lock.json index 57e0270b9def..5cfcc12b24f9 100644 --- a/eng/emitter-package-lock.json +++ b/eng/emitter-package-lock.json @@ -5,7 +5,7 @@ "packages": { "": { "dependencies": { - "@azure-tools/typespec-csharp": "0.2.0-beta.20231212.1" + "@azure-tools/typespec-csharp": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js-test-autorest@local/npm/registry/@azure-tools/typespec-csharp/-/typespec-csharp-0.2.0-alpha.20231212.7.tgz" }, "devDependencies": { "@azure-tools/typespec-azure-core": "0.36.0", @@ -17,9 +17,9 @@ } }, "node_modules/@autorest/csharp": { - "version": "3.0.0-beta.20231212.1", - "resolved": "https://registry.npmjs.org/@autorest/csharp/-/csharp-3.0.0-beta.20231212.1.tgz", - "integrity": "sha512-jT8wcR8DH57vMHJRKxn8zzoQt5e+olDEHQq80YQaVULU2sGyo9We6XYxqs7TQpH2IpbubuJfFsGeQsop4GcN/w==" + "version": "3.0.0-alpha.20231212.7", + "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js-test-autorest@local/npm/registry/@autorest/csharp/-/csharp-3.0.0-alpha.20231212.7.tgz", + "integrity": "sha512-N0sqlqm+IrHOBqkwpRnWH0JH++S4i1vAR1+vMKz7hN9wv1EjMLibusskdh7GtrrBlkFbvTCfOye9aKCMZb/u9Q==" }, "node_modules/@azure-tools/typespec-azure-core": { "version": "0.36.0", @@ -55,11 +55,12 @@ } }, "node_modules/@azure-tools/typespec-csharp": { - "version": "0.2.0-beta.20231212.1", - "resolved": "https://registry.npmjs.org/@azure-tools/typespec-csharp/-/typespec-csharp-0.2.0-beta.20231212.1.tgz", - "integrity": "sha512-6xm3WY6ehJxieFVFbcb8UyQDWZO9qpFI+Sh29tau/TMGK4YbTAOcZ+k5LqTSUFkMR5x/NurVt+4BVc6QVa7RaQ==", + "version": "0.2.0-alpha.20231212.7", + "resolved": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js-test-autorest@local/npm/registry/@azure-tools/typespec-csharp/-/typespec-csharp-0.2.0-alpha.20231212.7.tgz", + "integrity": "sha512-rEZPjPrsIPOrcTcANk7ZzAp41/cyXucwJHVdtyKTHNmLQfCFGCPJbVXw0WopEQJoM1Nc1nddhceWKrMtQvQoWA==", + "license": "MIT", "dependencies": { - "@autorest/csharp": "3.0.0-beta.20231212.1", + "@autorest/csharp": "3.0.0-alpha.20231212.7", "json-serialize-refs": "0.1.0-0", "winston": "^3.8.2" }, diff --git a/eng/emitter-package.json b/eng/emitter-package.json index 54c5986b94ac..ded284599754 100644 --- a/eng/emitter-package.json +++ b/eng/emitter-package.json @@ -1,14 +1,17 @@ { "main": "dist/src/index.js", "dependencies": { - "@azure-tools/typespec-csharp": "0.2.0-beta.20231212.1" + "@azure-tools/typespec-csharp": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js-test-autorest@local/npm/registry/@azure-tools/typespec-csharp/-/typespec-csharp-0.2.0-alpha.20231212.7.tgz" }, "devDependencies": { - "@typespec/http": "0.50.0", - "@typespec/compiler": "0.50.0", - "@typespec/versioning": "0.50.0", + "@typespec/rest": "0.50.0", "@azure-tools/typespec-client-generator-core": "0.36.1", + "@typespec/http": "0.50.0", "@azure-tools/typespec-azure-core": "0.36.0", - "@typespec/rest": "0.50.0" + "@typespec/compiler": "0.50.0", + "@typespec/versioning": "0.50.0" + }, + "overrides": { + "@autorest/csharp": "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-js-test-autorest@local/npm/registry/@autorest/csharp/-/csharp-3.0.0-alpha.20231212.7.tgz" } } diff --git a/sdk/openai/Azure.AI.OpenAI/src/Generated/ChatCompletionsNamedFunctionToolSelection.Serialization.cs b/sdk/openai/Azure.AI.OpenAI/src/Generated/ChatCompletionsNamedFunctionToolSelection.Serialization.cs new file mode 100644 index 000000000000..7a4aad5f48b4 --- /dev/null +++ b/sdk/openai/Azure.AI.OpenAI/src/Generated/ChatCompletionsNamedFunctionToolSelection.Serialization.cs @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.OpenAI +{ + internal partial class ChatCompletionsNamedFunctionToolSelection : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); + writer.WriteEndObject(); + } + + /// Convert into a Utf8JsonRequestContent. + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/openai/Azure.AI.OpenAI/src/Generated/ChatCompletionsNamedFunctionToolSelection.cs b/sdk/openai/Azure.AI.OpenAI/src/Generated/ChatCompletionsNamedFunctionToolSelection.cs new file mode 100644 index 000000000000..45cc5b8970bf --- /dev/null +++ b/sdk/openai/Azure.AI.OpenAI/src/Generated/ChatCompletionsNamedFunctionToolSelection.cs @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; + +namespace Azure.AI.OpenAI +{ + /// A tool selection of a specific, named function tool that will limit chat completions to using the named function. + internal partial class ChatCompletionsNamedFunctionToolSelection : ChatCompletionsNamedToolSelection + { + /// Initializes a new instance of . + /// The name of the function that should be called. + /// is null. + public ChatCompletionsNamedFunctionToolSelection(string name) + { + Argument.AssertNotNull(name, nameof(name)); + + Type = "function"; + Name = name; + } + + /// Initializes a new instance of . + /// The object type. + /// The name of the function that should be called. + internal ChatCompletionsNamedFunctionToolSelection(string type, string name) : base(type) + { + Name = name; + } + + /// The name of the function that should be called. + public string Name { get; } + } +} diff --git a/sdk/openai/Azure.AI.OpenAI/src/Generated/ChatCompletionsNamedToolSelection.Serialization.cs b/sdk/openai/Azure.AI.OpenAI/src/Generated/ChatCompletionsNamedToolSelection.Serialization.cs new file mode 100644 index 000000000000..623dd2c34121 --- /dev/null +++ b/sdk/openai/Azure.AI.OpenAI/src/Generated/ChatCompletionsNamedToolSelection.Serialization.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure.Core; + +namespace Azure.AI.OpenAI +{ + internal partial class ChatCompletionsNamedToolSelection : IUtf8JsonSerializable + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) + { + writer.WriteStartObject(); + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type); + writer.WriteEndObject(); + } + + /// Convert into a Utf8JsonRequestContent. + internal virtual RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this); + return content; + } + } +} diff --git a/sdk/openai/Azure.AI.OpenAI/src/Generated/ChatCompletionsNamedToolSelection.cs b/sdk/openai/Azure.AI.OpenAI/src/Generated/ChatCompletionsNamedToolSelection.cs new file mode 100644 index 000000000000..b72c216c3de0 --- /dev/null +++ b/sdk/openai/Azure.AI.OpenAI/src/Generated/ChatCompletionsNamedToolSelection.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.AI.OpenAI +{ + /// + /// An abstract representation of an explicit, named tool selection to use for a chat completions request. + /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. + /// The available derived classes include . + /// + internal abstract partial class ChatCompletionsNamedToolSelection + { + /// Initializes a new instance of . + protected ChatCompletionsNamedToolSelection() + { + } + + /// Initializes a new instance of . + /// The object type. + internal ChatCompletionsNamedToolSelection(string type) + { + Type = type; + } + + /// The object type. + internal string Type { get; set; } + } +} diff --git a/sdk/openai/Azure.AI.OpenAI/src/Generated/UnknownAzureChatExtensionConfiguration.Serialization.cs b/sdk/openai/Azure.AI.OpenAI/src/Generated/UnknownAzureChatExtensionConfiguration.Serialization.cs new file mode 100644 index 000000000000..94e2d6bb509b --- /dev/null +++ b/sdk/openai/Azure.AI.OpenAI/src/Generated/UnknownAzureChatExtensionConfiguration.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure; + +namespace Azure.AI.OpenAI +{ + internal partial class UnknownAzureChatExtensionConfiguration + { + internal static UnknownAzureChatExtensionConfiguration DeserializeUnknownAzureChatExtensionConfiguration(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AzureChatExtensionType type = "Unknown"; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + type = new AzureChatExtensionType(property.Value.GetString()); + continue; + } + } + return new UnknownAzureChatExtensionConfiguration(type); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static UnknownAzureChatExtensionConfiguration FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeUnknownAzureChatExtensionConfiguration(document.RootElement); + } + } +} diff --git a/sdk/openai/Azure.AI.OpenAI/src/Generated/UnknownAzureChatExtensionConfiguration.cs b/sdk/openai/Azure.AI.OpenAI/src/Generated/UnknownAzureChatExtensionConfiguration.cs new file mode 100644 index 000000000000..d9d403d76580 --- /dev/null +++ b/sdk/openai/Azure.AI.OpenAI/src/Generated/UnknownAzureChatExtensionConfiguration.cs @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.AI.OpenAI +{ + /// Unknown version of AzureChatExtensionConfiguration. + internal partial class UnknownAzureChatExtensionConfiguration : AzureChatExtensionConfiguration + { + /// Initializes a new instance of . + internal UnknownAzureChatExtensionConfiguration() + { + } + + /// Initializes a new instance of . + /// + /// The label for the type of an Azure chat extension. This typically corresponds to a matching Azure resource. + /// Azure chat extensions are only compatible with Azure OpenAI. + /// + internal UnknownAzureChatExtensionConfiguration(AzureChatExtensionType type) : base(type) + { + } + } +} diff --git a/sdk/openai/Azure.AI.OpenAI/src/Generated/UnknownChatCompletionsNamedToolSelection.Serialization.cs b/sdk/openai/Azure.AI.OpenAI/src/Generated/UnknownChatCompletionsNamedToolSelection.Serialization.cs new file mode 100644 index 000000000000..a1e1db0f7876 --- /dev/null +++ b/sdk/openai/Azure.AI.OpenAI/src/Generated/UnknownChatCompletionsNamedToolSelection.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure; + +namespace Azure.AI.OpenAI +{ + internal partial class UnknownChatCompletionsNamedToolSelection + { + internal static UnknownChatCompletionsNamedToolSelection DeserializeUnknownChatCompletionsNamedToolSelection(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string type = "Unknown"; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString(); + continue; + } + } + return new UnknownChatCompletionsNamedToolSelection(type); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static UnknownChatCompletionsNamedToolSelection FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeUnknownChatCompletionsNamedToolSelection(document.RootElement); + } + } +} diff --git a/sdk/openai/Azure.AI.OpenAI/src/Generated/UnknownChatCompletionsNamedToolSelection.cs b/sdk/openai/Azure.AI.OpenAI/src/Generated/UnknownChatCompletionsNamedToolSelection.cs new file mode 100644 index 000000000000..fe0a50d402d8 --- /dev/null +++ b/sdk/openai/Azure.AI.OpenAI/src/Generated/UnknownChatCompletionsNamedToolSelection.cs @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.AI.OpenAI +{ + /// Unknown version of ChatCompletionsNamedToolSelection. + internal partial class UnknownChatCompletionsNamedToolSelection : ChatCompletionsNamedToolSelection + { + /// Initializes a new instance of . + internal UnknownChatCompletionsNamedToolSelection() + { + } + + /// Initializes a new instance of . + /// The object type. + internal UnknownChatCompletionsNamedToolSelection(string type) : base(type) + { + } + } +} diff --git a/sdk/openai/Azure.AI.OpenAI/src/Generated/UnknownChatCompletionsResponseFormat.Serialization.cs b/sdk/openai/Azure.AI.OpenAI/src/Generated/UnknownChatCompletionsResponseFormat.Serialization.cs new file mode 100644 index 000000000000..3459b2d94364 --- /dev/null +++ b/sdk/openai/Azure.AI.OpenAI/src/Generated/UnknownChatCompletionsResponseFormat.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure; + +namespace Azure.AI.OpenAI +{ + internal partial class UnknownChatCompletionsResponseFormat + { + internal static UnknownChatCompletionsResponseFormat DeserializeUnknownChatCompletionsResponseFormat(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string type = "Unknown"; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString(); + continue; + } + } + return new UnknownChatCompletionsResponseFormat(type); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static UnknownChatCompletionsResponseFormat FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeUnknownChatCompletionsResponseFormat(document.RootElement); + } + } +} diff --git a/sdk/openai/Azure.AI.OpenAI/src/Generated/UnknownChatCompletionsResponseFormat.cs b/sdk/openai/Azure.AI.OpenAI/src/Generated/UnknownChatCompletionsResponseFormat.cs new file mode 100644 index 000000000000..97617ea7dda2 --- /dev/null +++ b/sdk/openai/Azure.AI.OpenAI/src/Generated/UnknownChatCompletionsResponseFormat.cs @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.AI.OpenAI +{ + /// Unknown version of ChatCompletionsResponseFormat. + internal partial class UnknownChatCompletionsResponseFormat : ChatCompletionsResponseFormat + { + /// Initializes a new instance of . + internal UnknownChatCompletionsResponseFormat() + { + } + + /// Initializes a new instance of . + /// The discriminated type for the response format. + internal UnknownChatCompletionsResponseFormat(string type) : base(type) + { + } + } +} diff --git a/sdk/openai/Azure.AI.OpenAI/src/Generated/UnknownChatCompletionsToolDefinition.Serialization.cs b/sdk/openai/Azure.AI.OpenAI/src/Generated/UnknownChatCompletionsToolDefinition.Serialization.cs new file mode 100644 index 000000000000..e08cdbacc969 --- /dev/null +++ b/sdk/openai/Azure.AI.OpenAI/src/Generated/UnknownChatCompletionsToolDefinition.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure; + +namespace Azure.AI.OpenAI +{ + internal partial class UnknownChatCompletionsToolDefinition + { + internal static UnknownChatCompletionsToolDefinition DeserializeUnknownChatCompletionsToolDefinition(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string type = "Unknown"; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString(); + continue; + } + } + return new UnknownChatCompletionsToolDefinition(type); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static UnknownChatCompletionsToolDefinition FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeUnknownChatCompletionsToolDefinition(document.RootElement); + } + } +} diff --git a/sdk/openai/Azure.AI.OpenAI/src/Generated/UnknownChatCompletionsToolDefinition.cs b/sdk/openai/Azure.AI.OpenAI/src/Generated/UnknownChatCompletionsToolDefinition.cs new file mode 100644 index 000000000000..8a41171b32e3 --- /dev/null +++ b/sdk/openai/Azure.AI.OpenAI/src/Generated/UnknownChatCompletionsToolDefinition.cs @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.AI.OpenAI +{ + /// Unknown version of ChatCompletionsToolDefinition. + internal partial class UnknownChatCompletionsToolDefinition : ChatCompletionsToolDefinition + { + /// Initializes a new instance of . + internal UnknownChatCompletionsToolDefinition() + { + } + + /// Initializes a new instance of . + /// The object type. + internal UnknownChatCompletionsToolDefinition(string type) : base(type) + { + } + } +} diff --git a/sdk/openai/Azure.AI.OpenAI/src/Generated/UnknownChatMessageContentItem.Serialization.cs b/sdk/openai/Azure.AI.OpenAI/src/Generated/UnknownChatMessageContentItem.Serialization.cs new file mode 100644 index 000000000000..a8646230d9c0 --- /dev/null +++ b/sdk/openai/Azure.AI.OpenAI/src/Generated/UnknownChatMessageContentItem.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure; + +namespace Azure.AI.OpenAI +{ + internal partial class UnknownChatMessageContentItem + { + internal static UnknownChatMessageContentItem DeserializeUnknownChatMessageContentItem(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string type = "Unknown"; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + type = property.Value.GetString(); + continue; + } + } + return new UnknownChatMessageContentItem(type); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static UnknownChatMessageContentItem FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeUnknownChatMessageContentItem(document.RootElement); + } + } +} diff --git a/sdk/openai/Azure.AI.OpenAI/src/Generated/UnknownChatMessageContentItem.cs b/sdk/openai/Azure.AI.OpenAI/src/Generated/UnknownChatMessageContentItem.cs new file mode 100644 index 000000000000..adf6071174ca --- /dev/null +++ b/sdk/openai/Azure.AI.OpenAI/src/Generated/UnknownChatMessageContentItem.cs @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.AI.OpenAI +{ + /// Unknown version of ChatMessageContentItem. + internal partial class UnknownChatMessageContentItem : ChatMessageContentItem + { + /// Initializes a new instance of . + internal UnknownChatMessageContentItem() + { + } + + /// Initializes a new instance of . + /// The discriminated object type. + internal UnknownChatMessageContentItem(string type) : base(type) + { + } + } +} diff --git a/sdk/openai/Azure.AI.OpenAI/src/Generated/UnknownChatRequestMessage.Serialization.cs b/sdk/openai/Azure.AI.OpenAI/src/Generated/UnknownChatRequestMessage.Serialization.cs new file mode 100644 index 000000000000..c5035e78dfa4 --- /dev/null +++ b/sdk/openai/Azure.AI.OpenAI/src/Generated/UnknownChatRequestMessage.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure; + +namespace Azure.AI.OpenAI +{ + internal partial class UnknownChatRequestMessage + { + internal static UnknownChatRequestMessage DeserializeUnknownChatRequestMessage(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ChatRole role = "Unknown"; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("role"u8)) + { + role = new ChatRole(property.Value.GetString()); + continue; + } + } + return new UnknownChatRequestMessage(role); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static UnknownChatRequestMessage FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeUnknownChatRequestMessage(document.RootElement); + } + } +} diff --git a/sdk/openai/Azure.AI.OpenAI/src/Generated/UnknownChatRequestMessage.cs b/sdk/openai/Azure.AI.OpenAI/src/Generated/UnknownChatRequestMessage.cs new file mode 100644 index 000000000000..022fbefd7db3 --- /dev/null +++ b/sdk/openai/Azure.AI.OpenAI/src/Generated/UnknownChatRequestMessage.cs @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.AI.OpenAI +{ + /// Unknown version of ChatRequestMessage. + internal partial class UnknownChatRequestMessage : ChatRequestMessage + { + /// Initializes a new instance of . + internal UnknownChatRequestMessage() + { + } + + /// Initializes a new instance of . + /// The chat role associated with this message. + internal UnknownChatRequestMessage(ChatRole role) : base(role) + { + } + } +} diff --git a/sdk/openai/Azure.AI.OpenAI/src/Generated/UnknownOnYourDataAuthenticationOptions.Serialization.cs b/sdk/openai/Azure.AI.OpenAI/src/Generated/UnknownOnYourDataAuthenticationOptions.Serialization.cs new file mode 100644 index 000000000000..629456f03de7 --- /dev/null +++ b/sdk/openai/Azure.AI.OpenAI/src/Generated/UnknownOnYourDataAuthenticationOptions.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure; + +namespace Azure.AI.OpenAI +{ + internal partial class UnknownOnYourDataAuthenticationOptions + { + internal static UnknownOnYourDataAuthenticationOptions DeserializeUnknownOnYourDataAuthenticationOptions(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + OnYourDataAuthenticationType type = "Unknown"; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + type = new OnYourDataAuthenticationType(property.Value.GetString()); + continue; + } + } + return new UnknownOnYourDataAuthenticationOptions(type); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static UnknownOnYourDataAuthenticationOptions FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeUnknownOnYourDataAuthenticationOptions(document.RootElement); + } + } +} diff --git a/sdk/openai/Azure.AI.OpenAI/src/Generated/UnknownOnYourDataAuthenticationOptions.cs b/sdk/openai/Azure.AI.OpenAI/src/Generated/UnknownOnYourDataAuthenticationOptions.cs new file mode 100644 index 000000000000..1a85322fd8f1 --- /dev/null +++ b/sdk/openai/Azure.AI.OpenAI/src/Generated/UnknownOnYourDataAuthenticationOptions.cs @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.AI.OpenAI +{ + /// Unknown version of OnYourDataAuthenticationOptions. + internal partial class UnknownOnYourDataAuthenticationOptions : OnYourDataAuthenticationOptions + { + /// Initializes a new instance of . + internal UnknownOnYourDataAuthenticationOptions() + { + } + + /// Initializes a new instance of . + /// The authentication type. + internal UnknownOnYourDataAuthenticationOptions(OnYourDataAuthenticationType type) : base(type) + { + } + } +} diff --git a/sdk/openai/Azure.AI.OpenAI/src/Generated/UnknownOnYourDataVectorizationSource.Serialization.cs b/sdk/openai/Azure.AI.OpenAI/src/Generated/UnknownOnYourDataVectorizationSource.Serialization.cs new file mode 100644 index 000000000000..ce13dd52f160 --- /dev/null +++ b/sdk/openai/Azure.AI.OpenAI/src/Generated/UnknownOnYourDataVectorizationSource.Serialization.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System.Text.Json; +using Azure; + +namespace Azure.AI.OpenAI +{ + internal partial class UnknownOnYourDataVectorizationSource + { + internal static UnknownOnYourDataVectorizationSource DeserializeUnknownOnYourDataVectorizationSource(JsonElement element) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + OnYourDataVectorizationSourceType type = "Unknown"; + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("type"u8)) + { + type = new OnYourDataVectorizationSourceType(property.Value.GetString()); + continue; + } + } + return new UnknownOnYourDataVectorizationSource(type); + } + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static UnknownOnYourDataVectorizationSource FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeUnknownOnYourDataVectorizationSource(document.RootElement); + } + } +} diff --git a/sdk/openai/Azure.AI.OpenAI/src/Generated/UnknownOnYourDataVectorizationSource.cs b/sdk/openai/Azure.AI.OpenAI/src/Generated/UnknownOnYourDataVectorizationSource.cs new file mode 100644 index 000000000000..ebbfdc865a50 --- /dev/null +++ b/sdk/openai/Azure.AI.OpenAI/src/Generated/UnknownOnYourDataVectorizationSource.cs @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +namespace Azure.AI.OpenAI +{ + /// Unknown version of OnYourDataVectorizationSource. + internal partial class UnknownOnYourDataVectorizationSource : OnYourDataVectorizationSource + { + /// Initializes a new instance of . + internal UnknownOnYourDataVectorizationSource() + { + } + + /// Initializes a new instance of . + /// The type of vectorization source to use. + internal UnknownOnYourDataVectorizationSource(OnYourDataVectorizationSourceType type) : base(type) + { + } + } +}