diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AISearchIndexResource.Serialization.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AISearchIndexResource.Serialization.cs index ea2f141a7445..31cd6ac9faf2 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AISearchIndexResource.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AISearchIndexResource.Serialization.cs @@ -34,10 +34,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit throw new FormatException($"The model {nameof(AISearchIndexResource)} does not support writing '{format}' format."); } - writer.WritePropertyName("index_connection_id"u8); - writer.WriteStringValue(IndexConnectionId); - writer.WritePropertyName("index_name"u8); - writer.WriteStringValue(IndexName); + if (Optional.IsDefined(IndexConnectionId)) + { + writer.WritePropertyName("index_connection_id"u8); + writer.WriteStringValue(IndexConnectionId); + } + if (Optional.IsDefined(IndexName)) + { + writer.WritePropertyName("index_name"u8); + writer.WriteStringValue(IndexName); + } if (Optional.IsDefined(QueryType)) { writer.WritePropertyName("query_type"u8); diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AISearchIndexResource.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AISearchIndexResource.cs index 4d504c2142ac..562f9b1425ad 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AISearchIndexResource.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AISearchIndexResource.cs @@ -46,16 +46,8 @@ public partial class AISearchIndexResource private IDictionary _serializedAdditionalRawData; /// Initializes a new instance of . - /// An index connection id in an IndexResource attached to this agent. - /// The name of an index in an IndexResource attached to this agent. - /// or is null. - public AISearchIndexResource(string indexConnectionId, string indexName) + public AISearchIndexResource() { - Argument.AssertNotNull(indexConnectionId, nameof(indexConnectionId)); - Argument.AssertNotNull(indexName, nameof(indexName)); - - IndexConnectionId = indexConnectionId; - IndexName = indexName; } /// Initializes a new instance of . @@ -77,11 +69,6 @@ internal AISearchIndexResource(string indexConnectionId, string indexName, Azure _serializedAdditionalRawData = serializedAdditionalRawData; } - /// Initializes a new instance of for deserialization. - internal AISearchIndexResource() - { - } - /// An index connection id in an IndexResource attached to this agent. public string IndexConnectionId { get; set; } /// The name of an index in an IndexResource attached to this agent. diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AzureAISearchResource.Serialization.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AzureAISearchToolResource.Serialization.cs similarity index 70% rename from sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AzureAISearchResource.Serialization.cs rename to sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AzureAISearchToolResource.Serialization.cs index ee236005887d..4f10ee31798a 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AzureAISearchResource.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AzureAISearchToolResource.Serialization.cs @@ -13,11 +13,11 @@ namespace Azure.AI.Agents.Persistent { - public partial class AzureAISearchResource : IUtf8JsonSerializable, IJsonModel + public partial class AzureAISearchToolResource : IUtf8JsonSerializable, IJsonModel { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -28,10 +28,10 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderW /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(AzureAISearchResource)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(AzureAISearchToolResource)} does not support writing '{format}' format."); } if (Optional.IsCollectionDefined(IndexList)) @@ -61,19 +61,19 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } } - AzureAISearchResource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + AzureAISearchToolResource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(AzureAISearchResource)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(AzureAISearchToolResource)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeAzureAISearchResource(document.RootElement, options); + return DeserializeAzureAISearchToolResource(document.RootElement, options); } - internal static AzureAISearchResource DeserializeAzureAISearchResource(JsonElement element, ModelReaderWriterOptions options = null) + internal static AzureAISearchToolResource DeserializeAzureAISearchToolResource(JsonElement element, ModelReaderWriterOptions options = null) { options ??= ModelSerializationExtensions.WireOptions; @@ -106,46 +106,46 @@ internal static AzureAISearchResource DeserializeAzureAISearchResource(JsonEleme } } serializedAdditionalRawData = rawDataDictionary; - return new AzureAISearchResource(indexes ?? new ChangeTrackingList(), serializedAdditionalRawData); + return new AzureAISearchToolResource(indexes ?? new ChangeTrackingList(), serializedAdditionalRawData); } - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options, AzureAIAgentsPersistentContext.Default); default: - throw new FormatException($"The model {nameof(AzureAISearchResource)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(AzureAISearchToolResource)} does not support writing '{options.Format}' format."); } } - AzureAISearchResource IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + AzureAISearchToolResource IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": { using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeAzureAISearchResource(document.RootElement, options); + return DeserializeAzureAISearchToolResource(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(AzureAISearchResource)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(AzureAISearchToolResource)} does not support reading '{options.Format}' format."); } } - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; /// Deserializes the model from a raw response. /// The response to deserialize the model from. - internal static AzureAISearchResource FromResponse(Response response) + internal static AzureAISearchToolResource FromResponse(Response response) { using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeAzureAISearchResource(document.RootElement); + return DeserializeAzureAISearchToolResource(document.RootElement); } /// Convert into a . diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AzureAISearchResource.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AzureAISearchToolResource.cs similarity index 89% rename from sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AzureAISearchResource.cs rename to sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AzureAISearchToolResource.cs index 1c8d009cbb4e..7e4a89dce0bd 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AzureAISearchResource.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/AzureAISearchToolResource.cs @@ -11,7 +11,7 @@ namespace Azure.AI.Agents.Persistent { /// A set of index resources used by the `azure_ai_search` tool. - public partial class AzureAISearchResource + public partial class AzureAISearchToolResource { /// /// Keeps track of any properties unknown to the library. @@ -45,19 +45,19 @@ public partial class AzureAISearchResource /// private IDictionary _serializedAdditionalRawData; - /// Initializes a new instance of . - public AzureAISearchResource() + /// Initializes a new instance of . + public AzureAISearchToolResource() { IndexList = new ChangeTrackingList(); } - /// Initializes a new instance of . + /// Initializes a new instance of . /// /// The indices attached to this agent. There can be a maximum of 1 index /// resource attached to the agent. /// /// Keeps track of any properties unknown to the library. - internal AzureAISearchResource(IList indexList, IDictionary serializedAdditionalRawData) + internal AzureAISearchToolResource(IList indexList, IDictionary serializedAdditionalRawData) { IndexList = indexList; _serializedAdditionalRawData = serializedAdditionalRawData; diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingCustomSearchConfiguration.Serialization.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingCustomSearchConfiguration.Serialization.cs deleted file mode 100644 index ac57ac91f74f..000000000000 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingCustomSearchConfiguration.Serialization.cs +++ /dev/null @@ -1,205 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Agents.Persistent -{ - public partial class BingCustomSearchConfiguration : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(BingCustomSearchConfiguration)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("connection_id"u8); - writer.WriteStringValue(ConnectionId); - writer.WritePropertyName("instance_name"u8); - writer.WriteStringValue(InstanceName); - if (Optional.IsDefined(Market)) - { - writer.WritePropertyName("market"u8); - writer.WriteStringValue(Market); - } - if (Optional.IsDefined(SetLang)) - { - writer.WritePropertyName("set_lang"u8); - writer.WriteStringValue(SetLang); - } - if (Optional.IsDefined(Count)) - { - writer.WritePropertyName("count"u8); - writer.WriteNumberValue(Count.Value); - } - if (Optional.IsDefined(Freshness)) - { - writer.WritePropertyName("freshness"u8); - writer.WriteStringValue(Freshness); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - BingCustomSearchConfiguration IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(BingCustomSearchConfiguration)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeBingCustomSearchConfiguration(document.RootElement, options); - } - - internal static BingCustomSearchConfiguration DeserializeBingCustomSearchConfiguration(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string connectionId = default; - string instanceName = default; - string market = default; - string setLang = default; - long? count = default; - string freshness = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("connection_id"u8)) - { - connectionId = property.Value.GetString(); - continue; - } - if (property.NameEquals("instance_name"u8)) - { - instanceName = property.Value.GetString(); - continue; - } - if (property.NameEquals("market"u8)) - { - market = property.Value.GetString(); - continue; - } - if (property.NameEquals("set_lang"u8)) - { - setLang = property.Value.GetString(); - continue; - } - if (property.NameEquals("count"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - count = property.Value.GetInt64(); - continue; - } - if (property.NameEquals("freshness"u8)) - { - freshness = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new BingCustomSearchConfiguration( - connectionId, - instanceName, - market, - setLang, - count, - freshness, - serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options, AzureAIAgentsPersistentContext.Default); - default: - throw new FormatException($"The model {nameof(BingCustomSearchConfiguration)} does not support writing '{options.Format}' format."); - } - } - - BingCustomSearchConfiguration IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeBingCustomSearchConfiguration(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(BingCustomSearchConfiguration)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static BingCustomSearchConfiguration FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeBingCustomSearchConfiguration(document.RootElement); - } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingCustomSearchConfiguration.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingCustomSearchConfiguration.cs deleted file mode 100644 index a157244c40fb..000000000000 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingCustomSearchConfiguration.cs +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Agents.Persistent -{ - /// A bing custom search configuration. - public partial class BingCustomSearchConfiguration - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - /// Connection id for grounding with bing search. - /// Name of the custom configuration instance given to config. - /// or is null. - public BingCustomSearchConfiguration(string connectionId, string instanceName) - { - Argument.AssertNotNull(connectionId, nameof(connectionId)); - Argument.AssertNotNull(instanceName, nameof(instanceName)); - - ConnectionId = connectionId; - InstanceName = instanceName; - } - - /// Initializes a new instance of . - /// Connection id for grounding with bing search. - /// Name of the custom configuration instance given to config. - /// The market where the results come from. - /// The language to use for user interface strings when calling Bing API. - /// The number of search results to return in the bing api response. - /// Filter search results by a specific time range. Accepted values: https://learn.microsoft.com/bing/search-apis/bing-web-search/reference/query-parameters. - /// Keeps track of any properties unknown to the library. - internal BingCustomSearchConfiguration(string connectionId, string instanceName, string market, string setLang, long? count, string freshness, IDictionary serializedAdditionalRawData) - { - ConnectionId = connectionId; - InstanceName = instanceName; - Market = market; - SetLang = setLang; - Count = count; - Freshness = freshness; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal BingCustomSearchConfiguration() - { - } - - /// Connection id for grounding with bing search. - public string ConnectionId { get; set; } - /// Name of the custom configuration instance given to config. - public string InstanceName { get; set; } - /// The market where the results come from. - public string Market { get; set; } - /// The language to use for user interface strings when calling Bing API. - public string SetLang { get; set; } - /// The number of search results to return in the bing api response. - public long? Count { get; set; } - /// Filter search results by a specific time range. Accepted values: https://learn.microsoft.com/bing/search-apis/bing-web-search/reference/query-parameters. - public string Freshness { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingCustomSearchConfigurationList.Serialization.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingCustomSearchConfigurationList.Serialization.cs deleted file mode 100644 index 1f16b0532430..000000000000 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingCustomSearchConfigurationList.Serialization.cs +++ /dev/null @@ -1,152 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Agents.Persistent -{ - public partial class BingCustomSearchConfigurationList : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(BingCustomSearchConfigurationList)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("search_configurations"u8); - writer.WriteStartArray(); - foreach (var item in SearchConfigurations) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - BingCustomSearchConfigurationList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(BingCustomSearchConfigurationList)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeBingCustomSearchConfigurationList(document.RootElement, options); - } - - internal static BingCustomSearchConfigurationList DeserializeBingCustomSearchConfigurationList(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IList searchConfigurations = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("search_configurations"u8)) - { - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(BingCustomSearchConfiguration.DeserializeBingCustomSearchConfiguration(item, options)); - } - searchConfigurations = array; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new BingCustomSearchConfigurationList(searchConfigurations, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options, AzureAIAgentsPersistentContext.Default); - default: - throw new FormatException($"The model {nameof(BingCustomSearchConfigurationList)} does not support writing '{options.Format}' format."); - } - } - - BingCustomSearchConfigurationList IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeBingCustomSearchConfigurationList(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(BingCustomSearchConfigurationList)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static BingCustomSearchConfigurationList FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeBingCustomSearchConfigurationList(document.RootElement); - } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingCustomSearchConfigurationList.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingCustomSearchConfigurationList.cs deleted file mode 100644 index ba154aacae2b..000000000000 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingCustomSearchConfigurationList.cs +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; -using System.Linq; - -namespace Azure.AI.Agents.Persistent -{ - /// A list of search configurations currently used by the `bing_custom_search` tool. - public partial class BingCustomSearchConfigurationList - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - /// - /// The connections attached to this tool. There can be a maximum of 1 connection - /// resource attached to the tool. - /// - /// is null. - public BingCustomSearchConfigurationList(IEnumerable searchConfigurations) - { - Argument.AssertNotNull(searchConfigurations, nameof(searchConfigurations)); - - SearchConfigurations = searchConfigurations.ToList(); - } - - /// Initializes a new instance of . - /// - /// The connections attached to this tool. There can be a maximum of 1 connection - /// resource attached to the tool. - /// - /// Keeps track of any properties unknown to the library. - internal BingCustomSearchConfigurationList(IList searchConfigurations, IDictionary serializedAdditionalRawData) - { - SearchConfigurations = searchConfigurations; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal BingCustomSearchConfigurationList() - { - } - - /// - /// The connections attached to this tool. There can be a maximum of 1 connection - /// resource attached to the tool. - /// - public IList SearchConfigurations { get; } - } -} diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingCustomSearchToolDefinition.Serialization.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingCustomSearchToolDefinition.Serialization.cs deleted file mode 100644 index 020abce9e0ea..000000000000 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingCustomSearchToolDefinition.Serialization.cs +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Agents.Persistent -{ - public partial class BingCustomSearchToolDefinition : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(BingCustomSearchToolDefinition)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("bing_custom_search"u8); - writer.WriteObjectValue(BingCustomSearch, options); - } - - BingCustomSearchToolDefinition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(BingCustomSearchToolDefinition)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeBingCustomSearchToolDefinition(document.RootElement, options); - } - - internal static BingCustomSearchToolDefinition DeserializeBingCustomSearchToolDefinition(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - BingCustomSearchConfigurationList bingCustomSearch = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("bing_custom_search"u8)) - { - bingCustomSearch = BingCustomSearchConfigurationList.DeserializeBingCustomSearchConfigurationList(property.Value, options); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new BingCustomSearchToolDefinition(type, serializedAdditionalRawData, bingCustomSearch); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options, AzureAIAgentsPersistentContext.Default); - default: - throw new FormatException($"The model {nameof(BingCustomSearchToolDefinition)} does not support writing '{options.Format}' format."); - } - } - - BingCustomSearchToolDefinition IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeBingCustomSearchToolDefinition(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(BingCustomSearchToolDefinition)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new BingCustomSearchToolDefinition FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeBingCustomSearchToolDefinition(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingCustomSearchToolDefinition.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingCustomSearchToolDefinition.cs deleted file mode 100644 index 3018f822f2a4..000000000000 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/BingCustomSearchToolDefinition.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Agents.Persistent -{ - /// The input definition information for a Bing custom search tool as used to configure an agent. - public partial class BingCustomSearchToolDefinition : ToolDefinition - { - /// Initializes a new instance of . - /// The list of search configurations used by the bing custom search tool. - /// is null. - public BingCustomSearchToolDefinition(BingCustomSearchConfigurationList bingCustomSearch) - { - Argument.AssertNotNull(bingCustomSearch, nameof(bingCustomSearch)); - - Type = "bing_custom_search"; - BingCustomSearch = bingCustomSearch; - } - - /// Initializes a new instance of . - /// The object type. - /// Keeps track of any properties unknown to the library. - /// The list of search configurations used by the bing custom search tool. - internal BingCustomSearchToolDefinition(string type, IDictionary serializedAdditionalRawData, BingCustomSearchConfigurationList bingCustomSearch) : base(type, serializedAdditionalRawData) - { - BingCustomSearch = bingCustomSearch; - } - - /// Initializes a new instance of for deserialization. - internal BingCustomSearchToolDefinition() - { - } - - /// The list of search configurations used by the bing custom search tool. - public BingCustomSearchConfigurationList BingCustomSearch { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/CreateAgentRequest.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/CreateAgentRequest.cs index 02993f45cecc..14c2a11fbd92 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/CreateAgentRequest.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/CreateAgentRequest.cs @@ -65,7 +65,7 @@ internal CreateAgentRequest(string model) /// /// The collection of tools to enable for the new agent. /// 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 , , , , , , , , , and . + /// The available derived classes include , , , , , , and . /// /// /// A set of resources that are used by the agent's tools. The resources are specific to the type of tool. For example, the `code_interpreter` @@ -115,7 +115,7 @@ internal CreateAgentRequest() /// /// The collection of tools to enable for the new agent. /// 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 , , , , , , , , , and . + /// The available derived classes include , , , , , , and . /// public IReadOnlyList Tools { get; } /// diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/CreateRunRequest.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/CreateRunRequest.cs index d6413572c7a9..68dabc3ba735 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/CreateRunRequest.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/CreateRunRequest.cs @@ -70,7 +70,7 @@ internal CreateRunRequest(string assistantId) /// /// The overridden list of enabled tools that the agent should use to run the thread. /// 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 , , , , , , , , , and . + /// The available derived classes include , , , , , , and . /// /// /// If `true`, returns a stream of events that happen during the Run as server-sent events, @@ -145,7 +145,7 @@ internal CreateRunRequest() /// /// The overridden list of enabled tools that the agent should use to run the thread. /// 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 , , , , , , , , , and . + /// The available derived classes include , , , , , , and . /// public IReadOnlyList OverrideTools { get; } /// diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/CreateThreadAndRunRequest.Serialization.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/CreateThreadAndRunRequest.Serialization.cs index f08fc03e6b36..440b77ba6ae5 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/CreateThreadAndRunRequest.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/CreateThreadAndRunRequest.Serialization.cs @@ -262,7 +262,7 @@ internal static CreateThreadAndRunRequest DeserializeCreateThreadAndRunRequest(J string model = default; string instructions = default; IReadOnlyList tools = default; - UpdateToolResourcesOptions toolResources = default; + ToolResources toolResources = default; bool? stream = default; float? temperature = default; float? topP = default; @@ -332,7 +332,7 @@ internal static CreateThreadAndRunRequest DeserializeCreateThreadAndRunRequest(J toolResources = null; continue; } - toolResources = UpdateToolResourcesOptions.DeserializeUpdateToolResourcesOptions(property.Value, options); + toolResources = ToolResources.DeserializeToolResources(property.Value, options); continue; } if (property.NameEquals("stream"u8)) diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/CreateThreadAndRunRequest.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/CreateThreadAndRunRequest.cs index 49848d9fc53c..1d5d8ebd9187 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/CreateThreadAndRunRequest.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/CreateThreadAndRunRequest.cs @@ -65,7 +65,7 @@ internal CreateThreadAndRunRequest(string assistantId) /// /// The overridden list of enabled tools the agent should use to run the thread. /// 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 , , , , , , , , , and . + /// The available derived classes include , , , , , , and . /// /// Override the tools the agent can use for this run. This is useful for modifying the behavior on a per-run basis. /// @@ -99,7 +99,7 @@ internal CreateThreadAndRunRequest(string assistantId) /// If `true` functions will run in parallel during tool use. /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. /// Keeps track of any properties unknown to the library. - internal CreateThreadAndRunRequest(string assistantId, PersistentAgentThreadCreationOptions thread, string overrideModelName, string overrideInstructions, IReadOnlyList overrideTools, UpdateToolResourcesOptions toolResources, bool? stream, float? temperature, float? topP, int? maxPromptTokens, int? maxCompletionTokens, Truncation truncationStrategy, BinaryData toolChoice, BinaryData responseFormat, bool? parallelToolCalls, IReadOnlyDictionary metadata, IDictionary serializedAdditionalRawData) + internal CreateThreadAndRunRequest(string assistantId, PersistentAgentThreadCreationOptions thread, string overrideModelName, string overrideInstructions, IReadOnlyList overrideTools, ToolResources toolResources, bool? stream, float? temperature, float? topP, int? maxPromptTokens, int? maxCompletionTokens, Truncation truncationStrategy, BinaryData toolChoice, BinaryData responseFormat, bool? parallelToolCalls, IReadOnlyDictionary metadata, IDictionary serializedAdditionalRawData) { AssistantId = assistantId; Thread = thread; @@ -136,11 +136,11 @@ internal CreateThreadAndRunRequest() /// /// The overridden list of enabled tools the agent should use to run the thread. /// 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 , , , , , , , , , and . + /// The available derived classes include , , , , , , and . /// public IReadOnlyList OverrideTools { get; } /// Override the tools the agent can use for this run. This is useful for modifying the behavior on a per-run basis. - public UpdateToolResourcesOptions ToolResources { get; } + public ToolResources ToolResources { get; } /// /// If `true`, returns a stream of events that happen during the Run as server-sent events, /// terminating when the Run enters a terminal state with a `data: [DONE]` message. diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/Docs/PersistentAgentsAdministrationClient.xml b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/Docs/PersistentAgentsAdministrationClient.xml new file mode 100644 index 000000000000..8e31e38b44f4 --- /dev/null +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/Docs/PersistentAgentsAdministrationClient.xml @@ -0,0 +1,1063 @@ + + + + + +This sample shows how to call CreateAgentAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +PersistentAgentsAdministrationClient client = new PersistentAgentsAdministrationClient(endpoint, credential); + +Response response = await client.CreateAgentAsync("jyrgfmhrrrngtonrmo"); +]]> +This sample shows how to call CreateAgentAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +PersistentAgentsAdministrationClient client = new PersistentAgentsAdministrationClient(endpoint, credential); + +Response response = await client.CreateAgentAsync("jyrgfmhrrrngtonrmo"); +]]> + + + +This sample shows how to call CreateAgent. +"); +TokenCredential credential = new DefaultAzureCredential(); +PersistentAgentsAdministrationClient client = new PersistentAgentsAdministrationClient(endpoint, credential); + +Response response = client.CreateAgent("jyrgfmhrrrngtonrmo"); +]]> +This sample shows how to call CreateAgent. +"); +TokenCredential credential = new DefaultAzureCredential(); +PersistentAgentsAdministrationClient client = new PersistentAgentsAdministrationClient(endpoint, credential); + +Response response = client.CreateAgent("jyrgfmhrrrngtonrmo"); +]]> + + + +This sample shows how to call CreateAgentAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PersistentAgentsAdministrationClient client = new PersistentAgentsAdministrationClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + model = "jyrgfmhrrrngtonrmo", + name = "zyldigcd", + description = "dhjkjzixwadczfduxpodfrdhgz", + instructions = "haeralumiezrrsaqzmbkkjcfxpqqog", + tools = Array.Empty(), + tool_resources = new + { + code_interpreter = new + { + file_ids = new object[] + { + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul" + }, + data_sources = new object[] + { + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + } + }, + }, + file_search = new + { + vector_store_ids = new object[] + { + "jkrrjfupyxehwacylflmx" + }, + vector_stores = new object[] + { + new + { + name = "bftl", + configuration = new + { + data_sources = new object[] + { + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + } + }, + }, + } + }, + }, + azure_ai_search = new + { + indexes = new object[] + { + new + { + index_connection_id = "zkqk", + index_name = "yvxhjyiomlffkuboqokcojfd", + query_type = "simple", + top_k = 27, + filter = "jjbewpsjmygox", + index_asset_id = "iwfmzmxzh", + } + }, + }, + }, + temperature = 11F, + top_p = 19F, + metadata = new + { + key8068 = "ebsxjdqlsifbuarpdcrwysf", + }, +}); +Response response = await client.CreateAgentAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("model").ToString()); +Console.WriteLine(result.GetProperty("instructions").ToString()); +Console.WriteLine(result.GetProperty("tools")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("tool_resources").ToString()); +Console.WriteLine(result.GetProperty("temperature").ToString()); +Console.WriteLine(result.GetProperty("top_p").ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +]]> +This sample shows how to call CreateAgentAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PersistentAgentsAdministrationClient client = new PersistentAgentsAdministrationClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + model = "jyrgfmhrrrngtonrmo", +}); +Response response = await client.CreateAgentAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("model").ToString()); +Console.WriteLine(result.GetProperty("instructions").ToString()); +Console.WriteLine(result.GetProperty("tools")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("tool_resources").ToString()); +Console.WriteLine(result.GetProperty("temperature").ToString()); +Console.WriteLine(result.GetProperty("top_p").ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +]]> + + + +This sample shows how to call CreateAgent and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PersistentAgentsAdministrationClient client = new PersistentAgentsAdministrationClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + model = "jyrgfmhrrrngtonrmo", + name = "zyldigcd", + description = "dhjkjzixwadczfduxpodfrdhgz", + instructions = "haeralumiezrrsaqzmbkkjcfxpqqog", + tools = Array.Empty(), + tool_resources = new + { + code_interpreter = new + { + file_ids = new object[] + { + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul" + }, + data_sources = new object[] + { + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + } + }, + }, + file_search = new + { + vector_store_ids = new object[] + { + "jkrrjfupyxehwacylflmx" + }, + vector_stores = new object[] + { + new + { + name = "bftl", + configuration = new + { + data_sources = new object[] + { + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + } + }, + }, + } + }, + }, + azure_ai_search = new + { + indexes = new object[] + { + new + { + index_connection_id = "zkqk", + index_name = "yvxhjyiomlffkuboqokcojfd", + query_type = "simple", + top_k = 27, + filter = "jjbewpsjmygox", + index_asset_id = "iwfmzmxzh", + } + }, + }, + }, + temperature = 11F, + top_p = 19F, + metadata = new + { + key8068 = "ebsxjdqlsifbuarpdcrwysf", + }, +}); +Response response = client.CreateAgent(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("model").ToString()); +Console.WriteLine(result.GetProperty("instructions").ToString()); +Console.WriteLine(result.GetProperty("tools")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("tool_resources").ToString()); +Console.WriteLine(result.GetProperty("temperature").ToString()); +Console.WriteLine(result.GetProperty("top_p").ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +]]> +This sample shows how to call CreateAgent and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PersistentAgentsAdministrationClient client = new PersistentAgentsAdministrationClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + model = "jyrgfmhrrrngtonrmo", +}); +Response response = client.CreateAgent(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("model").ToString()); +Console.WriteLine(result.GetProperty("instructions").ToString()); +Console.WriteLine(result.GetProperty("tools")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("tool_resources").ToString()); +Console.WriteLine(result.GetProperty("temperature").ToString()); +Console.WriteLine(result.GetProperty("top_p").ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +]]> + + + +This sample shows how to call GetAgentAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +PersistentAgentsAdministrationClient client = new PersistentAgentsAdministrationClient(endpoint, credential); + +Response response = await client.GetAgentAsync("rzrtnsfncjtctybnxemiugavvf"); +]]> +This sample shows how to call GetAgentAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +PersistentAgentsAdministrationClient client = new PersistentAgentsAdministrationClient(endpoint, credential); + +Response response = await client.GetAgentAsync("rzrtnsfncjtctybnxemiugavvf"); +]]> + + + +This sample shows how to call GetAgent. +"); +TokenCredential credential = new DefaultAzureCredential(); +PersistentAgentsAdministrationClient client = new PersistentAgentsAdministrationClient(endpoint, credential); + +Response response = client.GetAgent("rzrtnsfncjtctybnxemiugavvf"); +]]> +This sample shows how to call GetAgent. +"); +TokenCredential credential = new DefaultAzureCredential(); +PersistentAgentsAdministrationClient client = new PersistentAgentsAdministrationClient(endpoint, credential); + +Response response = client.GetAgent("rzrtnsfncjtctybnxemiugavvf"); +]]> + + + +This sample shows how to call GetAgentAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PersistentAgentsAdministrationClient client = new PersistentAgentsAdministrationClient(endpoint, credential); + +Response response = await client.GetAgentAsync("rzrtnsfncjtctybnxemiugavvf", (RequestContext)null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("model").ToString()); +Console.WriteLine(result.GetProperty("instructions").ToString()); +Console.WriteLine(result.GetProperty("tools")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("tool_resources").ToString()); +Console.WriteLine(result.GetProperty("temperature").ToString()); +Console.WriteLine(result.GetProperty("top_p").ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +]]> +This sample shows how to call GetAgentAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PersistentAgentsAdministrationClient client = new PersistentAgentsAdministrationClient(endpoint, credential); + +Response response = await client.GetAgentAsync("rzrtnsfncjtctybnxemiugavvf", (RequestContext)null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("model").ToString()); +Console.WriteLine(result.GetProperty("instructions").ToString()); +Console.WriteLine(result.GetProperty("tools")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("tool_resources").ToString()); +Console.WriteLine(result.GetProperty("temperature").ToString()); +Console.WriteLine(result.GetProperty("top_p").ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +]]> + + + +This sample shows how to call GetAgent and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PersistentAgentsAdministrationClient client = new PersistentAgentsAdministrationClient(endpoint, credential); + +Response response = client.GetAgent("rzrtnsfncjtctybnxemiugavvf", (RequestContext)null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("model").ToString()); +Console.WriteLine(result.GetProperty("instructions").ToString()); +Console.WriteLine(result.GetProperty("tools")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("tool_resources").ToString()); +Console.WriteLine(result.GetProperty("temperature").ToString()); +Console.WriteLine(result.GetProperty("top_p").ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +]]> +This sample shows how to call GetAgent and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PersistentAgentsAdministrationClient client = new PersistentAgentsAdministrationClient(endpoint, credential); + +Response response = client.GetAgent("rzrtnsfncjtctybnxemiugavvf", (RequestContext)null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("model").ToString()); +Console.WriteLine(result.GetProperty("instructions").ToString()); +Console.WriteLine(result.GetProperty("tools")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("tool_resources").ToString()); +Console.WriteLine(result.GetProperty("temperature").ToString()); +Console.WriteLine(result.GetProperty("top_p").ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +]]> + + + +This sample shows how to call UpdateAgentAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +PersistentAgentsAdministrationClient client = new PersistentAgentsAdministrationClient(endpoint, credential); + +Response response = await client.UpdateAgentAsync("nibpceztzjbmfzoas"); +]]> +This sample shows how to call UpdateAgentAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +PersistentAgentsAdministrationClient client = new PersistentAgentsAdministrationClient(endpoint, credential); + +Response response = await client.UpdateAgentAsync("nibpceztzjbmfzoas"); +]]> + + + +This sample shows how to call UpdateAgent. +"); +TokenCredential credential = new DefaultAzureCredential(); +PersistentAgentsAdministrationClient client = new PersistentAgentsAdministrationClient(endpoint, credential); + +Response response = client.UpdateAgent("nibpceztzjbmfzoas"); +]]> +This sample shows how to call UpdateAgent. +"); +TokenCredential credential = new DefaultAzureCredential(); +PersistentAgentsAdministrationClient client = new PersistentAgentsAdministrationClient(endpoint, credential); + +Response response = client.UpdateAgent("nibpceztzjbmfzoas"); +]]> + + + +This sample shows how to call UpdateAgentAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PersistentAgentsAdministrationClient client = new PersistentAgentsAdministrationClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + model = "ovsqsbcptyb", + name = "twuqmjwybuqaolohuuhwwgnmfxpwgj", + description = "iosozem", + instructions = "wvkhggyrkzvhx", + tools = Array.Empty(), + tool_resources = new + { + code_interpreter = new + { + file_ids = new object[] + { + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul" + }, + data_sources = new object[] + { + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + } + }, + }, + file_search = new + { + vector_store_ids = new object[] + { + "jkrrjfupyxehwacylflmx" + }, + vector_stores = new object[] + { + new + { + name = "bftl", + configuration = new + { + data_sources = new object[] + { + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + } + }, + }, + } + }, + }, + azure_ai_search = new + { + indexes = new object[] + { + new + { + index_connection_id = "zkqk", + index_name = "yvxhjyiomlffkuboqokcojfd", + query_type = "simple", + top_k = 27, + filter = "jjbewpsjmygox", + index_asset_id = "iwfmzmxzh", + } + }, + }, + }, + temperature = 26F, + top_p = 14F, + metadata = new + { + key11 = "mpbdrolmnthhjmjq", + }, +}); +Response response = await client.UpdateAgentAsync("nibpceztzjbmfzoas", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("model").ToString()); +Console.WriteLine(result.GetProperty("instructions").ToString()); +Console.WriteLine(result.GetProperty("tools")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("tool_resources").ToString()); +Console.WriteLine(result.GetProperty("temperature").ToString()); +Console.WriteLine(result.GetProperty("top_p").ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +]]> +This sample shows how to call UpdateAgentAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PersistentAgentsAdministrationClient client = new PersistentAgentsAdministrationClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new object()); +Response response = await client.UpdateAgentAsync("nibpceztzjbmfzoas", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("model").ToString()); +Console.WriteLine(result.GetProperty("instructions").ToString()); +Console.WriteLine(result.GetProperty("tools")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("tool_resources").ToString()); +Console.WriteLine(result.GetProperty("temperature").ToString()); +Console.WriteLine(result.GetProperty("top_p").ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +]]> + + + +This sample shows how to call UpdateAgent and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PersistentAgentsAdministrationClient client = new PersistentAgentsAdministrationClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new +{ + model = "ovsqsbcptyb", + name = "twuqmjwybuqaolohuuhwwgnmfxpwgj", + description = "iosozem", + instructions = "wvkhggyrkzvhx", + tools = Array.Empty(), + tool_resources = new + { + code_interpreter = new + { + file_ids = new object[] + { + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul" + }, + data_sources = new object[] + { + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + } + }, + }, + file_search = new + { + vector_store_ids = new object[] + { + "jkrrjfupyxehwacylflmx" + }, + vector_stores = new object[] + { + new + { + name = "bftl", + configuration = new + { + data_sources = new object[] + { + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + } + }, + }, + } + }, + }, + azure_ai_search = new + { + indexes = new object[] + { + new + { + index_connection_id = "zkqk", + index_name = "yvxhjyiomlffkuboqokcojfd", + query_type = "simple", + top_k = 27, + filter = "jjbewpsjmygox", + index_asset_id = "iwfmzmxzh", + } + }, + }, + }, + temperature = 26F, + top_p = 14F, + metadata = new + { + key11 = "mpbdrolmnthhjmjq", + }, +}); +Response response = client.UpdateAgent("nibpceztzjbmfzoas", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("model").ToString()); +Console.WriteLine(result.GetProperty("instructions").ToString()); +Console.WriteLine(result.GetProperty("tools")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("tool_resources").ToString()); +Console.WriteLine(result.GetProperty("temperature").ToString()); +Console.WriteLine(result.GetProperty("top_p").ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +]]> +This sample shows how to call UpdateAgent and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PersistentAgentsAdministrationClient client = new PersistentAgentsAdministrationClient(endpoint, credential); + +using RequestContent content = RequestContent.Create(new object()); +Response response = client.UpdateAgent("nibpceztzjbmfzoas", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("description").ToString()); +Console.WriteLine(result.GetProperty("model").ToString()); +Console.WriteLine(result.GetProperty("instructions").ToString()); +Console.WriteLine(result.GetProperty("tools")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("tool_resources").ToString()); +Console.WriteLine(result.GetProperty("temperature").ToString()); +Console.WriteLine(result.GetProperty("top_p").ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +]]> + + + +This sample shows how to call GetAgentsAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +PersistentAgentsAdministrationClient client = new PersistentAgentsAdministrationClient(endpoint, credential); + +await foreach (PersistentAgent item in client.GetAgentsAsync()) +{ +} +]]> +This sample shows how to call GetAgentsAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +PersistentAgentsAdministrationClient client = new PersistentAgentsAdministrationClient(endpoint, credential); + +await foreach (PersistentAgent item in client.GetAgentsAsync()) +{ +} +]]> + + + +This sample shows how to call GetAgents. +"); +TokenCredential credential = new DefaultAzureCredential(); +PersistentAgentsAdministrationClient client = new PersistentAgentsAdministrationClient(endpoint, credential); + +foreach (PersistentAgent item in client.GetAgents()) +{ +} +]]> +This sample shows how to call GetAgents. +"); +TokenCredential credential = new DefaultAzureCredential(); +PersistentAgentsAdministrationClient client = new PersistentAgentsAdministrationClient(endpoint, credential); + +foreach (PersistentAgent item in client.GetAgents()) +{ +} +]]> + + + +This sample shows how to call GetAgentsAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PersistentAgentsAdministrationClient client = new PersistentAgentsAdministrationClient(endpoint, credential); + +await foreach (BinaryData item in client.GetAgentsAsync(23, "asc", "ybuapkj", "yicprwkzcjbeirwuznafws", (RequestContext)null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("model").ToString()); + Console.WriteLine(result.GetProperty("instructions").ToString()); + Console.WriteLine(result.GetProperty("tools")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("tool_resources").ToString()); + Console.WriteLine(result.GetProperty("temperature").ToString()); + Console.WriteLine(result.GetProperty("top_p").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +} +]]> +This sample shows how to call GetAgentsAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PersistentAgentsAdministrationClient client = new PersistentAgentsAdministrationClient(endpoint, credential); + +await foreach (BinaryData item in client.GetAgentsAsync((int?)null, (string)null, (string)null, (string)null, (RequestContext)null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("model").ToString()); + Console.WriteLine(result.GetProperty("instructions").ToString()); + Console.WriteLine(result.GetProperty("tools")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("tool_resources").ToString()); + Console.WriteLine(result.GetProperty("temperature").ToString()); + Console.WriteLine(result.GetProperty("top_p").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +} +]]> + + + +This sample shows how to call GetAgents and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PersistentAgentsAdministrationClient client = new PersistentAgentsAdministrationClient(endpoint, credential); + +foreach (BinaryData item in client.GetAgents(23, "asc", "ybuapkj", "yicprwkzcjbeirwuznafws", (RequestContext)null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("model").ToString()); + Console.WriteLine(result.GetProperty("instructions").ToString()); + Console.WriteLine(result.GetProperty("tools")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("tool_resources").ToString()); + Console.WriteLine(result.GetProperty("temperature").ToString()); + Console.WriteLine(result.GetProperty("top_p").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +} +]]> +This sample shows how to call GetAgents and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PersistentAgentsAdministrationClient client = new PersistentAgentsAdministrationClient(endpoint, credential); + +foreach (BinaryData item in client.GetAgents((int?)null, (string)null, (string)null, (string)null, (RequestContext)null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("model").ToString()); + Console.WriteLine(result.GetProperty("instructions").ToString()); + Console.WriteLine(result.GetProperty("tools")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("tool_resources").ToString()); + Console.WriteLine(result.GetProperty("temperature").ToString()); + Console.WriteLine(result.GetProperty("top_p").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +} +]]> + + + \ No newline at end of file diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/Docs/PersistentAgentsFiles.xml b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/Docs/PersistentAgentsFiles.xml new file mode 100644 index 000000000000..36e7e3d36937 --- /dev/null +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/Docs/PersistentAgentsFiles.xml @@ -0,0 +1,201 @@ + + + + + +This sample shows how to call GetFileAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +PersistentAgentsFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetPersistentAgentsFilesClient(); + +Response response = await client.GetFileAsync("lsvyhecgodljeaavd"); +]]> +This sample shows how to call GetFileAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +PersistentAgentsFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetPersistentAgentsFilesClient(); + +Response response = await client.GetFileAsync("cpkshmceejnyuivzhyorchrl"); +]]> + + + +This sample shows how to call GetFile. +"); +TokenCredential credential = new DefaultAzureCredential(); +PersistentAgentsFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetPersistentAgentsFilesClient(); + +Response response = client.GetFile("lsvyhecgodljeaavd"); +]]> +This sample shows how to call GetFile. +"); +TokenCredential credential = new DefaultAzureCredential(); +PersistentAgentsFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetPersistentAgentsFilesClient(); + +Response response = client.GetFile("cpkshmceejnyuivzhyorchrl"); +]]> + + + +This sample shows how to call GetFileAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PersistentAgentsFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetPersistentAgentsFilesClient(); + +Response response = await client.GetFileAsync("lsvyhecgodljeaavd", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("bytes").ToString()); +Console.WriteLine(result.GetProperty("filename").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("purpose").ToString()); +]]> +This sample shows how to call GetFileAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PersistentAgentsFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetPersistentAgentsFilesClient(); + +Response response = await client.GetFileAsync("cpkshmceejnyuivzhyorchrl", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("bytes").ToString()); +Console.WriteLine(result.GetProperty("filename").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("purpose").ToString()); +]]> + + + +This sample shows how to call GetFile and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PersistentAgentsFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetPersistentAgentsFilesClient(); + +Response response = client.GetFile("lsvyhecgodljeaavd", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("bytes").ToString()); +Console.WriteLine(result.GetProperty("filename").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("purpose").ToString()); +]]> +This sample shows how to call GetFile and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PersistentAgentsFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetPersistentAgentsFilesClient(); + +Response response = client.GetFile("cpkshmceejnyuivzhyorchrl", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("bytes").ToString()); +Console.WriteLine(result.GetProperty("filename").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("purpose").ToString()); +]]> + + + +This sample shows how to call GetFileContentAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +PersistentAgentsFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetPersistentAgentsFilesClient(); + +Response response = await client.GetFileContentAsync("dfzstslvjtioavergjgq"); +]]> +This sample shows how to call GetFileContentAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +PersistentAgentsFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetPersistentAgentsFilesClient(); + +Response response = await client.GetFileContentAsync("jpzynxpsrccmo"); +]]> + + + +This sample shows how to call GetFileContent. +"); +TokenCredential credential = new DefaultAzureCredential(); +PersistentAgentsFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetPersistentAgentsFilesClient(); + +Response response = client.GetFileContent("dfzstslvjtioavergjgq"); +]]> +This sample shows how to call GetFileContent. +"); +TokenCredential credential = new DefaultAzureCredential(); +PersistentAgentsFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetPersistentAgentsFilesClient(); + +Response response = client.GetFileContent("jpzynxpsrccmo"); +]]> + + + +This sample shows how to call GetFileContentAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PersistentAgentsFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetPersistentAgentsFilesClient(); + +Response response = await client.GetFileContentAsync("dfzstslvjtioavergjgq", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetFileContentAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PersistentAgentsFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetPersistentAgentsFilesClient(); + +Response response = await client.GetFileContentAsync("jpzynxpsrccmo", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> + + + +This sample shows how to call GetFileContent and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PersistentAgentsFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetPersistentAgentsFilesClient(); + +Response response = client.GetFileContent("dfzstslvjtioavergjgq", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> +This sample shows how to call GetFileContent and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +PersistentAgentsFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetPersistentAgentsFilesClient(); + +Response response = client.GetFileContent("jpzynxpsrccmo", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.ToString()); +]]> + + + \ No newline at end of file diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/Docs/ThreadMessages.xml b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/Docs/ThreadMessages.xml new file mode 100644 index 000000000000..51874ff94880 --- /dev/null +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/Docs/ThreadMessages.xml @@ -0,0 +1,571 @@ + + + + + +This sample shows how to call CreateMessageAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadMessages client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadMessagesClient(); + +Response response = await client.CreateMessageAsync("zipaoiwxasiavnmlnkg", MessageRole.User, (BinaryData)null); +]]> + + + +This sample shows how to call CreateMessage. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadMessages client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadMessagesClient(); + +Response response = client.CreateMessage("zipaoiwxasiavnmlnkg", MessageRole.User, (BinaryData)null); +]]> + + + +This sample shows how to call CreateMessageAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadMessages client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadMessagesClient(); + +using RequestContent content = RequestContent.Create(new +{ + role = "user", + attachments = new object[] + { + new + { + file_id = "uslxhectlaptpkjcxnjzhkzprso", + data_source = new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + tools = Array.Empty(), + } + }, + metadata = new + { + key3153 = "qn", + }, +}); +Response response = await client.CreateMessageAsync("zipaoiwxasiavnmlnkg", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("thread_id").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("incomplete_details").GetProperty("reason").ToString()); +Console.WriteLine(result.GetProperty("completed_at").ToString()); +Console.WriteLine(result.GetProperty("incomplete_at").ToString()); +Console.WriteLine(result.GetProperty("role").ToString()); +Console.WriteLine(result.GetProperty("content")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("assistant_id").ToString()); +Console.WriteLine(result.GetProperty("run_id").ToString()); +Console.WriteLine(result.GetProperty("attachments")[0].GetProperty("tools")[0].ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +]]> + + + +This sample shows how to call CreateMessage and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadMessages client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadMessagesClient(); + +using RequestContent content = RequestContent.Create(new +{ + role = "user", + attachments = new object[] + { + new + { + file_id = "uslxhectlaptpkjcxnjzhkzprso", + data_source = new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + tools = Array.Empty(), + } + }, + metadata = new + { + key3153 = "qn", + }, +}); +Response response = client.CreateMessage("zipaoiwxasiavnmlnkg", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("thread_id").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("incomplete_details").GetProperty("reason").ToString()); +Console.WriteLine(result.GetProperty("completed_at").ToString()); +Console.WriteLine(result.GetProperty("incomplete_at").ToString()); +Console.WriteLine(result.GetProperty("role").ToString()); +Console.WriteLine(result.GetProperty("content")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("assistant_id").ToString()); +Console.WriteLine(result.GetProperty("run_id").ToString()); +Console.WriteLine(result.GetProperty("attachments")[0].GetProperty("tools")[0].ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +]]> + + + +This sample shows how to call GetMessageAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadMessages client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadMessagesClient(); + +Response response = await client.GetMessageAsync("wazfimispaosrwcw", "rntlkaswrsmq"); +]]> +This sample shows how to call GetMessageAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadMessages client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadMessagesClient(); + +Response response = await client.GetMessageAsync("gnhpgvsdkyugddnkifumj", "krpdbqetvarfbwcczwa"); +]]> + + + +This sample shows how to call GetMessage. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadMessages client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadMessagesClient(); + +Response response = client.GetMessage("wazfimispaosrwcw", "rntlkaswrsmq"); +]]> +This sample shows how to call GetMessage. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadMessages client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadMessagesClient(); + +Response response = client.GetMessage("gnhpgvsdkyugddnkifumj", "krpdbqetvarfbwcczwa"); +]]> + + + +This sample shows how to call GetMessageAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadMessages client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadMessagesClient(); + +Response response = await client.GetMessageAsync("wazfimispaosrwcw", "rntlkaswrsmq", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("thread_id").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("incomplete_details").GetProperty("reason").ToString()); +Console.WriteLine(result.GetProperty("completed_at").ToString()); +Console.WriteLine(result.GetProperty("incomplete_at").ToString()); +Console.WriteLine(result.GetProperty("role").ToString()); +Console.WriteLine(result.GetProperty("content")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("assistant_id").ToString()); +Console.WriteLine(result.GetProperty("run_id").ToString()); +Console.WriteLine(result.GetProperty("attachments")[0].GetProperty("tools")[0].ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +]]> +This sample shows how to call GetMessageAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadMessages client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadMessagesClient(); + +Response response = await client.GetMessageAsync("gnhpgvsdkyugddnkifumj", "krpdbqetvarfbwcczwa", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("thread_id").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("incomplete_details").GetProperty("reason").ToString()); +Console.WriteLine(result.GetProperty("completed_at").ToString()); +Console.WriteLine(result.GetProperty("incomplete_at").ToString()); +Console.WriteLine(result.GetProperty("role").ToString()); +Console.WriteLine(result.GetProperty("content")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("assistant_id").ToString()); +Console.WriteLine(result.GetProperty("run_id").ToString()); +Console.WriteLine(result.GetProperty("attachments")[0].GetProperty("tools")[0].ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +]]> + + + +This sample shows how to call GetMessage and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadMessages client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadMessagesClient(); + +Response response = client.GetMessage("wazfimispaosrwcw", "rntlkaswrsmq", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("thread_id").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("incomplete_details").GetProperty("reason").ToString()); +Console.WriteLine(result.GetProperty("completed_at").ToString()); +Console.WriteLine(result.GetProperty("incomplete_at").ToString()); +Console.WriteLine(result.GetProperty("role").ToString()); +Console.WriteLine(result.GetProperty("content")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("assistant_id").ToString()); +Console.WriteLine(result.GetProperty("run_id").ToString()); +Console.WriteLine(result.GetProperty("attachments")[0].GetProperty("tools")[0].ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +]]> +This sample shows how to call GetMessage and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadMessages client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadMessagesClient(); + +Response response = client.GetMessage("gnhpgvsdkyugddnkifumj", "krpdbqetvarfbwcczwa", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("thread_id").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("incomplete_details").GetProperty("reason").ToString()); +Console.WriteLine(result.GetProperty("completed_at").ToString()); +Console.WriteLine(result.GetProperty("incomplete_at").ToString()); +Console.WriteLine(result.GetProperty("role").ToString()); +Console.WriteLine(result.GetProperty("content")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("assistant_id").ToString()); +Console.WriteLine(result.GetProperty("run_id").ToString()); +Console.WriteLine(result.GetProperty("attachments")[0].GetProperty("tools")[0].ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +]]> + + + +This sample shows how to call UpdateMessageAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadMessages client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadMessagesClient(); + +Response response = await client.UpdateMessageAsync("sbdgvkmigm", "jjhbtcdqkx"); +]]> +This sample shows how to call UpdateMessageAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadMessages client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadMessagesClient(); + +Response response = await client.UpdateMessageAsync("houmkok", "dac"); +]]> + + + +This sample shows how to call UpdateMessage. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadMessages client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadMessagesClient(); + +Response response = client.UpdateMessage("sbdgvkmigm", "jjhbtcdqkx"); +]]> +This sample shows how to call UpdateMessage. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadMessages client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadMessagesClient(); + +Response response = client.UpdateMessage("houmkok", "dac"); +]]> + + + +This sample shows how to call UpdateMessageAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadMessages client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadMessagesClient(); + +using RequestContent content = RequestContent.Create(new +{ + metadata = new + { + key1225 = "spvnrxlujhmwk", + }, +}); +Response response = await client.UpdateMessageAsync("sbdgvkmigm", "jjhbtcdqkx", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("thread_id").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("incomplete_details").GetProperty("reason").ToString()); +Console.WriteLine(result.GetProperty("completed_at").ToString()); +Console.WriteLine(result.GetProperty("incomplete_at").ToString()); +Console.WriteLine(result.GetProperty("role").ToString()); +Console.WriteLine(result.GetProperty("content")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("assistant_id").ToString()); +Console.WriteLine(result.GetProperty("run_id").ToString()); +Console.WriteLine(result.GetProperty("attachments")[0].GetProperty("tools")[0].ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +]]> +This sample shows how to call UpdateMessageAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadMessages client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadMessagesClient(); + +using RequestContent content = RequestContent.Create(new object()); +Response response = await client.UpdateMessageAsync("houmkok", "dac", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("thread_id").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("incomplete_details").GetProperty("reason").ToString()); +Console.WriteLine(result.GetProperty("completed_at").ToString()); +Console.WriteLine(result.GetProperty("incomplete_at").ToString()); +Console.WriteLine(result.GetProperty("role").ToString()); +Console.WriteLine(result.GetProperty("content")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("assistant_id").ToString()); +Console.WriteLine(result.GetProperty("run_id").ToString()); +Console.WriteLine(result.GetProperty("attachments")[0].GetProperty("tools")[0].ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +]]> + + + +This sample shows how to call UpdateMessage and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadMessages client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadMessagesClient(); + +using RequestContent content = RequestContent.Create(new +{ + metadata = new + { + key1225 = "spvnrxlujhmwk", + }, +}); +Response response = client.UpdateMessage("sbdgvkmigm", "jjhbtcdqkx", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("thread_id").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("incomplete_details").GetProperty("reason").ToString()); +Console.WriteLine(result.GetProperty("completed_at").ToString()); +Console.WriteLine(result.GetProperty("incomplete_at").ToString()); +Console.WriteLine(result.GetProperty("role").ToString()); +Console.WriteLine(result.GetProperty("content")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("assistant_id").ToString()); +Console.WriteLine(result.GetProperty("run_id").ToString()); +Console.WriteLine(result.GetProperty("attachments")[0].GetProperty("tools")[0].ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +]]> +This sample shows how to call UpdateMessage and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadMessages client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadMessagesClient(); + +using RequestContent content = RequestContent.Create(new object()); +Response response = client.UpdateMessage("houmkok", "dac", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("thread_id").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("incomplete_details").GetProperty("reason").ToString()); +Console.WriteLine(result.GetProperty("completed_at").ToString()); +Console.WriteLine(result.GetProperty("incomplete_at").ToString()); +Console.WriteLine(result.GetProperty("role").ToString()); +Console.WriteLine(result.GetProperty("content")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("assistant_id").ToString()); +Console.WriteLine(result.GetProperty("run_id").ToString()); +Console.WriteLine(result.GetProperty("attachments")[0].GetProperty("tools")[0].ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +]]> + + + +This sample shows how to call GetMessagesAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadMessages client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadMessagesClient(); + +await foreach (PersistentThreadMessage item in client.GetMessagesAsync("rxigqqgnuzjqffpk")) +{ +} +]]> +This sample shows how to call GetMessagesAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadMessages client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadMessagesClient(); + +await foreach (PersistentThreadMessage item in client.GetMessagesAsync("fzxnlymcyzxdahitxdeoqcn")) +{ +} +]]> + + + +This sample shows how to call GetMessages. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadMessages client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadMessagesClient(); + +foreach (PersistentThreadMessage item in client.GetMessages("rxigqqgnuzjqffpk")) +{ +} +]]> +This sample shows how to call GetMessages. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadMessages client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadMessagesClient(); + +foreach (PersistentThreadMessage item in client.GetMessages("fzxnlymcyzxdahitxdeoqcn")) +{ +} +]]> + + + +This sample shows how to call GetMessagesAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadMessages client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadMessagesClient(); + +await foreach (BinaryData item in client.GetMessagesAsync("rxigqqgnuzjqffpk", "mtwpthaktboemc", 20, "asc", "prlgmgvf", "wbhklengvltnlzp", (RequestContext)null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("thread_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("incomplete_details").GetProperty("reason").ToString()); + Console.WriteLine(result.GetProperty("completed_at").ToString()); + Console.WriteLine(result.GetProperty("incomplete_at").ToString()); + Console.WriteLine(result.GetProperty("role").ToString()); + Console.WriteLine(result.GetProperty("content")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("assistant_id").ToString()); + Console.WriteLine(result.GetProperty("run_id").ToString()); + Console.WriteLine(result.GetProperty("attachments")[0].GetProperty("tools")[0].ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +} +]]> +This sample shows how to call GetMessagesAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadMessages client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadMessagesClient(); + +await foreach (BinaryData item in client.GetMessagesAsync("fzxnlymcyzxdahitxdeoqcn", (string)null, (int?)null, (string)null, (string)null, (string)null, (RequestContext)null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("thread_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("incomplete_details").GetProperty("reason").ToString()); + Console.WriteLine(result.GetProperty("completed_at").ToString()); + Console.WriteLine(result.GetProperty("incomplete_at").ToString()); + Console.WriteLine(result.GetProperty("role").ToString()); + Console.WriteLine(result.GetProperty("content")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("assistant_id").ToString()); + Console.WriteLine(result.GetProperty("run_id").ToString()); + Console.WriteLine(result.GetProperty("attachments")[0].GetProperty("tools")[0].ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +} +]]> + + + +This sample shows how to call GetMessages and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadMessages client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadMessagesClient(); + +foreach (BinaryData item in client.GetMessages("rxigqqgnuzjqffpk", "mtwpthaktboemc", 20, "asc", "prlgmgvf", "wbhklengvltnlzp", (RequestContext)null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("thread_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("incomplete_details").GetProperty("reason").ToString()); + Console.WriteLine(result.GetProperty("completed_at").ToString()); + Console.WriteLine(result.GetProperty("incomplete_at").ToString()); + Console.WriteLine(result.GetProperty("role").ToString()); + Console.WriteLine(result.GetProperty("content")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("assistant_id").ToString()); + Console.WriteLine(result.GetProperty("run_id").ToString()); + Console.WriteLine(result.GetProperty("attachments")[0].GetProperty("tools")[0].ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +} +]]> +This sample shows how to call GetMessages and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadMessages client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadMessagesClient(); + +foreach (BinaryData item in client.GetMessages("fzxnlymcyzxdahitxdeoqcn", (string)null, (int?)null, (string)null, (string)null, (string)null, (RequestContext)null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("thread_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("incomplete_details").GetProperty("reason").ToString()); + Console.WriteLine(result.GetProperty("completed_at").ToString()); + Console.WriteLine(result.GetProperty("incomplete_at").ToString()); + Console.WriteLine(result.GetProperty("role").ToString()); + Console.WriteLine(result.GetProperty("content")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("assistant_id").ToString()); + Console.WriteLine(result.GetProperty("run_id").ToString()); + Console.WriteLine(result.GetProperty("attachments")[0].GetProperty("tools")[0].ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +} +]]> + + + \ No newline at end of file diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/Docs/ThreadRunSteps.xml b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/Docs/ThreadRunSteps.xml new file mode 100644 index 000000000000..ce1bd6e21f1c --- /dev/null +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/Docs/ThreadRunSteps.xml @@ -0,0 +1,313 @@ + + + + + +This sample shows how to call GetRunStepAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadRunSteps client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunStepsClient(); + +Response response = await client.GetRunStepAsync("o", "gtmbdfovkwaxlpsn", "vbyblatygkybmhm"); +]]> +This sample shows how to call GetRunStepAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadRunSteps client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunStepsClient(); + +Response response = await client.GetRunStepAsync("vluit", "icivumwmgrcxgmpdzhtffb", "baweljsuxtvj"); +]]> + + + +This sample shows how to call GetRunStep. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadRunSteps client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunStepsClient(); + +Response response = client.GetRunStep("o", "gtmbdfovkwaxlpsn", "vbyblatygkybmhm"); +]]> +This sample shows how to call GetRunStep. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadRunSteps client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunStepsClient(); + +Response response = client.GetRunStep("vluit", "icivumwmgrcxgmpdzhtffb", "baweljsuxtvj"); +]]> + + + +This sample shows how to call GetRunStepAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadRunSteps client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunStepsClient(); + +Response response = await client.GetRunStepAsync("o", "gtmbdfovkwaxlpsn", "vbyblatygkybmhm", new RunAdditionalFieldList[] { RunAdditionalFieldList.FileSearchContents }, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("assistant_id").ToString()); +Console.WriteLine(result.GetProperty("thread_id").ToString()); +Console.WriteLine(result.GetProperty("run_id").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("step_details").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("expired_at").ToString()); +Console.WriteLine(result.GetProperty("completed_at").ToString()); +Console.WriteLine(result.GetProperty("cancelled_at").ToString()); +Console.WriteLine(result.GetProperty("failed_at").ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +]]> +This sample shows how to call GetRunStepAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadRunSteps client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunStepsClient(); + +Response response = await client.GetRunStepAsync("vluit", "icivumwmgrcxgmpdzhtffb", "baweljsuxtvj", null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("assistant_id").ToString()); +Console.WriteLine(result.GetProperty("thread_id").ToString()); +Console.WriteLine(result.GetProperty("run_id").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("step_details").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("expired_at").ToString()); +Console.WriteLine(result.GetProperty("completed_at").ToString()); +Console.WriteLine(result.GetProperty("cancelled_at").ToString()); +Console.WriteLine(result.GetProperty("failed_at").ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +]]> + + + +This sample shows how to call GetRunStep and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadRunSteps client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunStepsClient(); + +Response response = client.GetRunStep("o", "gtmbdfovkwaxlpsn", "vbyblatygkybmhm", new RunAdditionalFieldList[] { RunAdditionalFieldList.FileSearchContents }, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("assistant_id").ToString()); +Console.WriteLine(result.GetProperty("thread_id").ToString()); +Console.WriteLine(result.GetProperty("run_id").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("step_details").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("expired_at").ToString()); +Console.WriteLine(result.GetProperty("completed_at").ToString()); +Console.WriteLine(result.GetProperty("cancelled_at").ToString()); +Console.WriteLine(result.GetProperty("failed_at").ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +]]> +This sample shows how to call GetRunStep and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadRunSteps client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunStepsClient(); + +Response response = client.GetRunStep("vluit", "icivumwmgrcxgmpdzhtffb", "baweljsuxtvj", null, null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("assistant_id").ToString()); +Console.WriteLine(result.GetProperty("thread_id").ToString()); +Console.WriteLine(result.GetProperty("run_id").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("step_details").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("expired_at").ToString()); +Console.WriteLine(result.GetProperty("completed_at").ToString()); +Console.WriteLine(result.GetProperty("cancelled_at").ToString()); +Console.WriteLine(result.GetProperty("failed_at").ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +]]> + + + +This sample shows how to call GetRunStepsAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadRunSteps client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunStepsClient(); + +await foreach (RunStep item in client.GetRunStepsAsync("gjhbhgfoqzdgbmhpfzowgndoykr", "rwmtddbxjqdscrdq")) +{ +} +]]> +This sample shows how to call GetRunStepsAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadRunSteps client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunStepsClient(); + +await foreach (RunStep item in client.GetRunStepsAsync("tecrxeayzprgkvrmtsdxmnyq", "rx")) +{ +} +]]> + + + +This sample shows how to call GetRunSteps. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadRunSteps client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunStepsClient(); + +foreach (RunStep item in client.GetRunSteps("gjhbhgfoqzdgbmhpfzowgndoykr", "rwmtddbxjqdscrdq")) +{ +} +]]> +This sample shows how to call GetRunSteps. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadRunSteps client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunStepsClient(); + +foreach (RunStep item in client.GetRunSteps("tecrxeayzprgkvrmtsdxmnyq", "rx")) +{ +} +]]> + + + +This sample shows how to call GetRunStepsAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadRunSteps client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunStepsClient(); + +await foreach (BinaryData item in client.GetRunStepsAsync("gjhbhgfoqzdgbmhpfzowgndoykr", "rwmtddbxjqdscrdq", new RunAdditionalFieldList[] { RunAdditionalFieldList.FileSearchContents }, 15, "asc", "ptxb", "dxecoccswnru", (RequestContext)null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("assistant_id").ToString()); + Console.WriteLine(result.GetProperty("thread_id").ToString()); + Console.WriteLine(result.GetProperty("run_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("step_details").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("expired_at").ToString()); + Console.WriteLine(result.GetProperty("completed_at").ToString()); + Console.WriteLine(result.GetProperty("cancelled_at").ToString()); + Console.WriteLine(result.GetProperty("failed_at").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +} +]]> +This sample shows how to call GetRunStepsAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadRunSteps client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunStepsClient(); + +await foreach (BinaryData item in client.GetRunStepsAsync("tecrxeayzprgkvrmtsdxmnyq", "rx", (IEnumerable)null, (int?)null, (string)null, (string)null, (string)null, (RequestContext)null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("assistant_id").ToString()); + Console.WriteLine(result.GetProperty("thread_id").ToString()); + Console.WriteLine(result.GetProperty("run_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("step_details").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("expired_at").ToString()); + Console.WriteLine(result.GetProperty("completed_at").ToString()); + Console.WriteLine(result.GetProperty("cancelled_at").ToString()); + Console.WriteLine(result.GetProperty("failed_at").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +} +]]> + + + +This sample shows how to call GetRunSteps and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadRunSteps client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunStepsClient(); + +foreach (BinaryData item in client.GetRunSteps("gjhbhgfoqzdgbmhpfzowgndoykr", "rwmtddbxjqdscrdq", new RunAdditionalFieldList[] { RunAdditionalFieldList.FileSearchContents }, 15, "asc", "ptxb", "dxecoccswnru", (RequestContext)null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("assistant_id").ToString()); + Console.WriteLine(result.GetProperty("thread_id").ToString()); + Console.WriteLine(result.GetProperty("run_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("step_details").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("expired_at").ToString()); + Console.WriteLine(result.GetProperty("completed_at").ToString()); + Console.WriteLine(result.GetProperty("cancelled_at").ToString()); + Console.WriteLine(result.GetProperty("failed_at").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +} +]]> +This sample shows how to call GetRunSteps and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadRunSteps client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunStepsClient(); + +foreach (BinaryData item in client.GetRunSteps("tecrxeayzprgkvrmtsdxmnyq", "rx", (IEnumerable)null, (int?)null, (string)null, (string)null, (string)null, (RequestContext)null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("assistant_id").ToString()); + Console.WriteLine(result.GetProperty("thread_id").ToString()); + Console.WriteLine(result.GetProperty("run_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("step_details").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("expired_at").ToString()); + Console.WriteLine(result.GetProperty("completed_at").ToString()); + Console.WriteLine(result.GetProperty("cancelled_at").ToString()); + Console.WriteLine(result.GetProperty("failed_at").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +} +]]> + + + \ No newline at end of file diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/Docs/ThreadRuns.xml b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/Docs/ThreadRuns.xml new file mode 100644 index 000000000000..218031803df8 --- /dev/null +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/Docs/ThreadRuns.xml @@ -0,0 +1,769 @@ + + + + + +This sample shows how to call CreateRunAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadRuns client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunsClient(); + +Response response = await client.CreateRunAsync("hhkihlfdkkrjn", "jsgtmtrsdyptblawced"); +]]> + + + +This sample shows how to call CreateRun. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadRuns client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunsClient(); + +Response response = client.CreateRun("hhkihlfdkkrjn", "jsgtmtrsdyptblawced"); +]]> + + + +This sample shows how to call CreateRunAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadRuns client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunsClient(); + +using RequestContent content = RequestContent.Create(new +{ + assistant_id = "jsgtmtrsdyptblawced", + model = "yefdnxmqfpqutszahxptiqgatxohu", + instructions = "jdhepydeilwuqxwgxliiiekqdbt", + additional_instructions = "oyacdunpwfbtz", + additional_messages = new object[] + { + new + { + role = "user", + attachments = new object[] + { + new + { + file_id = "uslxhectlaptpkjcxnjzhkzprso", + data_source = new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + tools = Array.Empty(), + } + }, + metadata = new + { + key3153 = "qn", + }, + } + }, + tools = Array.Empty(), + stream = true, + temperature = 8F, + top_p = 3F, + max_prompt_tokens = 21, + max_completion_tokens = 12, + truncation_strategy = new + { + type = "auto", + last_messages = 6, + }, + parallel_tool_calls = true, + metadata = new + { + key5117 = "vfjqhklfxpyyojenxqnitzynwpqt", + }, +}); +Response response = await client.CreateRunAsync("hhkihlfdkkrjn", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("thread_id").ToString()); +Console.WriteLine(result.GetProperty("assistant_id").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("model").ToString()); +Console.WriteLine(result.GetProperty("instructions").ToString()); +Console.WriteLine(result.GetProperty("tools")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("expires_at").ToString()); +Console.WriteLine(result.GetProperty("started_at").ToString()); +Console.WriteLine(result.GetProperty("completed_at").ToString()); +Console.WriteLine(result.GetProperty("cancelled_at").ToString()); +Console.WriteLine(result.GetProperty("failed_at").ToString()); +Console.WriteLine(result.GetProperty("incomplete_details").GetProperty("reason").ToString()); +Console.WriteLine(result.GetProperty("usage").GetProperty("completion_tokens").ToString()); +Console.WriteLine(result.GetProperty("usage").GetProperty("prompt_tokens").ToString()); +Console.WriteLine(result.GetProperty("usage").GetProperty("total_tokens").ToString()); +Console.WriteLine(result.GetProperty("max_prompt_tokens").ToString()); +Console.WriteLine(result.GetProperty("max_completion_tokens").ToString()); +Console.WriteLine(result.GetProperty("truncation_strategy").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("tool_choice").ToString()); +Console.WriteLine(result.GetProperty("response_format").ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("parallel_tool_calls").ToString()); +]]> + + + +This sample shows how to call CreateRun and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadRuns client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunsClient(); + +using RequestContent content = RequestContent.Create(new +{ + assistant_id = "jsgtmtrsdyptblawced", + model = "yefdnxmqfpqutszahxptiqgatxohu", + instructions = "jdhepydeilwuqxwgxliiiekqdbt", + additional_instructions = "oyacdunpwfbtz", + additional_messages = new object[] + { + new + { + role = "user", + attachments = new object[] + { + new + { + file_id = "uslxhectlaptpkjcxnjzhkzprso", + data_source = new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + tools = Array.Empty(), + } + }, + metadata = new + { + key3153 = "qn", + }, + } + }, + tools = Array.Empty(), + stream = true, + temperature = 8F, + top_p = 3F, + max_prompt_tokens = 21, + max_completion_tokens = 12, + truncation_strategy = new + { + type = "auto", + last_messages = 6, + }, + parallel_tool_calls = true, + metadata = new + { + key5117 = "vfjqhklfxpyyojenxqnitzynwpqt", + }, +}); +Response response = client.CreateRun("hhkihlfdkkrjn", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("thread_id").ToString()); +Console.WriteLine(result.GetProperty("assistant_id").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("model").ToString()); +Console.WriteLine(result.GetProperty("instructions").ToString()); +Console.WriteLine(result.GetProperty("tools")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("expires_at").ToString()); +Console.WriteLine(result.GetProperty("started_at").ToString()); +Console.WriteLine(result.GetProperty("completed_at").ToString()); +Console.WriteLine(result.GetProperty("cancelled_at").ToString()); +Console.WriteLine(result.GetProperty("failed_at").ToString()); +Console.WriteLine(result.GetProperty("incomplete_details").GetProperty("reason").ToString()); +Console.WriteLine(result.GetProperty("usage").GetProperty("completion_tokens").ToString()); +Console.WriteLine(result.GetProperty("usage").GetProperty("prompt_tokens").ToString()); +Console.WriteLine(result.GetProperty("usage").GetProperty("total_tokens").ToString()); +Console.WriteLine(result.GetProperty("max_prompt_tokens").ToString()); +Console.WriteLine(result.GetProperty("max_completion_tokens").ToString()); +Console.WriteLine(result.GetProperty("truncation_strategy").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("tool_choice").ToString()); +Console.WriteLine(result.GetProperty("response_format").ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("parallel_tool_calls").ToString()); +]]> + + + +This sample shows how to call GetRunAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadRuns client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunsClient(); + +Response response = await client.GetRunAsync("sqccjmfw", "acsobiqvtzctqgmfilzbouk"); +]]> + + + +This sample shows how to call GetRun. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadRuns client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunsClient(); + +Response response = client.GetRun("sqccjmfw", "acsobiqvtzctqgmfilzbouk"); +]]> + + + +This sample shows how to call GetRunAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadRuns client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunsClient(); + +Response response = await client.GetRunAsync("sqccjmfw", "acsobiqvtzctqgmfilzbouk", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("thread_id").ToString()); +Console.WriteLine(result.GetProperty("assistant_id").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("model").ToString()); +Console.WriteLine(result.GetProperty("instructions").ToString()); +Console.WriteLine(result.GetProperty("tools")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("expires_at").ToString()); +Console.WriteLine(result.GetProperty("started_at").ToString()); +Console.WriteLine(result.GetProperty("completed_at").ToString()); +Console.WriteLine(result.GetProperty("cancelled_at").ToString()); +Console.WriteLine(result.GetProperty("failed_at").ToString()); +Console.WriteLine(result.GetProperty("incomplete_details").GetProperty("reason").ToString()); +Console.WriteLine(result.GetProperty("usage").GetProperty("completion_tokens").ToString()); +Console.WriteLine(result.GetProperty("usage").GetProperty("prompt_tokens").ToString()); +Console.WriteLine(result.GetProperty("usage").GetProperty("total_tokens").ToString()); +Console.WriteLine(result.GetProperty("max_prompt_tokens").ToString()); +Console.WriteLine(result.GetProperty("max_completion_tokens").ToString()); +Console.WriteLine(result.GetProperty("truncation_strategy").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("tool_choice").ToString()); +Console.WriteLine(result.GetProperty("response_format").ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("parallel_tool_calls").ToString()); +]]> + + + +This sample shows how to call GetRun and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadRuns client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunsClient(); + +Response response = client.GetRun("sqccjmfw", "acsobiqvtzctqgmfilzbouk", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("thread_id").ToString()); +Console.WriteLine(result.GetProperty("assistant_id").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("model").ToString()); +Console.WriteLine(result.GetProperty("instructions").ToString()); +Console.WriteLine(result.GetProperty("tools")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("expires_at").ToString()); +Console.WriteLine(result.GetProperty("started_at").ToString()); +Console.WriteLine(result.GetProperty("completed_at").ToString()); +Console.WriteLine(result.GetProperty("cancelled_at").ToString()); +Console.WriteLine(result.GetProperty("failed_at").ToString()); +Console.WriteLine(result.GetProperty("incomplete_details").GetProperty("reason").ToString()); +Console.WriteLine(result.GetProperty("usage").GetProperty("completion_tokens").ToString()); +Console.WriteLine(result.GetProperty("usage").GetProperty("prompt_tokens").ToString()); +Console.WriteLine(result.GetProperty("usage").GetProperty("total_tokens").ToString()); +Console.WriteLine(result.GetProperty("max_prompt_tokens").ToString()); +Console.WriteLine(result.GetProperty("max_completion_tokens").ToString()); +Console.WriteLine(result.GetProperty("truncation_strategy").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("tool_choice").ToString()); +Console.WriteLine(result.GetProperty("response_format").ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("parallel_tool_calls").ToString()); +]]> + + + +This sample shows how to call UpdateRunAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadRuns client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunsClient(); + +Response response = await client.UpdateRunAsync("wnookprnxkufoddul", "aifrevvhqlpbxsdkflwkzpdlyewggr"); +]]> + + + +This sample shows how to call UpdateRun. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadRuns client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunsClient(); + +Response response = client.UpdateRun("wnookprnxkufoddul", "aifrevvhqlpbxsdkflwkzpdlyewggr"); +]]> + + + +This sample shows how to call UpdateRunAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadRuns client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunsClient(); + +using RequestContent content = RequestContent.Create(new +{ + metadata = new + { + key5657 = "pzozpdyzydhspttzavjorh", + }, +}); +Response response = await client.UpdateRunAsync("wnookprnxkufoddul", "aifrevvhqlpbxsdkflwkzpdlyewggr", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("thread_id").ToString()); +Console.WriteLine(result.GetProperty("assistant_id").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("model").ToString()); +Console.WriteLine(result.GetProperty("instructions").ToString()); +Console.WriteLine(result.GetProperty("tools")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("expires_at").ToString()); +Console.WriteLine(result.GetProperty("started_at").ToString()); +Console.WriteLine(result.GetProperty("completed_at").ToString()); +Console.WriteLine(result.GetProperty("cancelled_at").ToString()); +Console.WriteLine(result.GetProperty("failed_at").ToString()); +Console.WriteLine(result.GetProperty("incomplete_details").GetProperty("reason").ToString()); +Console.WriteLine(result.GetProperty("usage").GetProperty("completion_tokens").ToString()); +Console.WriteLine(result.GetProperty("usage").GetProperty("prompt_tokens").ToString()); +Console.WriteLine(result.GetProperty("usage").GetProperty("total_tokens").ToString()); +Console.WriteLine(result.GetProperty("max_prompt_tokens").ToString()); +Console.WriteLine(result.GetProperty("max_completion_tokens").ToString()); +Console.WriteLine(result.GetProperty("truncation_strategy").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("tool_choice").ToString()); +Console.WriteLine(result.GetProperty("response_format").ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("parallel_tool_calls").ToString()); +]]> + + + +This sample shows how to call UpdateRun and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadRuns client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunsClient(); + +using RequestContent content = RequestContent.Create(new +{ + metadata = new + { + key5657 = "pzozpdyzydhspttzavjorh", + }, +}); +Response response = client.UpdateRun("wnookprnxkufoddul", "aifrevvhqlpbxsdkflwkzpdlyewggr", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("thread_id").ToString()); +Console.WriteLine(result.GetProperty("assistant_id").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("model").ToString()); +Console.WriteLine(result.GetProperty("instructions").ToString()); +Console.WriteLine(result.GetProperty("tools")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("expires_at").ToString()); +Console.WriteLine(result.GetProperty("started_at").ToString()); +Console.WriteLine(result.GetProperty("completed_at").ToString()); +Console.WriteLine(result.GetProperty("cancelled_at").ToString()); +Console.WriteLine(result.GetProperty("failed_at").ToString()); +Console.WriteLine(result.GetProperty("incomplete_details").GetProperty("reason").ToString()); +Console.WriteLine(result.GetProperty("usage").GetProperty("completion_tokens").ToString()); +Console.WriteLine(result.GetProperty("usage").GetProperty("prompt_tokens").ToString()); +Console.WriteLine(result.GetProperty("usage").GetProperty("total_tokens").ToString()); +Console.WriteLine(result.GetProperty("max_prompt_tokens").ToString()); +Console.WriteLine(result.GetProperty("max_completion_tokens").ToString()); +Console.WriteLine(result.GetProperty("truncation_strategy").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("tool_choice").ToString()); +Console.WriteLine(result.GetProperty("response_format").ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("parallel_tool_calls").ToString()); +]]> + + + +This sample shows how to call SubmitToolOutputsToRunAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadRuns client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunsClient(); + +Response response = await client.SubmitToolOutputsToRunAsync("fponkaqg", "qt", new ToolOutput[] +{ + new ToolOutput + { + ToolCallId = "jccizgl", + Output = "tfpajqwuaghahhyzmn", + } +}); +]]> + + + +This sample shows how to call SubmitToolOutputsToRun. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadRuns client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunsClient(); + +Response response = client.SubmitToolOutputsToRun("fponkaqg", "qt", new ToolOutput[] +{ + new ToolOutput + { + ToolCallId = "jccizgl", + Output = "tfpajqwuaghahhyzmn", + } +}); +]]> + + + +This sample shows how to call SubmitToolOutputsToRunAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadRuns client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunsClient(); + +using RequestContent content = RequestContent.Create(new +{ + tool_outputs = new object[] + { + new + { + tool_call_id = "jccizgl", + output = "tfpajqwuaghahhyzmn", + } + }, + stream = true, +}); +Response response = await client.SubmitToolOutputsToRunAsync("fponkaqg", "qt", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("thread_id").ToString()); +Console.WriteLine(result.GetProperty("assistant_id").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("model").ToString()); +Console.WriteLine(result.GetProperty("instructions").ToString()); +Console.WriteLine(result.GetProperty("tools")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("expires_at").ToString()); +Console.WriteLine(result.GetProperty("started_at").ToString()); +Console.WriteLine(result.GetProperty("completed_at").ToString()); +Console.WriteLine(result.GetProperty("cancelled_at").ToString()); +Console.WriteLine(result.GetProperty("failed_at").ToString()); +Console.WriteLine(result.GetProperty("incomplete_details").GetProperty("reason").ToString()); +Console.WriteLine(result.GetProperty("usage").GetProperty("completion_tokens").ToString()); +Console.WriteLine(result.GetProperty("usage").GetProperty("prompt_tokens").ToString()); +Console.WriteLine(result.GetProperty("usage").GetProperty("total_tokens").ToString()); +Console.WriteLine(result.GetProperty("max_prompt_tokens").ToString()); +Console.WriteLine(result.GetProperty("max_completion_tokens").ToString()); +Console.WriteLine(result.GetProperty("truncation_strategy").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("tool_choice").ToString()); +Console.WriteLine(result.GetProperty("response_format").ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("parallel_tool_calls").ToString()); +]]> + + + +This sample shows how to call SubmitToolOutputsToRun and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadRuns client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunsClient(); + +using RequestContent content = RequestContent.Create(new +{ + tool_outputs = new object[] + { + new + { + tool_call_id = "jccizgl", + output = "tfpajqwuaghahhyzmn", + } + }, + stream = true, +}); +Response response = client.SubmitToolOutputsToRun("fponkaqg", "qt", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("thread_id").ToString()); +Console.WriteLine(result.GetProperty("assistant_id").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("model").ToString()); +Console.WriteLine(result.GetProperty("instructions").ToString()); +Console.WriteLine(result.GetProperty("tools")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("expires_at").ToString()); +Console.WriteLine(result.GetProperty("started_at").ToString()); +Console.WriteLine(result.GetProperty("completed_at").ToString()); +Console.WriteLine(result.GetProperty("cancelled_at").ToString()); +Console.WriteLine(result.GetProperty("failed_at").ToString()); +Console.WriteLine(result.GetProperty("incomplete_details").GetProperty("reason").ToString()); +Console.WriteLine(result.GetProperty("usage").GetProperty("completion_tokens").ToString()); +Console.WriteLine(result.GetProperty("usage").GetProperty("prompt_tokens").ToString()); +Console.WriteLine(result.GetProperty("usage").GetProperty("total_tokens").ToString()); +Console.WriteLine(result.GetProperty("max_prompt_tokens").ToString()); +Console.WriteLine(result.GetProperty("max_completion_tokens").ToString()); +Console.WriteLine(result.GetProperty("truncation_strategy").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("tool_choice").ToString()); +Console.WriteLine(result.GetProperty("response_format").ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("parallel_tool_calls").ToString()); +]]> + + + +This sample shows how to call CancelRunAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadRuns client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunsClient(); + +Response response = await client.CancelRunAsync("cfgrrkaqlomzywojd", "dgpclan"); +]]> + + + +This sample shows how to call CancelRun. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadRuns client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunsClient(); + +Response response = client.CancelRun("cfgrrkaqlomzywojd", "dgpclan"); +]]> + + + +This sample shows how to call CancelRunAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadRuns client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunsClient(); + +Response response = await client.CancelRunAsync("cfgrrkaqlomzywojd", "dgpclan", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("thread_id").ToString()); +Console.WriteLine(result.GetProperty("assistant_id").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("model").ToString()); +Console.WriteLine(result.GetProperty("instructions").ToString()); +Console.WriteLine(result.GetProperty("tools")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("expires_at").ToString()); +Console.WriteLine(result.GetProperty("started_at").ToString()); +Console.WriteLine(result.GetProperty("completed_at").ToString()); +Console.WriteLine(result.GetProperty("cancelled_at").ToString()); +Console.WriteLine(result.GetProperty("failed_at").ToString()); +Console.WriteLine(result.GetProperty("incomplete_details").GetProperty("reason").ToString()); +Console.WriteLine(result.GetProperty("usage").GetProperty("completion_tokens").ToString()); +Console.WriteLine(result.GetProperty("usage").GetProperty("prompt_tokens").ToString()); +Console.WriteLine(result.GetProperty("usage").GetProperty("total_tokens").ToString()); +Console.WriteLine(result.GetProperty("max_prompt_tokens").ToString()); +Console.WriteLine(result.GetProperty("max_completion_tokens").ToString()); +Console.WriteLine(result.GetProperty("truncation_strategy").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("tool_choice").ToString()); +Console.WriteLine(result.GetProperty("response_format").ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("parallel_tool_calls").ToString()); +]]> + + + +This sample shows how to call CancelRun and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadRuns client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunsClient(); + +Response response = client.CancelRun("cfgrrkaqlomzywojd", "dgpclan", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("thread_id").ToString()); +Console.WriteLine(result.GetProperty("assistant_id").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("model").ToString()); +Console.WriteLine(result.GetProperty("instructions").ToString()); +Console.WriteLine(result.GetProperty("tools")[0].GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("expires_at").ToString()); +Console.WriteLine(result.GetProperty("started_at").ToString()); +Console.WriteLine(result.GetProperty("completed_at").ToString()); +Console.WriteLine(result.GetProperty("cancelled_at").ToString()); +Console.WriteLine(result.GetProperty("failed_at").ToString()); +Console.WriteLine(result.GetProperty("incomplete_details").GetProperty("reason").ToString()); +Console.WriteLine(result.GetProperty("usage").GetProperty("completion_tokens").ToString()); +Console.WriteLine(result.GetProperty("usage").GetProperty("prompt_tokens").ToString()); +Console.WriteLine(result.GetProperty("usage").GetProperty("total_tokens").ToString()); +Console.WriteLine(result.GetProperty("max_prompt_tokens").ToString()); +Console.WriteLine(result.GetProperty("max_completion_tokens").ToString()); +Console.WriteLine(result.GetProperty("truncation_strategy").GetProperty("type").ToString()); +Console.WriteLine(result.GetProperty("tool_choice").ToString()); +Console.WriteLine(result.GetProperty("response_format").ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +Console.WriteLine(result.GetProperty("parallel_tool_calls").ToString()); +]]> + + + +This sample shows how to call GetRunsAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadRuns client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunsClient(); + +await foreach (ThreadRun item in client.GetRunsAsync("luhcnx")) +{ +} +]]> + + + +This sample shows how to call GetRuns. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadRuns client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunsClient(); + +foreach (ThreadRun item in client.GetRuns("luhcnx")) +{ +} +]]> + + + +This sample shows how to call GetRunsAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadRuns client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunsClient(); + +await foreach (BinaryData item in client.GetRunsAsync("luhcnx", 29, "asc", "lbxjqlfasgdfb", "ukgtkdgvuzzjlnjjdxotjvgw", (RequestContext)null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("thread_id").ToString()); + Console.WriteLine(result.GetProperty("assistant_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("model").ToString()); + Console.WriteLine(result.GetProperty("instructions").ToString()); + Console.WriteLine(result.GetProperty("tools")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("expires_at").ToString()); + Console.WriteLine(result.GetProperty("started_at").ToString()); + Console.WriteLine(result.GetProperty("completed_at").ToString()); + Console.WriteLine(result.GetProperty("cancelled_at").ToString()); + Console.WriteLine(result.GetProperty("failed_at").ToString()); + Console.WriteLine(result.GetProperty("incomplete_details").GetProperty("reason").ToString()); + Console.WriteLine(result.GetProperty("usage").GetProperty("completion_tokens").ToString()); + Console.WriteLine(result.GetProperty("usage").GetProperty("prompt_tokens").ToString()); + Console.WriteLine(result.GetProperty("usage").GetProperty("total_tokens").ToString()); + Console.WriteLine(result.GetProperty("max_prompt_tokens").ToString()); + Console.WriteLine(result.GetProperty("max_completion_tokens").ToString()); + Console.WriteLine(result.GetProperty("truncation_strategy").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("tool_choice").ToString()); + Console.WriteLine(result.GetProperty("response_format").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("parallel_tool_calls").ToString()); +} +]]> + + + +This sample shows how to call GetRuns and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +ThreadRuns client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunsClient(); + +foreach (BinaryData item in client.GetRuns("luhcnx", 29, "asc", "lbxjqlfasgdfb", "ukgtkdgvuzzjlnjjdxotjvgw", (RequestContext)null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("thread_id").ToString()); + Console.WriteLine(result.GetProperty("assistant_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("model").ToString()); + Console.WriteLine(result.GetProperty("instructions").ToString()); + Console.WriteLine(result.GetProperty("tools")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("expires_at").ToString()); + Console.WriteLine(result.GetProperty("started_at").ToString()); + Console.WriteLine(result.GetProperty("completed_at").ToString()); + Console.WriteLine(result.GetProperty("cancelled_at").ToString()); + Console.WriteLine(result.GetProperty("failed_at").ToString()); + Console.WriteLine(result.GetProperty("incomplete_details").GetProperty("reason").ToString()); + Console.WriteLine(result.GetProperty("usage").GetProperty("completion_tokens").ToString()); + Console.WriteLine(result.GetProperty("usage").GetProperty("prompt_tokens").ToString()); + Console.WriteLine(result.GetProperty("usage").GetProperty("total_tokens").ToString()); + Console.WriteLine(result.GetProperty("max_prompt_tokens").ToString()); + Console.WriteLine(result.GetProperty("max_completion_tokens").ToString()); + Console.WriteLine(result.GetProperty("truncation_strategy").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("tool_choice").ToString()); + Console.WriteLine(result.GetProperty("response_format").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("parallel_tool_calls").ToString()); +} +]]> + + + \ No newline at end of file diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/Docs/Threads.xml b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/Docs/Threads.xml new file mode 100644 index 000000000000..2cc21ce7d0e7 --- /dev/null +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/Docs/Threads.xml @@ -0,0 +1,917 @@ + + + + + +This sample shows how to call CreateThreadAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Threads client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadsClient(); + +Response response = await client.CreateThreadAsync(); +]]> + + + +This sample shows how to call CreateThread. +"); +TokenCredential credential = new DefaultAzureCredential(); +Threads client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadsClient(); + +Response response = client.CreateThread(); +]]> + + + +This sample shows how to call CreateThreadAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Threads client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadsClient(); + +using RequestContent content = RequestContent.Create(new +{ + messages = new object[] + { + new + { + role = "user", + attachments = new object[] + { + new + { + file_id = "uslxhectlaptpkjcxnjzhkzprso", + data_source = new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + tools = Array.Empty(), + } + }, + metadata = new + { + key3153 = "qn", + }, + } + }, + tool_resources = new + { + code_interpreter = new + { + file_ids = new object[] + { + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul" + }, + data_sources = new object[] + { + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + } + }, + }, + file_search = new + { + vector_store_ids = new object[] + { + "jkrrjfupyxehwacylflmx" + }, + vector_stores = new object[] + { + new + { + name = "bftl", + configuration = new + { + data_sources = new object[] + { + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + } + }, + }, + } + }, + }, + azure_ai_search = new + { + indexes = new object[] + { + new + { + index_connection_id = "zkqk", + index_name = "yvxhjyiomlffkuboqokcojfd", + query_type = "simple", + top_k = 27, + filter = "jjbewpsjmygox", + index_asset_id = "iwfmzmxzh", + } + }, + }, + }, + metadata = new + { + key3592 = "ceowgmecukwwpkdpcolnctahhocsk", + }, +}); +Response response = await client.CreateThreadAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("tool_resources").ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +]]> + + + +This sample shows how to call CreateThread and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Threads client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadsClient(); + +using RequestContent content = RequestContent.Create(new +{ + messages = new object[] + { + new + { + role = "user", + attachments = new object[] + { + new + { + file_id = "uslxhectlaptpkjcxnjzhkzprso", + data_source = new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + tools = Array.Empty(), + } + }, + metadata = new + { + key3153 = "qn", + }, + } + }, + tool_resources = new + { + code_interpreter = new + { + file_ids = new object[] + { + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul" + }, + data_sources = new object[] + { + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + } + }, + }, + file_search = new + { + vector_store_ids = new object[] + { + "jkrrjfupyxehwacylflmx" + }, + vector_stores = new object[] + { + new + { + name = "bftl", + configuration = new + { + data_sources = new object[] + { + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + } + }, + }, + } + }, + }, + azure_ai_search = new + { + indexes = new object[] + { + new + { + index_connection_id = "zkqk", + index_name = "yvxhjyiomlffkuboqokcojfd", + query_type = "simple", + top_k = 27, + filter = "jjbewpsjmygox", + index_asset_id = "iwfmzmxzh", + } + }, + }, + }, + metadata = new + { + key3592 = "ceowgmecukwwpkdpcolnctahhocsk", + }, +}); +Response response = client.CreateThread(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("tool_resources").ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +]]> + + + +This sample shows how to call GetThreadAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Threads client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadsClient(); + +Response response = await client.GetThreadAsync("hxzrocmui"); +]]> +This sample shows how to call GetThreadAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Threads client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadsClient(); + +Response response = await client.GetThreadAsync("rhseczbsktxawm"); +]]> + + + +This sample shows how to call GetThread. +"); +TokenCredential credential = new DefaultAzureCredential(); +Threads client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadsClient(); + +Response response = client.GetThread("hxzrocmui"); +]]> +This sample shows how to call GetThread. +"); +TokenCredential credential = new DefaultAzureCredential(); +Threads client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadsClient(); + +Response response = client.GetThread("rhseczbsktxawm"); +]]> + + + +This sample shows how to call GetThreadAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Threads client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadsClient(); + +Response response = await client.GetThreadAsync("hxzrocmui", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("tool_resources").ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +]]> +This sample shows how to call GetThreadAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Threads client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadsClient(); + +Response response = await client.GetThreadAsync("rhseczbsktxawm", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("tool_resources").ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +]]> + + + +This sample shows how to call GetThread and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Threads client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadsClient(); + +Response response = client.GetThread("hxzrocmui", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("tool_resources").ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +]]> +This sample shows how to call GetThread and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Threads client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadsClient(); + +Response response = client.GetThread("rhseczbsktxawm", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("tool_resources").ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +]]> + + + +This sample shows how to call UpdateThreadAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Threads client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadsClient(); + +Response response = await client.UpdateThreadAsync("rsiw"); +]]> +This sample shows how to call UpdateThreadAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Threads client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadsClient(); + +Response response = await client.UpdateThreadAsync("rsiw"); +]]> + + + +This sample shows how to call UpdateThread. +"); +TokenCredential credential = new DefaultAzureCredential(); +Threads client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadsClient(); + +Response response = client.UpdateThread("rsiw"); +]]> +This sample shows how to call UpdateThread. +"); +TokenCredential credential = new DefaultAzureCredential(); +Threads client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadsClient(); + +Response response = client.UpdateThread("rsiw"); +]]> + + + +This sample shows how to call UpdateThreadAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Threads client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadsClient(); + +using RequestContent content = RequestContent.Create(new +{ + tool_resources = new + { + code_interpreter = new + { + file_ids = new object[] + { + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul" + }, + data_sources = new object[] + { + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + } + }, + }, + file_search = new + { + vector_store_ids = new object[] + { + "jkrrjfupyxehwacylflmx" + }, + vector_stores = new object[] + { + new + { + name = "bftl", + configuration = new + { + data_sources = new object[] + { + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + } + }, + }, + } + }, + }, + azure_ai_search = new + { + indexes = new object[] + { + new + { + index_connection_id = "zkqk", + index_name = "yvxhjyiomlffkuboqokcojfd", + query_type = "simple", + top_k = 27, + filter = "jjbewpsjmygox", + index_asset_id = "iwfmzmxzh", + } + }, + }, + }, + metadata = new + { + key519 = "wfrlgjrbfxnwuz", + }, +}); +Response response = await client.UpdateThreadAsync("rsiw", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("tool_resources").ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +]]> +This sample shows how to call UpdateThreadAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Threads client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadsClient(); + +using RequestContent content = RequestContent.Create(new object()); +Response response = await client.UpdateThreadAsync("rsiw", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("tool_resources").ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +]]> + + + +This sample shows how to call UpdateThread and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Threads client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadsClient(); + +using RequestContent content = RequestContent.Create(new +{ + tool_resources = new + { + code_interpreter = new + { + file_ids = new object[] + { + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul", + "nfbbvmtttxtmwzmjtkzhgul" + }, + data_sources = new object[] + { + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + } + }, + }, + file_search = new + { + vector_store_ids = new object[] + { + "jkrrjfupyxehwacylflmx" + }, + vector_stores = new object[] + { + new + { + name = "bftl", + configuration = new + { + data_sources = new object[] + { + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + } + }, + }, + } + }, + }, + azure_ai_search = new + { + indexes = new object[] + { + new + { + index_connection_id = "zkqk", + index_name = "yvxhjyiomlffkuboqokcojfd", + query_type = "simple", + top_k = 27, + filter = "jjbewpsjmygox", + index_asset_id = "iwfmzmxzh", + } + }, + }, + }, + metadata = new + { + key519 = "wfrlgjrbfxnwuz", + }, +}); +Response response = client.UpdateThread("rsiw", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("tool_resources").ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +]]> +This sample shows how to call UpdateThread and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Threads client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadsClient(); + +using RequestContent content = RequestContent.Create(new object()); +Response response = client.UpdateThread("rsiw", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("tool_resources").ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +]]> + + + +This sample shows how to call GetThreadsAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Threads client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadsClient(); + +await foreach (PersistentAgentThread item in client.GetThreadsAsync()) +{ +} +]]> +This sample shows how to call GetThreadsAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +Threads client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadsClient(); + +await foreach (PersistentAgentThread item in client.GetThreadsAsync()) +{ +} +]]> + + + +This sample shows how to call GetThreads. +"); +TokenCredential credential = new DefaultAzureCredential(); +Threads client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadsClient(); + +foreach (PersistentAgentThread item in client.GetThreads()) +{ +} +]]> +This sample shows how to call GetThreads. +"); +TokenCredential credential = new DefaultAzureCredential(); +Threads client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadsClient(); + +foreach (PersistentAgentThread item in client.GetThreads()) +{ +} +]]> + + + +This sample shows how to call GetThreadsAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Threads client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadsClient(); + +await foreach (BinaryData item in client.GetThreadsAsync(13, "asc", "qwsovpslduftmfinaxtskq", "ycnypgacaospvdmaffiwipymykd", (RequestContext)null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("tool_resources").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +} +]]> +This sample shows how to call GetThreadsAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Threads client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadsClient(); + +await foreach (BinaryData item in client.GetThreadsAsync((int?)null, (string)null, (string)null, (string)null, (RequestContext)null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("tool_resources").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +} +]]> + + + +This sample shows how to call GetThreads and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Threads client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadsClient(); + +foreach (BinaryData item in client.GetThreads(13, "asc", "qwsovpslduftmfinaxtskq", "ycnypgacaospvdmaffiwipymykd", (RequestContext)null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("tool_resources").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +} +]]> +This sample shows how to call GetThreads and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +Threads client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadsClient(); + +foreach (BinaryData item in client.GetThreads((int?)null, (string)null, (string)null, (string)null, (RequestContext)null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("tool_resources").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +} +]]> + + + \ No newline at end of file diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/Docs/VectorStoreFileBatches.xml b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/Docs/VectorStoreFileBatches.xml new file mode 100644 index 000000000000..332c19e02c2a --- /dev/null +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/Docs/VectorStoreFileBatches.xml @@ -0,0 +1,4245 @@ + + + + + +This sample shows how to call CreateVectorStoreFileBatchAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStoreFileBatches client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFileBatchesClient(); + +Response response = await client.CreateVectorStoreFileBatchAsync("bvcjtemrnqtycjuaerlxllednm"); +]]> +This sample shows how to call CreateVectorStoreFileBatchAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStoreFileBatches client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFileBatchesClient(); + +Response response = await client.CreateVectorStoreFileBatchAsync("eyxdrn"); +]]> + + + +This sample shows how to call CreateVectorStoreFileBatch. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStoreFileBatches client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFileBatchesClient(); + +Response response = client.CreateVectorStoreFileBatch("bvcjtemrnqtycjuaerlxllednm"); +]]> +This sample shows how to call CreateVectorStoreFileBatch. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStoreFileBatches client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFileBatchesClient(); + +Response response = client.CreateVectorStoreFileBatch("eyxdrn"); +]]> + + + +This sample shows how to call CreateVectorStoreFileBatchAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStoreFileBatches client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFileBatchesClient(); + +using RequestContent content = RequestContent.Create(new +{ + file_ids = new object[] + { + "sseovtmhsfpghlqyzulhnhhhasall", + "sseovtmhsfpghlqyzulhnhhhasall", + "sseovtmhsfpghlqyzulhnhhhasall", + "sseovtmhsfpghlqyzulhnhhhasall", + "sseovtmhsfpghlqyzulhnhhhasall", + "sseovtmhsfpghlqyzulhnhhhasall", + "sseovtmhsfpghlqyzulhnhhhasall", + "sseovtmhsfpghlqyzulhnhhhasall" + }, + data_sources = new object[] + { + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + } + }, +}); +Response response = await client.CreateVectorStoreFileBatchAsync("bvcjtemrnqtycjuaerlxllednm", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("vector_store_id").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("in_progress").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("completed").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("failed").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("cancelled").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("total").ToString()); +]]> +This sample shows how to call CreateVectorStoreFileBatchAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStoreFileBatches client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFileBatchesClient(); + +using RequestContent content = RequestContent.Create(new object()); +Response response = await client.CreateVectorStoreFileBatchAsync("eyxdrn", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("vector_store_id").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("in_progress").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("completed").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("failed").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("cancelled").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("total").ToString()); +]]> + + + +This sample shows how to call CreateVectorStoreFileBatch and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStoreFileBatches client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFileBatchesClient(); + +using RequestContent content = RequestContent.Create(new +{ + file_ids = new object[] + { + "sseovtmhsfpghlqyzulhnhhhasall", + "sseovtmhsfpghlqyzulhnhhhasall", + "sseovtmhsfpghlqyzulhnhhhasall", + "sseovtmhsfpghlqyzulhnhhhasall", + "sseovtmhsfpghlqyzulhnhhhasall", + "sseovtmhsfpghlqyzulhnhhhasall", + "sseovtmhsfpghlqyzulhnhhhasall", + "sseovtmhsfpghlqyzulhnhhhasall" + }, + data_sources = new object[] + { + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + } + }, +}); +Response response = client.CreateVectorStoreFileBatch("bvcjtemrnqtycjuaerlxllednm", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("vector_store_id").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("in_progress").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("completed").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("failed").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("cancelled").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("total").ToString()); +]]> +This sample shows how to call CreateVectorStoreFileBatch and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStoreFileBatches client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFileBatchesClient(); + +using RequestContent content = RequestContent.Create(new object()); +Response response = client.CreateVectorStoreFileBatch("eyxdrn", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("vector_store_id").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("in_progress").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("completed").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("failed").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("cancelled").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("total").ToString()); +]]> + + + +This sample shows how to call GetVectorStoreFileBatchAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStoreFileBatches client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFileBatchesClient(); + +Response response = await client.GetVectorStoreFileBatchAsync("kdcqszoqvfaipuhvijnwxmegovmeuv", "juytv"); +]]> +This sample shows how to call GetVectorStoreFileBatchAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStoreFileBatches client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFileBatchesClient(); + +Response response = await client.GetVectorStoreFileBatchAsync("kz", "pmzxfueg"); +]]> + + + +This sample shows how to call GetVectorStoreFileBatch. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStoreFileBatches client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFileBatchesClient(); + +Response response = client.GetVectorStoreFileBatch("kdcqszoqvfaipuhvijnwxmegovmeuv", "juytv"); +]]> +This sample shows how to call GetVectorStoreFileBatch. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStoreFileBatches client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFileBatchesClient(); + +Response response = client.GetVectorStoreFileBatch("kz", "pmzxfueg"); +]]> + + + +This sample shows how to call GetVectorStoreFileBatchAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStoreFileBatches client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFileBatchesClient(); + +Response response = await client.GetVectorStoreFileBatchAsync("kdcqszoqvfaipuhvijnwxmegovmeuv", "juytv", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("vector_store_id").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("in_progress").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("completed").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("failed").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("cancelled").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("total").ToString()); +]]> +This sample shows how to call GetVectorStoreFileBatchAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStoreFileBatches client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFileBatchesClient(); + +Response response = await client.GetVectorStoreFileBatchAsync("kz", "pmzxfueg", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("vector_store_id").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("in_progress").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("completed").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("failed").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("cancelled").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("total").ToString()); +]]> + + + +This sample shows how to call GetVectorStoreFileBatch and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStoreFileBatches client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFileBatchesClient(); + +Response response = client.GetVectorStoreFileBatch("kdcqszoqvfaipuhvijnwxmegovmeuv", "juytv", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("vector_store_id").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("in_progress").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("completed").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("failed").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("cancelled").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("total").ToString()); +]]> +This sample shows how to call GetVectorStoreFileBatch and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStoreFileBatches client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFileBatchesClient(); + +Response response = client.GetVectorStoreFileBatch("kz", "pmzxfueg", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("vector_store_id").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("in_progress").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("completed").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("failed").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("cancelled").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("total").ToString()); +]]> + + + +This sample shows how to call CancelVectorStoreFileBatchAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStoreFileBatches client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFileBatchesClient(); + +Response response = await client.CancelVectorStoreFileBatchAsync("kpjojtaxsspjvzyxmfgwxusqde", "lqtvimqtqecqy"); +]]> +This sample shows how to call CancelVectorStoreFileBatchAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStoreFileBatches client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFileBatchesClient(); + +Response response = await client.CancelVectorStoreFileBatchAsync("fldyjeftzzkqinhz", "qsniwwejf"); +]]> + + + +This sample shows how to call CancelVectorStoreFileBatch. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStoreFileBatches client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFileBatchesClient(); + +Response response = client.CancelVectorStoreFileBatch("kpjojtaxsspjvzyxmfgwxusqde", "lqtvimqtqecqy"); +]]> +This sample shows how to call CancelVectorStoreFileBatch. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStoreFileBatches client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFileBatchesClient(); + +Response response = client.CancelVectorStoreFileBatch("fldyjeftzzkqinhz", "qsniwwejf"); +]]> + + + +This sample shows how to call CancelVectorStoreFileBatchAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStoreFileBatches client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFileBatchesClient(); + +Response response = await client.CancelVectorStoreFileBatchAsync("kpjojtaxsspjvzyxmfgwxusqde", "lqtvimqtqecqy", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("vector_store_id").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("in_progress").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("completed").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("failed").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("cancelled").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("total").ToString()); +]]> +This sample shows how to call CancelVectorStoreFileBatchAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStoreFileBatches client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFileBatchesClient(); + +Response response = await client.CancelVectorStoreFileBatchAsync("fldyjeftzzkqinhz", "qsniwwejf", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("vector_store_id").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("in_progress").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("completed").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("failed").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("cancelled").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("total").ToString()); +]]> + + + +This sample shows how to call CancelVectorStoreFileBatch and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStoreFileBatches client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFileBatchesClient(); + +Response response = client.CancelVectorStoreFileBatch("kpjojtaxsspjvzyxmfgwxusqde", "lqtvimqtqecqy", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("vector_store_id").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("in_progress").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("completed").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("failed").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("cancelled").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("total").ToString()); +]]> +This sample shows how to call CancelVectorStoreFileBatch and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStoreFileBatches client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFileBatchesClient(); + +Response response = client.CancelVectorStoreFileBatch("fldyjeftzzkqinhz", "qsniwwejf", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("vector_store_id").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("in_progress").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("completed").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("failed").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("cancelled").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("total").ToString()); +]]> + + + +This sample shows how to call GetVectorStoreFileBatchFilesAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStoreFileBatches client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFileBatchesClient(); + +await foreach (VectorStoreFile item in client.GetVectorStoreFileBatchFilesAsync("itweqinnhpanpqxkxwqfi", "b")) +{ +} +]]> +This sample shows how to call GetVectorStoreFileBatchFilesAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStoreFileBatches client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFileBatchesClient(); + +await foreach (VectorStoreFile item in client.GetVectorStoreFileBatchFilesAsync("awzuqhqpzl", "gipykvmemjcss")) +{ +} +]]> + + + +This sample shows how to call GetVectorStoreFileBatchFiles. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStoreFileBatches client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFileBatchesClient(); + +foreach (VectorStoreFile item in client.GetVectorStoreFileBatchFiles("itweqinnhpanpqxkxwqfi", "b")) +{ +} +]]> +This sample shows how to call GetVectorStoreFileBatchFiles. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStoreFileBatches client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFileBatchesClient(); + +foreach (VectorStoreFile item in client.GetVectorStoreFileBatchFiles("awzuqhqpzl", "gipykvmemjcss")) +{ +} +]]> + + + +This sample shows how to call GetVectorStoreFileBatchFilesAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStoreFileBatches client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFileBatchesClient(); + +await foreach (BinaryData item in client.GetVectorStoreFileBatchFilesAsync("itweqinnhpanpqxkxwqfi", "b", "in_progress", 22, "asc", "uotopjkuhxuxypqooudmdt", "lunnzgjqyjlrlvsldrkhrjvaqfovp", (RequestContext)null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("usage_bytes").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("vector_store_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("chunking_strategy").GetProperty("type").ToString()); +} +]]> +This sample shows how to call GetVectorStoreFileBatchFilesAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStoreFileBatches client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFileBatchesClient(); + +await foreach (BinaryData item in client.GetVectorStoreFileBatchFilesAsync("awzuqhqpzl", "gipykvmemjcss", (string)null, (int?)null, (string)null, (string)null, (string)null, (RequestContext)null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("usage_bytes").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("vector_store_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("chunking_strategy").GetProperty("type").ToString()); +} +]]> + + + +This sample shows how to call GetVectorStoreFileBatchFiles and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStoreFileBatches client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFileBatchesClient(); + +foreach (BinaryData item in client.GetVectorStoreFileBatchFiles("itweqinnhpanpqxkxwqfi", "b", "in_progress", 22, "asc", "uotopjkuhxuxypqooudmdt", "lunnzgjqyjlrlvsldrkhrjvaqfovp", (RequestContext)null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("usage_bytes").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("vector_store_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("chunking_strategy").GetProperty("type").ToString()); +} +]]> +This sample shows how to call GetVectorStoreFileBatchFiles and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStoreFileBatches client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFileBatchesClient(); + +foreach (BinaryData item in client.GetVectorStoreFileBatchFiles("awzuqhqpzl", "gipykvmemjcss", (string)null, (int?)null, (string)null, (string)null, (string)null, (RequestContext)null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("usage_bytes").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("vector_store_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("chunking_strategy").GetProperty("type").ToString()); +} +]]> + + + \ No newline at end of file diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/Docs/VectorStoreFiles.xml b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/Docs/VectorStoreFiles.xml new file mode 100644 index 000000000000..7ac0da1cc046 --- /dev/null +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/Docs/VectorStoreFiles.xml @@ -0,0 +1,341 @@ + + + + + +This sample shows how to call CreateVectorStoreFileAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStoreFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFilesClient(); + +Response response = await client.CreateVectorStoreFileAsync("kox"); +]]> + + + +This sample shows how to call CreateVectorStoreFile. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStoreFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFilesClient(); + +Response response = client.CreateVectorStoreFile("kox"); +]]> + + + +This sample shows how to call CreateVectorStoreFileAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStoreFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFilesClient(); + +using RequestContent content = RequestContent.Create(new +{ + file_id = "emdzaopxo", + data_source = new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, +}); +Response response = await client.CreateVectorStoreFileAsync("kox", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("usage_bytes").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("vector_store_id").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("chunking_strategy").GetProperty("type").ToString()); +]]> + + + +This sample shows how to call CreateVectorStoreFile and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStoreFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFilesClient(); + +using RequestContent content = RequestContent.Create(new +{ + file_id = "emdzaopxo", + data_source = new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, +}); +Response response = client.CreateVectorStoreFile("kox", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("usage_bytes").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("vector_store_id").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("chunking_strategy").GetProperty("type").ToString()); +]]> + + + +This sample shows how to call GetVectorStoreFileAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStoreFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFilesClient(); + +Response response = await client.GetVectorStoreFileAsync("bds", "qusinxkarhcskvxntuym"); +]]> +This sample shows how to call GetVectorStoreFileAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStoreFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFilesClient(); + +Response response = await client.GetVectorStoreFileAsync("fakyvuniwxszpqxxcovnohhacypzp", "sar"); +]]> + + + +This sample shows how to call GetVectorStoreFile. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStoreFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFilesClient(); + +Response response = client.GetVectorStoreFile("bds", "qusinxkarhcskvxntuym"); +]]> +This sample shows how to call GetVectorStoreFile. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStoreFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFilesClient(); + +Response response = client.GetVectorStoreFile("fakyvuniwxszpqxxcovnohhacypzp", "sar"); +]]> + + + +This sample shows how to call GetVectorStoreFileAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStoreFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFilesClient(); + +Response response = await client.GetVectorStoreFileAsync("bds", "qusinxkarhcskvxntuym", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("usage_bytes").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("vector_store_id").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("chunking_strategy").GetProperty("type").ToString()); +]]> +This sample shows how to call GetVectorStoreFileAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStoreFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFilesClient(); + +Response response = await client.GetVectorStoreFileAsync("fakyvuniwxszpqxxcovnohhacypzp", "sar", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("usage_bytes").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("vector_store_id").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("chunking_strategy").GetProperty("type").ToString()); +]]> + + + +This sample shows how to call GetVectorStoreFile and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStoreFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFilesClient(); + +Response response = client.GetVectorStoreFile("bds", "qusinxkarhcskvxntuym", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("usage_bytes").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("vector_store_id").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("chunking_strategy").GetProperty("type").ToString()); +]]> +This sample shows how to call GetVectorStoreFile and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStoreFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFilesClient(); + +Response response = client.GetVectorStoreFile("fakyvuniwxszpqxxcovnohhacypzp", "sar", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("usage_bytes").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("vector_store_id").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); +Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); +Console.WriteLine(result.GetProperty("chunking_strategy").GetProperty("type").ToString()); +]]> + + + +This sample shows how to call GetVectorStoreFilesAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStoreFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFilesClient(); + +await foreach (VectorStoreFile item in client.GetVectorStoreFilesAsync("nuppye")) +{ +} +]]> +This sample shows how to call GetVectorStoreFilesAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStoreFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFilesClient(); + +await foreach (VectorStoreFile item in client.GetVectorStoreFilesAsync("rijuypqar")) +{ +} +]]> + + + +This sample shows how to call GetVectorStoreFiles. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStoreFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFilesClient(); + +foreach (VectorStoreFile item in client.GetVectorStoreFiles("nuppye")) +{ +} +]]> +This sample shows how to call GetVectorStoreFiles. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStoreFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFilesClient(); + +foreach (VectorStoreFile item in client.GetVectorStoreFiles("rijuypqar")) +{ +} +]]> + + + +This sample shows how to call GetVectorStoreFilesAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStoreFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFilesClient(); + +await foreach (BinaryData item in client.GetVectorStoreFilesAsync("nuppye", "in_progress", 8, "asc", "cayfrop", "rdxomcqockbejgfxd", (RequestContext)null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("usage_bytes").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("vector_store_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("chunking_strategy").GetProperty("type").ToString()); +} +]]> +This sample shows how to call GetVectorStoreFilesAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStoreFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFilesClient(); + +await foreach (BinaryData item in client.GetVectorStoreFilesAsync("rijuypqar", (string)null, (int?)null, (string)null, (string)null, (string)null, (RequestContext)null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("usage_bytes").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("vector_store_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("chunking_strategy").GetProperty("type").ToString()); +} +]]> + + + +This sample shows how to call GetVectorStoreFiles and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStoreFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFilesClient(); + +foreach (BinaryData item in client.GetVectorStoreFiles("nuppye", "in_progress", 8, "asc", "cayfrop", "rdxomcqockbejgfxd", (RequestContext)null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("usage_bytes").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("vector_store_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("chunking_strategy").GetProperty("type").ToString()); +} +]]> +This sample shows how to call GetVectorStoreFiles and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStoreFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFilesClient(); + +foreach (BinaryData item in client.GetVectorStoreFiles("rijuypqar", (string)null, (int?)null, (string)null, (string)null, (string)null, (RequestContext)null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("usage_bytes").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("vector_store_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("chunking_strategy").GetProperty("type").ToString()); +} +]]> + + + \ No newline at end of file diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/Docs/VectorStores.xml b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/Docs/VectorStores.xml new file mode 100644 index 000000000000..e1f718dbeccc --- /dev/null +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/Docs/VectorStores.xml @@ -0,0 +1,685 @@ + + + + + +This sample shows how to call CreateVectorStoreAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStores client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoresClient(); + +Response response = await client.CreateVectorStoreAsync(); +]]> +This sample shows how to call CreateVectorStoreAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStores client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoresClient(); + +Response response = await client.CreateVectorStoreAsync(); +]]> + + + +This sample shows how to call CreateVectorStore. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStores client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoresClient(); + +Response response = client.CreateVectorStore(); +]]> +This sample shows how to call CreateVectorStore. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStores client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoresClient(); + +Response response = client.CreateVectorStore(); +]]> + + + +This sample shows how to call CreateVectorStoreAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStores client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoresClient(); + +using RequestContent content = RequestContent.Create(new +{ + file_ids = new object[] + { + "hileejdmsljnblywbqgrycpbeczbt", + "hileejdmsljnblywbqgrycpbeczbt", + "hileejdmsljnblywbqgrycpbeczbt", + "hileejdmsljnblywbqgrycpbeczbt", + "hileejdmsljnblywbqgrycpbeczbt", + "hileejdmsljnblywbqgrycpbeczbt", + "hileejdmsljnblywbqgrycpbeczbt", + "hileejdmsljnblywbqgrycpbeczbt", + "hileejdmsljnblywbqgrycpbeczbt", + "hileejdmsljnblywbqgrycpbeczbt", + "hileejdmsljnblywbqgrycpbeczbt", + "hileejdmsljnblywbqgrycpbeczbt", + "hileejdmsljnblywbqgrycpbeczbt", + "hileejdmsljnblywbqgrycpbeczbt", + "hileejdmsljnblywbqgrycpbeczbt", + "hileejdmsljnblywbqgrycpbeczbt", + "hileejdmsljnblywbqgrycpbeczbt", + "hileejdmsljnblywbqgrycpbeczbt", + "hileejdmsljnblywbqgrycpbeczbt", + "hileejdmsljnblywbqgrycpbeczbt" + }, + name = "u", + configuration = new + { + data_sources = new object[] + { + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + } + }, + }, + expires_after = new + { + anchor = "last_active_at", + days = 73, + }, + metadata = new + { + key9029 = "ghicfhykvpyj", + }, +}); +Response response = await client.CreateVectorStoreAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("usage_bytes").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("in_progress").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("completed").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("failed").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("cancelled").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("total").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("last_active_at").ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +]]> +This sample shows how to call CreateVectorStoreAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStores client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoresClient(); + +using RequestContent content = RequestContent.Create(new object()); +Response response = await client.CreateVectorStoreAsync(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("usage_bytes").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("in_progress").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("completed").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("failed").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("cancelled").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("total").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("last_active_at").ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +]]> + + + +This sample shows how to call CreateVectorStore and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStores client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoresClient(); + +using RequestContent content = RequestContent.Create(new +{ + file_ids = new object[] + { + "hileejdmsljnblywbqgrycpbeczbt", + "hileejdmsljnblywbqgrycpbeczbt", + "hileejdmsljnblywbqgrycpbeczbt", + "hileejdmsljnblywbqgrycpbeczbt", + "hileejdmsljnblywbqgrycpbeczbt", + "hileejdmsljnblywbqgrycpbeczbt", + "hileejdmsljnblywbqgrycpbeczbt", + "hileejdmsljnblywbqgrycpbeczbt", + "hileejdmsljnblywbqgrycpbeczbt", + "hileejdmsljnblywbqgrycpbeczbt", + "hileejdmsljnblywbqgrycpbeczbt", + "hileejdmsljnblywbqgrycpbeczbt", + "hileejdmsljnblywbqgrycpbeczbt", + "hileejdmsljnblywbqgrycpbeczbt", + "hileejdmsljnblywbqgrycpbeczbt", + "hileejdmsljnblywbqgrycpbeczbt", + "hileejdmsljnblywbqgrycpbeczbt", + "hileejdmsljnblywbqgrycpbeczbt", + "hileejdmsljnblywbqgrycpbeczbt", + "hileejdmsljnblywbqgrycpbeczbt" + }, + name = "u", + configuration = new + { + data_sources = new object[] + { + new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + } + }, + }, + expires_after = new + { + anchor = "last_active_at", + days = 73, + }, + metadata = new + { + key9029 = "ghicfhykvpyj", + }, +}); +Response response = client.CreateVectorStore(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("usage_bytes").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("in_progress").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("completed").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("failed").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("cancelled").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("total").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("last_active_at").ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +]]> +This sample shows how to call CreateVectorStore and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStores client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoresClient(); + +using RequestContent content = RequestContent.Create(new object()); +Response response = client.CreateVectorStore(content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("usage_bytes").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("in_progress").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("completed").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("failed").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("cancelled").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("total").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("last_active_at").ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +]]> + + + +This sample shows how to call GetVectorStoreAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStores client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoresClient(); + +Response response = await client.GetVectorStoreAsync("vjsfufonwjwzvygdq"); +]]> +This sample shows how to call GetVectorStoreAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStores client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoresClient(); + +Response response = await client.GetVectorStoreAsync("jhrejmwmyblsdagsx"); +]]> + + + +This sample shows how to call GetVectorStore. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStores client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoresClient(); + +Response response = client.GetVectorStore("vjsfufonwjwzvygdq"); +]]> +This sample shows how to call GetVectorStore. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStores client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoresClient(); + +Response response = client.GetVectorStore("jhrejmwmyblsdagsx"); +]]> + + + +This sample shows how to call GetVectorStoreAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStores client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoresClient(); + +Response response = await client.GetVectorStoreAsync("vjsfufonwjwzvygdq", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("usage_bytes").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("in_progress").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("completed").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("failed").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("cancelled").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("total").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("last_active_at").ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +]]> +This sample shows how to call GetVectorStoreAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStores client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoresClient(); + +Response response = await client.GetVectorStoreAsync("jhrejmwmyblsdagsx", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("usage_bytes").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("in_progress").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("completed").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("failed").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("cancelled").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("total").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("last_active_at").ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +]]> + + + +This sample shows how to call GetVectorStore and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStores client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoresClient(); + +Response response = client.GetVectorStore("vjsfufonwjwzvygdq", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("usage_bytes").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("in_progress").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("completed").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("failed").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("cancelled").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("total").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("last_active_at").ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +]]> +This sample shows how to call GetVectorStore and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStores client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoresClient(); + +Response response = client.GetVectorStore("jhrejmwmyblsdagsx", null); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("usage_bytes").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("in_progress").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("completed").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("failed").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("cancelled").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("total").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("last_active_at").ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +]]> + + + +This sample shows how to call ModifyVectorStoreAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStores client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoresClient(); + +Response response = await client.ModifyVectorStoreAsync("pqhrqxzleymrjogjppdtlmxlsfculn"); +]]> +This sample shows how to call ModifyVectorStoreAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStores client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoresClient(); + +Response response = await client.ModifyVectorStoreAsync("jlamdmhxwayxxeiexcyulxcocw"); +]]> + + + +This sample shows how to call ModifyVectorStore. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStores client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoresClient(); + +Response response = client.ModifyVectorStore("pqhrqxzleymrjogjppdtlmxlsfculn"); +]]> +This sample shows how to call ModifyVectorStore. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStores client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoresClient(); + +Response response = client.ModifyVectorStore("jlamdmhxwayxxeiexcyulxcocw"); +]]> + + + +This sample shows how to call ModifyVectorStoreAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStores client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoresClient(); + +using RequestContent content = RequestContent.Create(new +{ + name = "jcrzfsgxsgelufbkjidfvnu", + expires_after = new + { + anchor = "last_active_at", + days = 73, + }, + metadata = new + { + key9792 = "cxmmdtwupsjnjixdoaravhbkrqqqm", + }, +}); +Response response = await client.ModifyVectorStoreAsync("pqhrqxzleymrjogjppdtlmxlsfculn", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("usage_bytes").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("in_progress").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("completed").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("failed").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("cancelled").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("total").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("last_active_at").ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +]]> +This sample shows how to call ModifyVectorStoreAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStores client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoresClient(); + +using RequestContent content = RequestContent.Create(new object()); +Response response = await client.ModifyVectorStoreAsync("jlamdmhxwayxxeiexcyulxcocw", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("usage_bytes").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("in_progress").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("completed").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("failed").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("cancelled").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("total").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("last_active_at").ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +]]> + + + +This sample shows how to call ModifyVectorStore and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStores client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoresClient(); + +using RequestContent content = RequestContent.Create(new +{ + name = "jcrzfsgxsgelufbkjidfvnu", + expires_after = new + { + anchor = "last_active_at", + days = 73, + }, + metadata = new + { + key9792 = "cxmmdtwupsjnjixdoaravhbkrqqqm", + }, +}); +Response response = client.ModifyVectorStore("pqhrqxzleymrjogjppdtlmxlsfculn", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("usage_bytes").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("in_progress").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("completed").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("failed").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("cancelled").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("total").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("last_active_at").ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +]]> +This sample shows how to call ModifyVectorStore and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStores client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoresClient(); + +using RequestContent content = RequestContent.Create(new object()); +Response response = client.ModifyVectorStore("jlamdmhxwayxxeiexcyulxcocw", content); + +JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; +Console.WriteLine(result.GetProperty("id").ToString()); +Console.WriteLine(result.GetProperty("object").ToString()); +Console.WriteLine(result.GetProperty("created_at").ToString()); +Console.WriteLine(result.GetProperty("name").ToString()); +Console.WriteLine(result.GetProperty("usage_bytes").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("in_progress").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("completed").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("failed").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("cancelled").ToString()); +Console.WriteLine(result.GetProperty("file_counts").GetProperty("total").ToString()); +Console.WriteLine(result.GetProperty("status").ToString()); +Console.WriteLine(result.GetProperty("last_active_at").ToString()); +Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +]]> + + + +This sample shows how to call GetVectorStoresAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStores client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoresClient(); + +await foreach (PersistentAgentsVectorStore item in client.GetVectorStoresAsync()) +{ +} +]]> +This sample shows how to call GetVectorStoresAsync. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStores client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoresClient(); + +await foreach (PersistentAgentsVectorStore item in client.GetVectorStoresAsync()) +{ +} +]]> + + + +This sample shows how to call GetVectorStores. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStores client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoresClient(); + +foreach (PersistentAgentsVectorStore item in client.GetVectorStores()) +{ +} +]]> +This sample shows how to call GetVectorStores. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStores client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoresClient(); + +foreach (PersistentAgentsVectorStore item in client.GetVectorStores()) +{ +} +]]> + + + +This sample shows how to call GetVectorStoresAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStores client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoresClient(); + +await foreach (BinaryData item in client.GetVectorStoresAsync(20, "asc", "cfgbzxzpyyflnolbxpkbsz", "forspimiuzzd", (RequestContext)null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("usage_bytes").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("in_progress").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("completed").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("failed").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("cancelled").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("total").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("last_active_at").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +} +]]> +This sample shows how to call GetVectorStoresAsync and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStores client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoresClient(); + +await foreach (BinaryData item in client.GetVectorStoresAsync((int?)null, (string)null, (string)null, (string)null, (RequestContext)null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("usage_bytes").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("in_progress").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("completed").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("failed").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("cancelled").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("total").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("last_active_at").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +} +]]> + + + +This sample shows how to call GetVectorStores and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStores client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoresClient(); + +foreach (BinaryData item in client.GetVectorStores(20, "asc", "cfgbzxzpyyflnolbxpkbsz", "forspimiuzzd", (RequestContext)null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("usage_bytes").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("in_progress").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("completed").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("failed").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("cancelled").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("total").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("last_active_at").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +} +]]> +This sample shows how to call GetVectorStores and parse the result. +"); +TokenCredential credential = new DefaultAzureCredential(); +VectorStores client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoresClient(); + +foreach (BinaryData item in client.GetVectorStores((int?)null, (string)null, (string)null, (string)null, (RequestContext)null)) +{ + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("usage_bytes").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("in_progress").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("completed").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("failed").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("cancelled").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("total").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("last_active_at").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); +} +]]> + + + \ No newline at end of file diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/File.Serialization.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/File.Serialization.cs deleted file mode 100644 index 3e84b77f907b..000000000000 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/File.Serialization.cs +++ /dev/null @@ -1,164 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Agents.Persistent -{ - internal partial class File : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(File)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(ContentType)) - { - writer.WritePropertyName("contentType"u8); - writer.WriteStringValue(ContentType); - } - if (Optional.IsDefined(Filename)) - { - writer.WritePropertyName("filename"u8); - writer.WriteStringValue(Filename); - } - writer.WritePropertyName("contents"u8); - writer.WriteBase64StringValue(Contents.ToArray(), "D"); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - File IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(File)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeFile(document.RootElement, options); - } - - internal static File DeserializeFile(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string contentType = default; - string filename = default; - BinaryData contents = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("contentType"u8)) - { - contentType = property.Value.GetString(); - continue; - } - if (property.NameEquals("filename"u8)) - { - filename = property.Value.GetString(); - continue; - } - if (property.NameEquals("contents"u8)) - { - contents = BinaryData.FromBytes(property.Value.GetBytesFromBase64("D")); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new File(contentType, filename, contents, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options, AzureAIAgentsPersistentContext.Default); - default: - throw new FormatException($"The model {nameof(File)} does not support writing '{options.Format}' format."); - } - } - - File IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeFile(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(File)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static File FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeFile(document.RootElement); - } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/File.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/File.cs deleted file mode 100644 index fe6fa90e5f73..000000000000 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/File.cs +++ /dev/null @@ -1,184 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Agents.Persistent -{ - /// - /// A file in an HTTP request, response, or multipart payload. - /// - /// Files have a special meaning that the HTTP library understands. When the body of an HTTP request, response, - /// or multipart payload is _effectively_ an instance of `TypeSpec.Http.File` or any type that extends it, the - /// operation is treated as a file upload or download. - /// - /// When using file bodies, the fields of the file model are defined to come from particular locations by default: - /// - /// - `contentType`: The `Content-Type` header of the request, response, or multipart payload (CANNOT be overridden or changed). - /// - `contents`: The body of the request, response, or multipart payload (CANNOT be overridden or changed). - /// - `filename`: The `filename` parameter value of the `Content-Disposition` header of the response or multipart payload - /// (MAY be overridden or changed). - /// - /// A File may be used as a normal structured JSON object in a request or response, if the request specifies an explicit - /// `Content-Type` header. In this case, the entire File model is serialized as if it were any other model. In a JSON payload, - /// it will have a structure like: - /// - /// ``` - /// { - /// "contentType": <string?>, - /// "filename": <string?>, - /// "contents": <string, base64> - /// } - /// ``` - /// - /// The `contentType` _within_ the file defines what media types the data inside the file can be, but if the specification - /// defines a `Content-Type` for the payload as HTTP metadata, that `Content-Type` metadata defines _how the file is - /// serialized_. See the examples below for more information. - /// - /// NOTE: The `filename` and `contentType` fields are optional. Furthermore, the default location of `filename` - /// (`Content-Disposition: <disposition>; filename=<filename>`) is only valid in HTTP responses and multipart payloads. If - /// you wish to send the `filename` in a request, you must use HTTP metadata decorators to describe the location of the - /// `filename` field. You can combine the metadata decorators with `@visibility` to control when the `filename` location - /// is overridden, as shown in the examples below. - /// - internal partial class File - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - /// - /// The contents of the file. - /// - /// In file bodies, this value comes from the body of the request, response, or multipart payload. In JSON bodies, - /// this value is serialized as a field in the response. - /// - /// is null. - public File(BinaryData contents) - { - Argument.AssertNotNull(contents, nameof(contents)); - - Contents = contents; - } - - /// Initializes a new instance of . - /// - /// The allowed media (MIME) types of the file contents. - /// - /// In file bodies, this value comes from the `Content-Type` header of the request or response. In JSON bodies, - /// this value is serialized as a field in the response. - /// - /// NOTE: this is not _necessarily_ the same as the `Content-Type` header of the request or response, but - /// it will be for file bodies. It may be different if the file is serialized as a JSON object. It always refers to the - /// _contents_ of the file, and not necessarily the way the file itself is transmitted or serialized. - /// - /// - /// The name of the file, if any. - /// - /// In file bodies, this value comes from the `filename` parameter of the `Content-Disposition` header of the response - /// or multipart payload. In JSON bodies, this value is serialized as a field in the response. - /// - /// NOTE: By default, `filename` cannot be sent in request payloads and can only be sent in responses and multipart - /// payloads, as the `Content-Disposition` header is not valid in requests. If you want to send the `filename` in a request, - /// you must extend the `File` model and override the `filename` property with a different location defined by HTTP metadata - /// decorators. - /// - /// - /// The contents of the file. - /// - /// In file bodies, this value comes from the body of the request, response, or multipart payload. In JSON bodies, - /// this value is serialized as a field in the response. - /// - /// Keeps track of any properties unknown to the library. - internal File(string contentType, string filename, BinaryData contents, IDictionary serializedAdditionalRawData) - { - ContentType = contentType; - Filename = filename; - Contents = contents; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal File() - { - } - - /// - /// The allowed media (MIME) types of the file contents. - /// - /// In file bodies, this value comes from the `Content-Type` header of the request or response. In JSON bodies, - /// this value is serialized as a field in the response. - /// - /// NOTE: this is not _necessarily_ the same as the `Content-Type` header of the request or response, but - /// it will be for file bodies. It may be different if the file is serialized as a JSON object. It always refers to the - /// _contents_ of the file, and not necessarily the way the file itself is transmitted or serialized. - /// - public string ContentType { get; set; } - /// - /// The name of the file, if any. - /// - /// In file bodies, this value comes from the `filename` parameter of the `Content-Disposition` header of the response - /// or multipart payload. In JSON bodies, this value is serialized as a field in the response. - /// - /// NOTE: By default, `filename` cannot be sent in request payloads and can only be sent in responses and multipart - /// payloads, as the `Content-Disposition` header is not valid in requests. If you want to send the `filename` in a request, - /// you must extend the `File` model and override the `filename` property with a different location defined by HTTP metadata - /// decorators. - /// - public string Filename { get; set; } - /// - /// The contents of the file. - /// - /// In file bodies, this value comes from the body of the request, response, or multipart payload. In JSON bodies, - /// this value is serialized as a field in the response. - /// - /// To assign a byte[] to this property use . - /// The byte[] will be serialized to a Base64 encoded string. - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromBytes(new byte[] { 1, 2, 3 }) - /// Creates a payload of "AQID". - /// - /// - /// - /// - public BinaryData Contents { get; } - } -} diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/MessageStreamEvent.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/MessageStreamEvent.cs index 73fba226628c..16ecec3460b8 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/MessageStreamEvent.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/MessageStreamEvent.cs @@ -22,22 +22,22 @@ public MessageStreamEvent(string value) _value = value ?? throw new ArgumentNullException(nameof(value)); } - private const string ThreadMessageCreatedValue = "thread.message.created"; - private const string ThreadMessageInProgressValue = "thread.message.in_progress"; - private const string ThreadMessageDeltaValue = "thread.message.delta"; - private const string ThreadMessageCompletedValue = "thread.message.completed"; - private const string ThreadMessageIncompleteValue = "thread.message.incomplete"; + private const string MessageCreatedValue = "thread.message.created"; + private const string MessageInProgressValue = "thread.message.in_progress"; + private const string MessageDeltaValue = "thread.message.delta"; + private const string MessageCompletedValue = "thread.message.completed"; + private const string MessageIncompleteValue = "thread.message.incomplete"; /// Event sent when a new message is created. The data of this event is of type ThreadMessage. - public static MessageStreamEvent ThreadMessageCreated { get; } = new MessageStreamEvent(ThreadMessageCreatedValue); + public static MessageStreamEvent MessageCreated { get; } = new MessageStreamEvent(MessageCreatedValue); /// Event sent when a message moves to `in_progress` status. The data of this event is of type ThreadMessage. - public static MessageStreamEvent ThreadMessageInProgress { get; } = new MessageStreamEvent(ThreadMessageInProgressValue); + public static MessageStreamEvent MessageInProgress { get; } = new MessageStreamEvent(MessageInProgressValue); /// Event sent when a message is being streamed. The data of this event is of type MessageDeltaChunk. - public static MessageStreamEvent ThreadMessageDelta { get; } = new MessageStreamEvent(ThreadMessageDeltaValue); + public static MessageStreamEvent MessageDelta { get; } = new MessageStreamEvent(MessageDeltaValue); /// Event sent when a message is completed. The data of this event is of type ThreadMessage. - public static MessageStreamEvent ThreadMessageCompleted { get; } = new MessageStreamEvent(ThreadMessageCompletedValue); + public static MessageStreamEvent MessageCompleted { get; } = new MessageStreamEvent(MessageCompletedValue); /// Event sent before a message is completed. The data of this event is of type ThreadMessage. - public static MessageStreamEvent ThreadMessageIncomplete { get; } = new MessageStreamEvent(ThreadMessageIncompleteValue); + public static MessageStreamEvent MessageIncomplete { get; } = new MessageStreamEvent(MessageIncompleteValue); /// Determines if two values are the same. public static bool operator ==(MessageStreamEvent left, MessageStreamEvent right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/MicrosoftFabricToolDefinition.Serialization.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/MicrosoftFabricToolDefinition.Serialization.cs deleted file mode 100644 index a10840a450ee..000000000000 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/MicrosoftFabricToolDefinition.Serialization.cs +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Agents.Persistent -{ - public partial class MicrosoftFabricToolDefinition : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(MicrosoftFabricToolDefinition)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("fabric_dataagent"u8); - writer.WriteObjectValue(FabricDataagent, options); - } - - MicrosoftFabricToolDefinition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(MicrosoftFabricToolDefinition)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeMicrosoftFabricToolDefinition(document.RootElement, options); - } - - internal static MicrosoftFabricToolDefinition DeserializeMicrosoftFabricToolDefinition(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - ToolConnectionList fabricDataagent = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("fabric_dataagent"u8)) - { - fabricDataagent = ToolConnectionList.DeserializeToolConnectionList(property.Value, options); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new MicrosoftFabricToolDefinition(type, serializedAdditionalRawData, fabricDataagent); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options, AzureAIAgentsPersistentContext.Default); - default: - throw new FormatException($"The model {nameof(MicrosoftFabricToolDefinition)} does not support writing '{options.Format}' format."); - } - } - - MicrosoftFabricToolDefinition IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeMicrosoftFabricToolDefinition(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(MicrosoftFabricToolDefinition)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new MicrosoftFabricToolDefinition FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeMicrosoftFabricToolDefinition(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/MicrosoftFabricToolDefinition.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/MicrosoftFabricToolDefinition.cs deleted file mode 100644 index 2cddbbe72198..000000000000 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/MicrosoftFabricToolDefinition.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Agents.Persistent -{ - /// The input definition information for a Microsoft Fabric tool as used to configure an agent. - public partial class MicrosoftFabricToolDefinition : ToolDefinition - { - /// Initializes a new instance of . - /// The list of connections used by the Microsoft Fabric tool. - /// is null. - public MicrosoftFabricToolDefinition(ToolConnectionList fabricDataagent) - { - Argument.AssertNotNull(fabricDataagent, nameof(fabricDataagent)); - - Type = "fabric_dataagent"; - FabricDataagent = fabricDataagent; - } - - /// Initializes a new instance of . - /// The object type. - /// Keeps track of any properties unknown to the library. - /// The list of connections used by the Microsoft Fabric tool. - internal MicrosoftFabricToolDefinition(string type, IDictionary serializedAdditionalRawData, ToolConnectionList fabricDataagent) : base(type, serializedAdditionalRawData) - { - FabricDataagent = fabricDataagent; - } - - /// Initializes a new instance of for deserialization. - internal MicrosoftFabricToolDefinition() - { - } - - /// The list of connections used by the Microsoft Fabric tool. - public ToolConnectionList FabricDataagent { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentAgent.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentAgent.cs index 027c8084d20e..525d7fa2d10c 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentAgent.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentAgent.cs @@ -56,7 +56,7 @@ public partial class PersistentAgent /// /// The collection of tools enabled for the agent. /// 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 , , , , , , , , , and . + /// The available derived classes include , , , , , , and . /// /// /// A set of resources that are used by the agent's tools. The resources are specific to the type of tool. For example, the `code_interpreter` @@ -104,7 +104,7 @@ internal PersistentAgent(string id, DateTimeOffset createdAt, string name, strin /// /// The collection of tools enabled for the agent. /// 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 , , , , , , , , , and . + /// The available derived classes include , , , , , , and . /// /// /// A set of resources that are used by the agent's tools. The resources are specific to the type of tool. For example, the `code_interpreter` @@ -162,7 +162,7 @@ internal PersistentAgent() /// /// The collection of tools enabled for the agent. /// 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 , , , , , , , , , and . + /// The available derived classes include , , , , , , and . /// public IReadOnlyList Tools { get; } /// diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentAgentStreamEvent.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentAgentStreamEvent.cs index a69ba7079458..ade7f4ca510d 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentAgentStreamEvent.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentAgentStreamEvent.cs @@ -50,18 +50,18 @@ public PersistentAgentStreamEvent(string value) private const string ThreadRunCancellingValue = "thread.run.cancelling"; private const string ThreadRunCancelledValue = "thread.run.cancelled"; private const string ThreadRunExpiredValue = "thread.run.expired"; - private const string CreatedValue = "thread.run.step.created"; - private const string InProgressValue = "thread.run.step.in_progress"; - private const string DeltaValue = "thread.run.step.delta"; - private const string CompletedValue = "thread.run.step.completed"; - private const string FailedValue = "thread.run.step.failed"; - private const string CancelledValue = "thread.run.step.cancelled"; - private const string ExpiredValue = "thread.run.step.expired"; - private const string ThreadMessageCreatedValue = "thread.message.created"; - private const string ThreadMessageInProgressValue = "thread.message.in_progress"; - private const string ThreadMessageDeltaValue = "thread.message.delta"; - private const string ThreadMessageCompletedValue = "thread.message.completed"; - private const string ThreadMessageIncompleteValue = "thread.message.incomplete"; + private const string RunStepCreatedValue = "thread.run.step.created"; + private const string RunStepInProgressValue = "thread.run.step.in_progress"; + private const string RunStepDeltaValue = "thread.run.step.delta"; + private const string RunStepCompletedValue = "thread.run.step.completed"; + private const string RunStepFailedValue = "thread.run.step.failed"; + private const string RunStepCancelledValue = "thread.run.step.cancelled"; + private const string RunStepExpiredValue = "thread.run.step.expired"; + private const string MessageCreatedValue = "thread.message.created"; + private const string MessageInProgressValue = "thread.message.in_progress"; + private const string MessageDeltaValue = "thread.message.delta"; + private const string MessageCompletedValue = "thread.message.completed"; + private const string MessageIncompleteValue = "thread.message.incomplete"; private const string ErrorValue = "error"; private const string DoneValue = "done"; @@ -88,29 +88,29 @@ public PersistentAgentStreamEvent(string value) /// Event sent when a run is expired. The data of this event is of type ThreadRun. public static PersistentAgentStreamEvent ThreadRunExpired { get; } = new PersistentAgentStreamEvent(ThreadRunExpiredValue); /// Event sent when a new thread run step is created. The data of this event is of type RunStep. - public static PersistentAgentStreamEvent Created { get; } = new PersistentAgentStreamEvent(CreatedValue); + public static PersistentAgentStreamEvent RunStepCreated { get; } = new PersistentAgentStreamEvent(RunStepCreatedValue); /// Event sent when a run step moves to `in_progress` status. The data of this event is of type RunStep. - public static PersistentAgentStreamEvent InProgress { get; } = new PersistentAgentStreamEvent(InProgressValue); + public static PersistentAgentStreamEvent RunStepInProgress { get; } = new PersistentAgentStreamEvent(RunStepInProgressValue); /// Event sent when a run step is being streamed. The data of this event is of type RunStepDeltaChunk. - public static PersistentAgentStreamEvent Delta { get; } = new PersistentAgentStreamEvent(DeltaValue); + public static PersistentAgentStreamEvent RunStepDelta { get; } = new PersistentAgentStreamEvent(RunStepDeltaValue); /// Event sent when a run step is completed. The data of this event is of type RunStep. - public static PersistentAgentStreamEvent Completed { get; } = new PersistentAgentStreamEvent(CompletedValue); + public static PersistentAgentStreamEvent RunStepCompleted { get; } = new PersistentAgentStreamEvent(RunStepCompletedValue); /// Event sent when a run step fails. The data of this event is of type RunStep. - public static PersistentAgentStreamEvent Failed { get; } = new PersistentAgentStreamEvent(FailedValue); + public static PersistentAgentStreamEvent RunStepFailed { get; } = new PersistentAgentStreamEvent(RunStepFailedValue); /// Event sent when a run step is cancelled. The data of this event is of type RunStep. - public static PersistentAgentStreamEvent Cancelled { get; } = new PersistentAgentStreamEvent(CancelledValue); + public static PersistentAgentStreamEvent RunStepCancelled { get; } = new PersistentAgentStreamEvent(RunStepCancelledValue); /// Event sent when a run step is expired. The data of this event is of type RunStep. - public static PersistentAgentStreamEvent Expired { get; } = new PersistentAgentStreamEvent(ExpiredValue); + public static PersistentAgentStreamEvent RunStepExpired { get; } = new PersistentAgentStreamEvent(RunStepExpiredValue); /// Event sent when a new message is created. The data of this event is of type ThreadMessage. - public static PersistentAgentStreamEvent ThreadMessageCreated { get; } = new PersistentAgentStreamEvent(ThreadMessageCreatedValue); + public static PersistentAgentStreamEvent MessageCreated { get; } = new PersistentAgentStreamEvent(MessageCreatedValue); /// Event sent when a message moves to `in_progress` status. The data of this event is of type ThreadMessage. - public static PersistentAgentStreamEvent ThreadMessageInProgress { get; } = new PersistentAgentStreamEvent(ThreadMessageInProgressValue); + public static PersistentAgentStreamEvent MessageInProgress { get; } = new PersistentAgentStreamEvent(MessageInProgressValue); /// Event sent when a message is being streamed. The data of this event is of type MessageDeltaChunk. - public static PersistentAgentStreamEvent ThreadMessageDelta { get; } = new PersistentAgentStreamEvent(ThreadMessageDeltaValue); + public static PersistentAgentStreamEvent MessageDelta { get; } = new PersistentAgentStreamEvent(MessageDeltaValue); /// Event sent when a message is completed. The data of this event is of type ThreadMessage. - public static PersistentAgentStreamEvent ThreadMessageCompleted { get; } = new PersistentAgentStreamEvent(ThreadMessageCompletedValue); + public static PersistentAgentStreamEvent MessageCompleted { get; } = new PersistentAgentStreamEvent(MessageCompletedValue); /// Event sent before a message is completed. The data of this event is of type ThreadMessage. - public static PersistentAgentStreamEvent ThreadMessageIncomplete { get; } = new PersistentAgentStreamEvent(ThreadMessageIncompleteValue); + public static PersistentAgentStreamEvent MessageIncomplete { get; } = new PersistentAgentStreamEvent(MessageIncompleteValue); /// Event sent when an error occurs, such as an internal server error or a timeout. public static PersistentAgentStreamEvent Error { get; } = new PersistentAgentStreamEvent(ErrorValue); /// Event sent when the stream is done. diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentAgentsAdministrationClient.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentAgentsAdministrationClient.cs index 88510f528c09..03188562460d 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentAgentsAdministrationClient.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentAgentsAdministrationClient.cs @@ -84,6 +84,7 @@ public PersistentAgentsAdministrationClient(Uri endpoint, TokenCredential creden /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. /// The cancellation token to use. /// is null. + /// public virtual async Task> CreateAgentAsync(string model, string name = null, string description = null, string instructions = null, IEnumerable tools = null, ToolResources toolResources = null, float? temperature = null, float? topP = null, BinaryData responseFormat = null, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(model, nameof(model)); @@ -129,6 +130,7 @@ public virtual async Task> CreateAgentAsync(string mod /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. /// The cancellation token to use. /// is null. + /// public virtual Response CreateAgent(string model, string name = null, string description = null, string instructions = null, IEnumerable tools = null, ToolResources toolResources = null, float? temperature = null, float? topP = null, BinaryData responseFormat = null, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(model, nameof(model)); @@ -170,6 +172,7 @@ public virtual Response CreateAgent(string model, string name = /// is null. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual async Task CreateAgentAsync(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -208,6 +211,7 @@ public virtual async Task CreateAgentAsync(RequestContent content, Req /// is null. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual Response CreateAgent(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -231,6 +235,7 @@ public virtual Response CreateAgent(RequestContent content, RequestContext conte /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. + /// public virtual async Task> GetAgentAsync(string assistantId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(assistantId, nameof(assistantId)); @@ -245,6 +250,7 @@ public virtual async Task> GetAgentAsync(string assist /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. + /// public virtual Response GetAgent(string assistantId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(assistantId, nameof(assistantId)); @@ -280,6 +286,7 @@ public virtual Response GetAgent(string assistantId, Cancellati /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. + /// public virtual async Task> UpdateAgentAsync(string assistantId, string model = null, string name = null, string description = null, string instructions = null, IEnumerable tools = null, ToolResources toolResources = null, float? temperature = null, float? topP = null, BinaryData responseFormat = null, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(assistantId, nameof(assistantId)); @@ -327,6 +334,7 @@ public virtual async Task> UpdateAgentAsync(string ass /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. + /// public virtual Response UpdateAgent(string assistantId, string model = null, string name = null, string description = null, string instructions = null, IEnumerable tools = null, ToolResources toolResources = null, float? temperature = null, float? topP = null, BinaryData responseFormat = null, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(assistantId, nameof(assistantId)); @@ -370,6 +378,7 @@ public virtual Response UpdateAgent(string assistantId, string /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual async Task UpdateAgentAsync(string assistantId, RequestContent content, RequestContext context = null) { Argument.AssertNotNullOrEmpty(assistantId, nameof(assistantId)); @@ -411,6 +420,7 @@ public virtual async Task UpdateAgentAsync(string assistantId, Request /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual Response UpdateAgent(string assistantId, RequestContent content, RequestContext context = null) { Argument.AssertNotNullOrEmpty(assistantId, nameof(assistantId)); @@ -575,7 +585,7 @@ internal virtual Response InternalDeleteAgent(string assistantId, RequestContext /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. /// The cancellation token to use. /// is null. - internal virtual async Task> CreateThreadAndRunAsync(string assistantId, PersistentAgentThreadCreationOptions thread = null, string overrideModelName = null, string overrideInstructions = null, IEnumerable overrideTools = null, UpdateToolResourcesOptions toolResources = null, bool? stream = null, float? temperature = null, float? topP = null, int? maxPromptTokens = null, int? maxCompletionTokens = null, Truncation truncationStrategy = null, BinaryData toolChoice = null, BinaryData responseFormat = null, bool? parallelToolCalls = null, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default) + internal virtual async Task> CreateThreadAndRunAsync(string assistantId, PersistentAgentThreadCreationOptions thread = null, string overrideModelName = null, string overrideInstructions = null, IEnumerable overrideTools = null, ToolResources toolResources = null, bool? stream = null, float? temperature = null, float? topP = null, int? maxPromptTokens = null, int? maxCompletionTokens = null, Truncation truncationStrategy = null, BinaryData toolChoice = null, BinaryData responseFormat = null, bool? parallelToolCalls = null, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(assistantId, nameof(assistantId)); @@ -641,7 +651,7 @@ internal virtual async Task> CreateThreadAndRunAsync(string /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. /// The cancellation token to use. /// is null. - internal virtual Response CreateThreadAndRun(string assistantId, PersistentAgentThreadCreationOptions thread = null, string overrideModelName = null, string overrideInstructions = null, IEnumerable overrideTools = null, UpdateToolResourcesOptions toolResources = null, bool? stream = null, float? temperature = null, float? topP = null, int? maxPromptTokens = null, int? maxCompletionTokens = null, Truncation truncationStrategy = null, BinaryData toolChoice = null, BinaryData responseFormat = null, bool? parallelToolCalls = null, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default) + internal virtual Response CreateThreadAndRun(string assistantId, PersistentAgentThreadCreationOptions thread = null, string overrideModelName = null, string overrideInstructions = null, IEnumerable overrideTools = null, ToolResources toolResources = null, bool? stream = null, float? temperature = null, float? topP = null, int? maxPromptTokens = null, int? maxCompletionTokens = null, Truncation truncationStrategy = null, BinaryData toolChoice = null, BinaryData responseFormat = null, bool? parallelToolCalls = null, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default) { Argument.AssertNotNull(assistantId, nameof(assistantId)); @@ -678,7 +688,7 @@ internal virtual Response CreateThreadAndRun(string assistantId, Pers /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -716,7 +726,7 @@ internal virtual async Task CreateThreadAndRunAsync(RequestContent con /// /// /// - /// Please try the simpler convenience overload with strongly typed models first. + /// Please try the simpler convenience overload with strongly typed models first. /// /// /// @@ -744,6 +754,7 @@ internal virtual Response CreateThreadAndRun(RequestContent content, RequestCont } } + private ServicePatterns _cachedServicePatterns; private Threads _cachedThreads; private ThreadMessages _cachedThreadMessages; private ThreadRuns _cachedThreadRuns; @@ -753,6 +764,12 @@ internal virtual Response CreateThreadAndRun(RequestContent content, RequestCont private VectorStoreFiles _cachedVectorStoreFiles; private VectorStoreFileBatches _cachedVectorStoreFileBatches; + /// Initializes a new instance of ServicePatterns. + public virtual ServicePatterns GetServicePatternsClient() + { + return Volatile.Read(ref _cachedServicePatterns) ?? Interlocked.CompareExchange(ref _cachedServicePatterns, new ServicePatterns(ClientDiagnostics, _pipeline, _tokenCredential, _endpoint), null) ?? _cachedServicePatterns; + } + internal HttpMessage CreateCreateAgentRequest(RequestContent content, RequestContext context) { var message = _pipeline.CreateMessage(context, ResponseClassifier200); diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentAgentsFiles.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentAgentsFiles.cs index 533bfd42c4eb..8d07d551610f 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentAgentsFiles.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentAgentsFiles.cs @@ -328,6 +328,7 @@ internal virtual Response InternalDeleteFile(string fileId, RequestContext conte /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. + /// public virtual async Task> GetFileAsync(string fileId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(fileId, nameof(fileId)); @@ -342,6 +343,7 @@ public virtual async Task> GetFileAsync(string /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. + /// public virtual Response GetFile(string fileId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(fileId, nameof(fileId)); @@ -372,6 +374,7 @@ public virtual Response GetFile(string fileId, Cancella /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual async Task GetFileAsync(string fileId, RequestContext context) { Argument.AssertNotNullOrEmpty(fileId, nameof(fileId)); @@ -411,6 +414,7 @@ public virtual async Task GetFileAsync(string fileId, RequestContext c /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual Response GetFile(string fileId, RequestContext context) { Argument.AssertNotNullOrEmpty(fileId, nameof(fileId)); @@ -434,6 +438,7 @@ public virtual Response GetFile(string fileId, RequestContext context) /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. + /// public virtual async Task> GetFileContentAsync(string fileId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(fileId, nameof(fileId)); @@ -448,6 +453,7 @@ public virtual async Task> GetFileContentAsync(string fileI /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. + /// public virtual Response GetFileContent(string fileId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(fileId, nameof(fileId)); @@ -478,6 +484,7 @@ public virtual Response GetFileContent(string fileId, CancellationTo /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual async Task GetFileContentAsync(string fileId, RequestContext context) { Argument.AssertNotNullOrEmpty(fileId, nameof(fileId)); @@ -517,6 +524,7 @@ public virtual async Task GetFileContentAsync(string fileId, RequestCo /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual Response GetFileContent(string fileId, RequestContext context) { Argument.AssertNotNullOrEmpty(fileId, nameof(fileId)); diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentAgentsModelFactory.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentAgentsModelFactory.cs index 23056c4354aa..ccf262892d8e 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentAgentsModelFactory.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentAgentsModelFactory.cs @@ -197,7 +197,7 @@ public static RunStepMessageCreationReference RunStepMessageCreationReference(st /// /// A list of tool call details for this run step. /// 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 , , , , , , , and . + /// The available derived classes include , , , , and . /// /// A new instance for mocking. public static RunStepToolCallDetails RunStepToolCallDetails(IEnumerable toolCalls = null) @@ -304,39 +304,6 @@ public static RunStepAzureAISearchToolCall RunStepAzureAISearchToolCall(string i return new RunStepAzureAISearchToolCall("azure_ai_search", id, serializedAdditionalRawData: null, azureAISearch); } - /// Initializes a new instance of . - /// The ID of the tool call. This ID must be referenced when you submit tool outputs. - /// Reserved for future use. - /// A new instance for mocking. - public static RunStepSharepointToolCall RunStepSharepointToolCall(string id = null, IReadOnlyDictionary sharePoint = null) - { - sharePoint ??= new Dictionary(); - - return new RunStepSharepointToolCall("sharepoint_grounding", id, serializedAdditionalRawData: null, sharePoint); - } - - /// Initializes a new instance of . - /// The ID of the tool call. This ID must be referenced when you submit tool outputs. - /// Reserved for future use. - /// A new instance for mocking. - public static RunStepMicrosoftFabricToolCall RunStepMicrosoftFabricToolCall(string id = null, IReadOnlyDictionary microsoftFabric = null) - { - microsoftFabric ??= new Dictionary(); - - return new RunStepMicrosoftFabricToolCall("fabric_dataagent", id, serializedAdditionalRawData: null, microsoftFabric); - } - - /// Initializes a new instance of . - /// The ID of the tool call. This ID must be referenced when you submit tool outputs. - /// Reserved for future use. - /// A new instance for mocking. - public static RunStepBingCustomSearchToolCall RunStepBingCustomSearchToolCall(string id = null, IReadOnlyDictionary bingCustomSearch = null) - { - bingCustomSearch ??= new Dictionary(); - - return new RunStepBingCustomSearchToolCall("bing_custom_search", id, serializedAdditionalRawData: null, bingCustomSearch); - } - /// Initializes a new instance of . /// The ID of the tool call. This ID must be referenced when you submit tool outputs. /// Reserved for future use. diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentAgentsNamedToolChoiceType.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentAgentsNamedToolChoiceType.cs index 5abd0fa864fd..98fc2b8551af 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentAgentsNamedToolChoiceType.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/PersistentAgentsNamedToolChoiceType.cs @@ -25,9 +25,6 @@ public PersistentAgentsNamedToolChoiceType(string value) private const string FunctionValue = "function"; private const string CodeInterpreterValue = "code_interpreter"; private const string FileSearchValue = "file_search"; - private const string BingGroundingValue = "bing_grounding"; - private const string MicrosoftFabricValue = "fabric_dataagent"; - private const string SharepointValue = "sharepoint_grounding"; private const string AzureAISearchValue = "azure_ai_search"; private const string BingCustomSearchValue = "bing_custom_search"; private const string ConnectedAgentValue = "connected_agent"; @@ -38,12 +35,6 @@ public PersistentAgentsNamedToolChoiceType(string value) public static PersistentAgentsNamedToolChoiceType CodeInterpreter { get; } = new PersistentAgentsNamedToolChoiceType(CodeInterpreterValue); /// Tool type `file_search`. public static PersistentAgentsNamedToolChoiceType FileSearch { get; } = new PersistentAgentsNamedToolChoiceType(FileSearchValue); - /// Tool type `bing_grounding`. - public static PersistentAgentsNamedToolChoiceType BingGrounding { get; } = new PersistentAgentsNamedToolChoiceType(BingGroundingValue); - /// Tool type `fabric_dataagent`. - public static PersistentAgentsNamedToolChoiceType MicrosoftFabric { get; } = new PersistentAgentsNamedToolChoiceType(MicrosoftFabricValue); - /// Tool type `sharepoint_grounding`. - public static PersistentAgentsNamedToolChoiceType Sharepoint { get; } = new PersistentAgentsNamedToolChoiceType(SharepointValue); /// Tool type `azure_ai_search`. public static PersistentAgentsNamedToolChoiceType AzureAISearch { get; } = new PersistentAgentsNamedToolChoiceType(AzureAISearchValue); /// Tool type `bing_custom_search`. diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepBingCustomSearchToolCall.Serialization.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepBingCustomSearchToolCall.Serialization.cs deleted file mode 100644 index a9919d4bfecf..000000000000 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepBingCustomSearchToolCall.Serialization.cs +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Agents.Persistent -{ - public partial class RunStepBingCustomSearchToolCall : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(RunStepBingCustomSearchToolCall)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("bing_custom_search"u8); - writer.WriteStartObject(); - foreach (var item in BingCustomSearch) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - - RunStepBingCustomSearchToolCall IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(RunStepBingCustomSearchToolCall)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRunStepBingCustomSearchToolCall(document.RootElement, options); - } - - internal static RunStepBingCustomSearchToolCall DeserializeRunStepBingCustomSearchToolCall(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyDictionary bingCustomSearch = default; - string type = default; - string id = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("bing_custom_search"u8)) - { - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - bingCustomSearch = dictionary; - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("id"u8)) - { - id = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new RunStepBingCustomSearchToolCall(type, id, serializedAdditionalRawData, bingCustomSearch); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options, AzureAIAgentsPersistentContext.Default); - default: - throw new FormatException($"The model {nameof(RunStepBingCustomSearchToolCall)} does not support writing '{options.Format}' format."); - } - } - - RunStepBingCustomSearchToolCall IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeRunStepBingCustomSearchToolCall(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RunStepBingCustomSearchToolCall)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new RunStepBingCustomSearchToolCall FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeRunStepBingCustomSearchToolCall(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepBingCustomSearchToolCall.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepBingCustomSearchToolCall.cs deleted file mode 100644 index 7c628d9d04a6..000000000000 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepBingCustomSearchToolCall.cs +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Agents.Persistent -{ - /// - /// A record of a call to a bing custom search tool, issued by the model in evaluation of a defined tool, that represents - /// executed search with bing custom search. - /// - public partial class RunStepBingCustomSearchToolCall : RunStepToolCall - { - /// Initializes a new instance of . - /// The ID of the tool call. This ID must be referenced when you submit tool outputs. - /// Reserved for future use. - /// or is null. - internal RunStepBingCustomSearchToolCall(string id, IReadOnlyDictionary bingCustomSearch) : base(id) - { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(bingCustomSearch, nameof(bingCustomSearch)); - - Type = "bing_custom_search"; - BingCustomSearch = bingCustomSearch; - } - - /// Initializes a new instance of . - /// The object type. - /// The ID of the tool call. This ID must be referenced when you submit tool outputs. - /// Keeps track of any properties unknown to the library. - /// Reserved for future use. - internal RunStepBingCustomSearchToolCall(string type, string id, IDictionary serializedAdditionalRawData, IReadOnlyDictionary bingCustomSearch) : base(type, id, serializedAdditionalRawData) - { - BingCustomSearch = bingCustomSearch; - } - - /// Initializes a new instance of for deserialization. - internal RunStepBingCustomSearchToolCall() - { - } - - /// Reserved for future use. - public IReadOnlyDictionary BingCustomSearch { get; } - } -} diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepMicrosoftFabricToolCall.Serialization.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepMicrosoftFabricToolCall.Serialization.cs deleted file mode 100644 index 8bce669c0034..000000000000 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepMicrosoftFabricToolCall.Serialization.cs +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Agents.Persistent -{ - public partial class RunStepMicrosoftFabricToolCall : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(RunStepMicrosoftFabricToolCall)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("fabric_dataagent"u8); - writer.WriteStartObject(); - foreach (var item in MicrosoftFabric) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - - RunStepMicrosoftFabricToolCall IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(RunStepMicrosoftFabricToolCall)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRunStepMicrosoftFabricToolCall(document.RootElement, options); - } - - internal static RunStepMicrosoftFabricToolCall DeserializeRunStepMicrosoftFabricToolCall(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyDictionary fabricDataagent = default; - string type = default; - string id = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("fabric_dataagent"u8)) - { - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - fabricDataagent = dictionary; - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("id"u8)) - { - id = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new RunStepMicrosoftFabricToolCall(type, id, serializedAdditionalRawData, fabricDataagent); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options, AzureAIAgentsPersistentContext.Default); - default: - throw new FormatException($"The model {nameof(RunStepMicrosoftFabricToolCall)} does not support writing '{options.Format}' format."); - } - } - - RunStepMicrosoftFabricToolCall IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeRunStepMicrosoftFabricToolCall(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RunStepMicrosoftFabricToolCall)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new RunStepMicrosoftFabricToolCall FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeRunStepMicrosoftFabricToolCall(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepMicrosoftFabricToolCall.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepMicrosoftFabricToolCall.cs deleted file mode 100644 index a78260a4ae24..000000000000 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepMicrosoftFabricToolCall.cs +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Agents.Persistent -{ - /// - /// A record of a call to a Microsoft Fabric tool, issued by the model in evaluation of a defined tool, that represents - /// executed Microsoft Fabric operations. - /// - public partial class RunStepMicrosoftFabricToolCall : RunStepToolCall - { - /// Initializes a new instance of . - /// The ID of the tool call. This ID must be referenced when you submit tool outputs. - /// Reserved for future use. - /// or is null. - internal RunStepMicrosoftFabricToolCall(string id, IReadOnlyDictionary microsoftFabric) : base(id) - { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(microsoftFabric, nameof(microsoftFabric)); - - Type = "fabric_dataagent"; - MicrosoftFabric = microsoftFabric; - } - - /// Initializes a new instance of . - /// The object type. - /// The ID of the tool call. This ID must be referenced when you submit tool outputs. - /// Keeps track of any properties unknown to the library. - /// Reserved for future use. - internal RunStepMicrosoftFabricToolCall(string type, string id, IDictionary serializedAdditionalRawData, IReadOnlyDictionary microsoftFabric) : base(type, id, serializedAdditionalRawData) - { - MicrosoftFabric = microsoftFabric; - } - - /// Initializes a new instance of for deserialization. - internal RunStepMicrosoftFabricToolCall() - { - } - - /// Reserved for future use. - public IReadOnlyDictionary MicrosoftFabric { get; } - } -} diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepSharepointToolCall.Serialization.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepSharepointToolCall.Serialization.cs deleted file mode 100644 index aa1aaf4b6af4..000000000000 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepSharepointToolCall.Serialization.cs +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Agents.Persistent -{ - public partial class RunStepSharepointToolCall : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(RunStepSharepointToolCall)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("sharepoint_grounding"u8); - writer.WriteStartObject(); - foreach (var item in SharePoint) - { - writer.WritePropertyName(item.Key); - writer.WriteStringValue(item.Value); - } - writer.WriteEndObject(); - } - - RunStepSharepointToolCall IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(RunStepSharepointToolCall)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeRunStepSharepointToolCall(document.RootElement, options); - } - - internal static RunStepSharepointToolCall DeserializeRunStepSharepointToolCall(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IReadOnlyDictionary sharepointGrounding = default; - string type = default; - string id = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("sharepoint_grounding"u8)) - { - Dictionary dictionary = new Dictionary(); - foreach (var property0 in property.Value.EnumerateObject()) - { - dictionary.Add(property0.Name, property0.Value.GetString()); - } - sharepointGrounding = dictionary; - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (property.NameEquals("id"u8)) - { - id = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new RunStepSharepointToolCall(type, id, serializedAdditionalRawData, sharepointGrounding); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options, AzureAIAgentsPersistentContext.Default); - default: - throw new FormatException($"The model {nameof(RunStepSharepointToolCall)} does not support writing '{options.Format}' format."); - } - } - - RunStepSharepointToolCall IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeRunStepSharepointToolCall(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(RunStepSharepointToolCall)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new RunStepSharepointToolCall FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeRunStepSharepointToolCall(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepSharepointToolCall.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepSharepointToolCall.cs deleted file mode 100644 index 43a2c6932b4b..000000000000 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepSharepointToolCall.cs +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Agents.Persistent -{ - /// - /// A record of a call to a SharePoint tool, issued by the model in evaluation of a defined tool, that represents - /// executed SharePoint actions. - /// - public partial class RunStepSharepointToolCall : RunStepToolCall - { - /// Initializes a new instance of . - /// The ID of the tool call. This ID must be referenced when you submit tool outputs. - /// Reserved for future use. - /// or is null. - internal RunStepSharepointToolCall(string id, IReadOnlyDictionary sharePoint) : base(id) - { - Argument.AssertNotNull(id, nameof(id)); - Argument.AssertNotNull(sharePoint, nameof(sharePoint)); - - Type = "sharepoint_grounding"; - SharePoint = sharePoint; - } - - /// Initializes a new instance of . - /// The object type. - /// The ID of the tool call. This ID must be referenced when you submit tool outputs. - /// Keeps track of any properties unknown to the library. - /// Reserved for future use. - internal RunStepSharepointToolCall(string type, string id, IDictionary serializedAdditionalRawData, IReadOnlyDictionary sharePoint) : base(type, id, serializedAdditionalRawData) - { - SharePoint = sharePoint; - } - - /// Initializes a new instance of for deserialization. - internal RunStepSharepointToolCall() - { - } - - /// Reserved for future use. - public IReadOnlyDictionary SharePoint { get; } - } -} diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepStreamEvent.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepStreamEvent.cs index 840165d54f19..56b4cb4f09d8 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepStreamEvent.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepStreamEvent.cs @@ -22,28 +22,28 @@ public RunStepStreamEvent(string value) _value = value ?? throw new ArgumentNullException(nameof(value)); } - private const string CreatedValue = "thread.run.step.created"; - private const string InProgressValue = "thread.run.step.in_progress"; - private const string DeltaValue = "thread.run.step.delta"; - private const string CompletedValue = "thread.run.step.completed"; - private const string FailedValue = "thread.run.step.failed"; - private const string CancelledValue = "thread.run.step.cancelled"; - private const string ExpiredValue = "thread.run.step.expired"; + private const string RunStepCreatedValue = "thread.run.step.created"; + private const string RunStepInProgressValue = "thread.run.step.in_progress"; + private const string RunStepDeltaValue = "thread.run.step.delta"; + private const string RunStepCompletedValue = "thread.run.step.completed"; + private const string RunStepFailedValue = "thread.run.step.failed"; + private const string RunStepCancelledValue = "thread.run.step.cancelled"; + private const string RunStepExpiredValue = "thread.run.step.expired"; /// Event sent when a new thread run step is created. The data of this event is of type RunStep. - public static RunStepStreamEvent Created { get; } = new RunStepStreamEvent(CreatedValue); + public static RunStepStreamEvent RunStepCreated { get; } = new RunStepStreamEvent(RunStepCreatedValue); /// Event sent when a run step moves to `in_progress` status. The data of this event is of type RunStep. - public static RunStepStreamEvent InProgress { get; } = new RunStepStreamEvent(InProgressValue); + public static RunStepStreamEvent RunStepInProgress { get; } = new RunStepStreamEvent(RunStepInProgressValue); /// Event sent when a run step is being streamed. The data of this event is of type RunStepDeltaChunk. - public static RunStepStreamEvent Delta { get; } = new RunStepStreamEvent(DeltaValue); + public static RunStepStreamEvent RunStepDelta { get; } = new RunStepStreamEvent(RunStepDeltaValue); /// Event sent when a run step is completed. The data of this event is of type RunStep. - public static RunStepStreamEvent Completed { get; } = new RunStepStreamEvent(CompletedValue); + public static RunStepStreamEvent RunStepCompleted { get; } = new RunStepStreamEvent(RunStepCompletedValue); /// Event sent when a run step fails. The data of this event is of type RunStep. - public static RunStepStreamEvent Failed { get; } = new RunStepStreamEvent(FailedValue); + public static RunStepStreamEvent RunStepFailed { get; } = new RunStepStreamEvent(RunStepFailedValue); /// Event sent when a run step is cancelled. The data of this event is of type RunStep. - public static RunStepStreamEvent Cancelled { get; } = new RunStepStreamEvent(CancelledValue); + public static RunStepStreamEvent RunStepCancelled { get; } = new RunStepStreamEvent(RunStepCancelledValue); /// Event sent when a run step is expired. The data of this event is of type RunStep. - public static RunStepStreamEvent Expired { get; } = new RunStepStreamEvent(ExpiredValue); + public static RunStepStreamEvent RunStepExpired { get; } = new RunStepStreamEvent(RunStepExpiredValue); /// Determines if two values are the same. public static bool operator ==(RunStepStreamEvent left, RunStepStreamEvent right) => left.Equals(right); /// Determines if two values are not the same. diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepToolCall.Serialization.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepToolCall.Serialization.cs index 75934e58dfca..a691ba0270f9 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepToolCall.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepToolCall.Serialization.cs @@ -80,14 +80,11 @@ internal static RunStepToolCall DeserializeRunStepToolCall(JsonElement element, switch (discriminator.GetString()) { case "azure_ai_search": return RunStepAzureAISearchToolCall.DeserializeRunStepAzureAISearchToolCall(element, options); - case "bing_custom_search": return RunStepBingCustomSearchToolCall.DeserializeRunStepBingCustomSearchToolCall(element, options); case "bing_grounding": return RunStepBingGroundingToolCall.DeserializeRunStepBingGroundingToolCall(element, options); case "code_interpreter": return RunStepCodeInterpreterToolCall.DeserializeRunStepCodeInterpreterToolCall(element, options); - case "fabric_dataagent": return RunStepMicrosoftFabricToolCall.DeserializeRunStepMicrosoftFabricToolCall(element, options); case "file_search": return RunStepFileSearchToolCall.DeserializeRunStepFileSearchToolCall(element, options); case "function": return RunStepFunctionToolCall.DeserializeRunStepFunctionToolCall(element, options); case "openapi": return RunStepOpenAPIToolCall.DeserializeRunStepOpenAPIToolCall(element, options); - case "sharepoint_grounding": return RunStepSharepointToolCall.DeserializeRunStepSharepointToolCall(element, options); } } return UnknownRunStepToolCall.DeserializeUnknownRunStepToolCall(element, options); diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepToolCall.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepToolCall.cs index 2baae9a8d283..f8e3e27b1338 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepToolCall.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepToolCall.cs @@ -13,7 +13,7 @@ namespace Azure.AI.Agents.Persistent /// /// An abstract representation of a detailed tool call as recorded within a run step for an existing run. /// 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 , , , , , , , and . + /// The available derived classes include , , , , and . /// public abstract partial class RunStepToolCall { diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepToolCallDetails.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepToolCallDetails.cs index efea73eed8eb..08bfe0d6e0d5 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepToolCallDetails.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStepToolCallDetails.cs @@ -18,7 +18,7 @@ public partial class RunStepToolCallDetails : RunStepDetails /// /// A list of tool call details for this run step. /// 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 , , , , , , , and . + /// The available derived classes include , , , , and . /// /// is null. internal RunStepToolCallDetails(IEnumerable toolCalls) @@ -35,7 +35,7 @@ internal RunStepToolCallDetails(IEnumerable toolCalls) /// /// A list of tool call details for this run step. /// 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 , , , , , , , and . + /// The available derived classes include , , , , and . /// internal RunStepToolCallDetails(RunStepType type, IDictionary serializedAdditionalRawData, IReadOnlyList toolCalls) : base(type, serializedAdditionalRawData) { @@ -50,7 +50,7 @@ internal RunStepToolCallDetails() /// /// A list of tool call details for this run step. /// 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 , , , , , , , and . + /// The available derived classes include , , , , and . /// public IReadOnlyList ToolCalls { get; } } diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ServicePatterns.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ServicePatterns.cs new file mode 100644 index 000000000000..408c916268f0 --- /dev/null +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ServicePatterns.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using Azure.Core; +using Azure.Core.Pipeline; + +namespace Azure.AI.Agents.Persistent +{ + // Data plane generated sub-client. + /// The ServicePatterns sub-client. + public partial class ServicePatterns + { + private static readonly string[] AuthorizationScopes = new string[] { "https://ai.azure.com/.default" }; + private readonly TokenCredential _tokenCredential; + private readonly HttpPipeline _pipeline; + private readonly Uri _endpoint; + + /// The ClientDiagnostics is used to provide tracing support for the client library. + internal ClientDiagnostics ClientDiagnostics { get; } + + /// The HTTP pipeline for sending and receiving REST requests and responses. + public virtual HttpPipeline Pipeline => _pipeline; + + /// Initializes a new instance of ServicePatterns for mocking. + protected ServicePatterns() + { + } + + /// Initializes a new instance of ServicePatterns. + /// The handler for diagnostic messaging in the client. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// The token credential to copy. + /// Project endpoint in the form of: https://<aiservices-id>.services.ai.azure.com/api/projects/<project-name>. + internal ServicePatterns(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, TokenCredential tokenCredential, Uri endpoint) + { + ClientDiagnostics = clientDiagnostics; + _pipeline = pipeline; + _tokenCredential = tokenCredential; + _endpoint = endpoint; + } + } +} diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/SharepointToolDefinition.Serialization.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/SharepointToolDefinition.Serialization.cs deleted file mode 100644 index 6a039775a53f..000000000000 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/SharepointToolDefinition.Serialization.cs +++ /dev/null @@ -1,134 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Agents.Persistent -{ - public partial class SharepointToolDefinition : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(SharepointToolDefinition)} does not support writing '{format}' format."); - } - - base.JsonModelWriteCore(writer, options); - writer.WritePropertyName("sharepoint_grounding"u8); - writer.WriteObjectValue(SharepointGrounding, options); - } - - SharepointToolDefinition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(SharepointToolDefinition)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeSharepointToolDefinition(document.RootElement, options); - } - - internal static SharepointToolDefinition DeserializeSharepointToolDefinition(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - ToolConnectionList sharepointGrounding = default; - string type = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("sharepoint_grounding"u8)) - { - sharepointGrounding = ToolConnectionList.DeserializeToolConnectionList(property.Value, options); - continue; - } - if (property.NameEquals("type"u8)) - { - type = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new SharepointToolDefinition(type, serializedAdditionalRawData, sharepointGrounding); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options, AzureAIAgentsPersistentContext.Default); - default: - throw new FormatException($"The model {nameof(SharepointToolDefinition)} does not support writing '{options.Format}' format."); - } - } - - SharepointToolDefinition IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeSharepointToolDefinition(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(SharepointToolDefinition)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static new SharepointToolDefinition FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeSharepointToolDefinition(document.RootElement); - } - - /// Convert into a . - internal override RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/SharepointToolDefinition.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/SharepointToolDefinition.cs deleted file mode 100644 index d537d9561dc5..000000000000 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/SharepointToolDefinition.cs +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Agents.Persistent -{ - /// The input definition information for a sharepoint tool as used to configure an agent. - public partial class SharepointToolDefinition : ToolDefinition - { - /// Initializes a new instance of . - /// The list of connections used by the SharePoint tool. - /// is null. - public SharepointToolDefinition(ToolConnectionList sharepointGrounding) - { - Argument.AssertNotNull(sharepointGrounding, nameof(sharepointGrounding)); - - Type = "sharepoint_grounding"; - SharepointGrounding = sharepointGrounding; - } - - /// Initializes a new instance of . - /// The object type. - /// Keeps track of any properties unknown to the library. - /// The list of connections used by the SharePoint tool. - internal SharepointToolDefinition(string type, IDictionary serializedAdditionalRawData, ToolConnectionList sharepointGrounding) : base(type, serializedAdditionalRawData) - { - SharepointGrounding = sharepointGrounding; - } - - /// Initializes a new instance of for deserialization. - internal SharepointToolDefinition() - { - } - - /// The list of connections used by the SharePoint tool. - public ToolConnectionList SharepointGrounding { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ThreadMessages.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ThreadMessages.cs index 9e2ef80a7334..33c142627adf 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ThreadMessages.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ThreadMessages.cs @@ -71,6 +71,7 @@ internal ThreadMessages(ClientDiagnostics clientDiagnostics, HttpPipeline pipeli /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. + /// public virtual async Task> CreateMessageAsync(string threadId, MessageRole role, BinaryData content, IEnumerable attachments = null, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); @@ -101,6 +102,7 @@ public virtual async Task> CreateMessageAsync( /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. + /// public virtual Response CreateMessage(string threadId, MessageRole role, BinaryData content, IEnumerable attachments = null, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); @@ -134,6 +136,7 @@ public virtual Response CreateMessage(string threadId, /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual async Task CreateMessageAsync(string threadId, RequestContent content, RequestContext context = null) { Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); @@ -175,6 +178,7 @@ public virtual async Task CreateMessageAsync(string threadId, RequestC /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual Response CreateMessage(string threadId, RequestContent content, RequestContext context = null) { Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); @@ -200,6 +204,7 @@ public virtual Response CreateMessage(string threadId, RequestContent content, R /// The cancellation token to use. /// or is null. /// or is an empty string, and was expected to be non-empty. + /// public virtual async Task> GetMessageAsync(string threadId, string messageId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); @@ -216,6 +221,7 @@ public virtual async Task> GetMessageAsync(str /// The cancellation token to use. /// or is null. /// or is an empty string, and was expected to be non-empty. + /// public virtual Response GetMessage(string threadId, string messageId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); @@ -248,6 +254,7 @@ public virtual Response GetMessage(string threadId, str /// or is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual async Task GetMessageAsync(string threadId, string messageId, RequestContext context) { Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); @@ -289,6 +296,7 @@ public virtual async Task GetMessageAsync(string threadId, string mess /// or is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual Response GetMessage(string threadId, string messageId, RequestContext context) { Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); @@ -315,6 +323,7 @@ public virtual Response GetMessage(string threadId, string messageId, RequestCon /// The cancellation token to use. /// or is null. /// or is an empty string, and was expected to be non-empty. + /// public virtual async Task> UpdateMessageAsync(string threadId, string messageId, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); @@ -333,6 +342,7 @@ public virtual async Task> UpdateMessageAsync( /// The cancellation token to use. /// or is null. /// or is an empty string, and was expected to be non-empty. + /// public virtual Response UpdateMessage(string threadId, string messageId, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); @@ -367,6 +377,7 @@ public virtual Response UpdateMessage(string threadId, /// or is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual async Task UpdateMessageAsync(string threadId, string messageId, RequestContent content, RequestContext context = null) { Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); @@ -410,6 +421,7 @@ public virtual async Task UpdateMessageAsync(string threadId, string m /// or is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual Response UpdateMessage(string threadId, string messageId, RequestContent content, RequestContext context = null) { Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ThreadRun.Serialization.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ThreadRun.Serialization.cs index c4a4245b9c3a..5b64907ce6f0 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ThreadRun.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ThreadRun.Serialization.cs @@ -316,7 +316,7 @@ internal static ThreadRun DeserializeThreadRun(JsonElement element, ModelReaderW BinaryData toolChoice = default; BinaryData responseFormat = default; IReadOnlyDictionary metadata = default; - UpdateToolResourcesOptions toolResources = default; + ToolResources toolResources = default; bool parallelToolCalls = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); @@ -529,7 +529,7 @@ internal static ThreadRun DeserializeThreadRun(JsonElement element, ModelReaderW toolResources = null; continue; } - toolResources = UpdateToolResourcesOptions.DeserializeUpdateToolResourcesOptions(property.Value, options); + toolResources = ToolResources.DeserializeToolResources(property.Value, options); continue; } if (property.NameEquals("parallel_tool_calls"u8)) diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ThreadRun.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ThreadRun.cs index 195dfe8c9d4d..7c927e9a8cdf 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ThreadRun.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ThreadRun.cs @@ -57,7 +57,7 @@ public partial class ThreadRun /// /// The overridden enabled tools used for this agent thread run. /// 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 , , , , , , , , , and . + /// The available derived classes include , , , , , , and . /// /// The Unix timestamp, in seconds, representing when this object was created. /// The Unix timestamp, in seconds, representing when this item expires. @@ -126,7 +126,7 @@ internal ThreadRun(string id, string threadId, string assistantId, RunStatus sta /// /// The overridden enabled tools used for this agent thread run. /// 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 , , , , , , , , , and . + /// The available derived classes include , , , , , , and . /// /// The Unix timestamp, in seconds, representing when this object was created. /// The Unix timestamp, in seconds, representing when this item expires. @@ -147,7 +147,7 @@ internal ThreadRun(string id, string threadId, string assistantId, RunStatus sta /// Override the tools the agent can use for this run. This is useful for modifying the behavior on a per-run basis. /// Determines if tools can be executed in parallel within the run. /// Keeps track of any properties unknown to the library. - internal ThreadRun(string id, string @object, string threadId, string assistantId, RunStatus status, RequiredAction requiredAction, RunError lastError, string model, string instructions, IReadOnlyList tools, DateTimeOffset createdAt, DateTimeOffset? expiresAt, DateTimeOffset? startedAt, DateTimeOffset? completedAt, DateTimeOffset? cancelledAt, DateTimeOffset? failedAt, IncompleteRunDetails incompleteDetails, RunCompletionUsage usage, float? temperature, float? topP, int? maxPromptTokens, int? maxCompletionTokens, Truncation truncationStrategy, BinaryData toolChoice, BinaryData responseFormat, IReadOnlyDictionary metadata, UpdateToolResourcesOptions toolResources, bool parallelToolCalls, IDictionary serializedAdditionalRawData) + internal ThreadRun(string id, string @object, string threadId, string assistantId, RunStatus status, RequiredAction requiredAction, RunError lastError, string model, string instructions, IReadOnlyList tools, DateTimeOffset createdAt, DateTimeOffset? expiresAt, DateTimeOffset? startedAt, DateTimeOffset? completedAt, DateTimeOffset? cancelledAt, DateTimeOffset? failedAt, IncompleteRunDetails incompleteDetails, RunCompletionUsage usage, float? temperature, float? topP, int? maxPromptTokens, int? maxCompletionTokens, Truncation truncationStrategy, BinaryData toolChoice, BinaryData responseFormat, IReadOnlyDictionary metadata, ToolResources toolResources, bool parallelToolCalls, IDictionary serializedAdditionalRawData) { Id = id; Object = @object; @@ -209,7 +209,7 @@ internal ThreadRun() /// /// The overridden enabled tools used for this agent thread run. /// 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 , , , , , , , , , and . + /// The available derived classes include , , , , , , and . /// public IReadOnlyList Tools { get; } /// The Unix timestamp, in seconds, representing when this object was created. @@ -334,7 +334,7 @@ internal ThreadRun() /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. public IReadOnlyDictionary Metadata { get; } /// Override the tools the agent can use for this run. This is useful for modifying the behavior on a per-run basis. - public UpdateToolResourcesOptions ToolResources { get; } + public ToolResources ToolResources { get; } /// Determines if tools can be executed in parallel within the run. public bool ParallelToolCalls { get; } } diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ThreadRunSteps.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ThreadRunSteps.cs index e2a831fdb9fb..8fcd9b932e44 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ThreadRunSteps.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ThreadRunSteps.cs @@ -65,6 +65,7 @@ internal ThreadRunSteps(ClientDiagnostics clientDiagnostics, HttpPipeline pipeli /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. + /// public virtual async Task> GetRunStepAsync(string threadId, string runId, string stepId, IEnumerable include = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); @@ -87,6 +88,7 @@ public virtual async Task> GetRunStepAsync(string threadId, st /// The cancellation token to use. /// , or is null. /// , or is an empty string, and was expected to be non-empty. + /// public virtual Response GetRunStep(string threadId, string runId, string stepId, IEnumerable include = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); @@ -125,6 +127,7 @@ public virtual Response GetRunStep(string threadId, string runId, strin /// , or is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual async Task GetRunStepAsync(string threadId, string runId, string stepId, IEnumerable include, RequestContext context) { Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); @@ -172,6 +175,7 @@ public virtual async Task GetRunStepAsync(string threadId, string runI /// , or is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual Response GetRunStep(string threadId, string runId, string stepId, IEnumerable include, RequestContext context) { Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ThreadRuns.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ThreadRuns.cs index 73e1a965b95e..fc8aa73bbf8e 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ThreadRuns.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ThreadRuns.cs @@ -101,6 +101,7 @@ internal ThreadRuns(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. + /// public virtual async Task> CreateRunAsync(string threadId, string assistantId, string overrideModelName = null, string overrideInstructions = null, string additionalInstructions = null, IEnumerable additionalMessages = null, IEnumerable overrideTools = null, bool? stream = null, float? temperature = null, float? topP = null, int? maxPromptTokens = null, int? maxCompletionTokens = null, Truncation truncationStrategy = null, BinaryData toolChoice = null, BinaryData responseFormat = null, bool? parallelToolCalls = null, IReadOnlyDictionary metadata = null, IEnumerable include = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); @@ -178,6 +179,7 @@ public virtual async Task> CreateRunAsync(string threadId, s /// The cancellation token to use. /// or is null. /// is an empty string, and was expected to be non-empty. + /// public virtual Response CreateRun(string threadId, string assistantId, string overrideModelName = null, string overrideInstructions = null, string additionalInstructions = null, IEnumerable additionalMessages = null, IEnumerable overrideTools = null, bool? stream = null, float? temperature = null, float? topP = null, int? maxPromptTokens = null, int? maxCompletionTokens = null, Truncation truncationStrategy = null, BinaryData toolChoice = null, BinaryData responseFormat = null, bool? parallelToolCalls = null, IReadOnlyDictionary metadata = null, IEnumerable include = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); @@ -233,6 +235,7 @@ public virtual Response CreateRun(string threadId, string assistantId /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual async Task CreateRunAsync(string threadId, RequestContent content, IEnumerable include = null, RequestContext context = null) { Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); @@ -279,6 +282,7 @@ public virtual async Task CreateRunAsync(string threadId, RequestConte /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual Response CreateRun(string threadId, RequestContent content, IEnumerable include = null, RequestContext context = null) { Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); @@ -304,6 +308,7 @@ public virtual Response CreateRun(string threadId, RequestContent content, IEnum /// The cancellation token to use. /// or is null. /// or is an empty string, and was expected to be non-empty. + /// public virtual async Task> GetRunAsync(string threadId, string runId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); @@ -320,6 +325,7 @@ public virtual async Task> GetRunAsync(string threadId, stri /// The cancellation token to use. /// or is null. /// or is an empty string, and was expected to be non-empty. + /// public virtual Response GetRun(string threadId, string runId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); @@ -352,6 +358,7 @@ public virtual Response GetRun(string threadId, string runId, Cancell /// or is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual async Task GetRunAsync(string threadId, string runId, RequestContext context) { Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); @@ -393,6 +400,7 @@ public virtual async Task GetRunAsync(string threadId, string runId, R /// or is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual Response GetRun(string threadId, string runId, RequestContext context) { Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); @@ -419,6 +427,7 @@ public virtual Response GetRun(string threadId, string runId, RequestContext con /// The cancellation token to use. /// or is null. /// or is an empty string, and was expected to be non-empty. + /// public virtual async Task> UpdateRunAsync(string threadId, string runId, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); @@ -437,6 +446,7 @@ public virtual async Task> UpdateRunAsync(string threadId, s /// The cancellation token to use. /// or is null. /// or is an empty string, and was expected to be non-empty. + /// public virtual Response UpdateRun(string threadId, string runId, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); @@ -471,6 +481,7 @@ public virtual Response UpdateRun(string threadId, string runId, IRea /// or is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual async Task UpdateRunAsync(string threadId, string runId, RequestContent content, RequestContext context = null) { Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); @@ -514,6 +525,7 @@ public virtual async Task UpdateRunAsync(string threadId, string runId /// or is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual Response UpdateRun(string threadId, string runId, RequestContent content, RequestContext context = null) { Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); @@ -540,6 +552,7 @@ public virtual Response UpdateRun(string threadId, string runId, RequestContent /// The cancellation token to use. /// or is null. /// or is an empty string, and was expected to be non-empty. + /// public virtual async Task> CancelRunAsync(string threadId, string runId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); @@ -556,6 +569,7 @@ public virtual async Task> CancelRunAsync(string threadId, s /// The cancellation token to use. /// or is null. /// or is an empty string, and was expected to be non-empty. + /// public virtual Response CancelRun(string threadId, string runId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); @@ -588,6 +602,7 @@ public virtual Response CancelRun(string threadId, string runId, Canc /// or is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual async Task CancelRunAsync(string threadId, string runId, RequestContext context) { Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); @@ -629,6 +644,7 @@ public virtual async Task CancelRunAsync(string threadId, string runId /// or is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual Response CancelRun(string threadId, string runId, RequestContext context) { Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/Threads.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/Threads.cs index fe578a2d0538..145a16f3fb3f 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/Threads.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/Threads.cs @@ -61,6 +61,7 @@ internal Threads(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Tok /// /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. /// The cancellation token to use. + /// public virtual async Task> CreateThreadAsync(IEnumerable messages = null, ToolResources toolResources = null, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default) { CreateThreadRequest createThreadRequest = new CreateThreadRequest(messages?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), toolResources, metadata ?? new ChangeTrackingDictionary(), null); @@ -78,6 +79,7 @@ public virtual async Task> CreateThreadAsync(IEn /// /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. /// The cancellation token to use. + /// public virtual Response CreateThread(IEnumerable messages = null, ToolResources toolResources = null, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default) { CreateThreadRequest createThreadRequest = new CreateThreadRequest(messages?.ToList() as IReadOnlyList ?? new ChangeTrackingList(), toolResources, metadata ?? new ChangeTrackingDictionary(), null); @@ -106,6 +108,7 @@ public virtual Response CreateThread(IEnumerable is null. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual async Task CreateThreadAsync(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -144,6 +147,7 @@ public virtual async Task CreateThreadAsync(RequestContent content, Re /// is null. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual Response CreateThread(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -167,6 +171,7 @@ public virtual Response CreateThread(RequestContent content, RequestContext cont /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. + /// public virtual async Task> GetThreadAsync(string threadId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); @@ -181,6 +186,7 @@ public virtual async Task> GetThreadAsync(string /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. + /// public virtual Response GetThread(string threadId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); @@ -211,6 +217,7 @@ public virtual Response GetThread(string threadId, Cancel /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual async Task GetThreadAsync(string threadId, RequestContext context) { Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); @@ -250,6 +257,7 @@ public virtual async Task GetThreadAsync(string threadId, RequestConte /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual Response GetThread(string threadId, RequestContext context) { Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); @@ -279,6 +287,7 @@ public virtual Response GetThread(string threadId, RequestContext context) /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. + /// public virtual async Task> UpdateThreadAsync(string threadId, ToolResources toolResources = null, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); @@ -300,6 +309,7 @@ public virtual async Task> UpdateThreadAsync(str /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. + /// public virtual Response UpdateThread(string threadId, ToolResources toolResources = null, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); @@ -332,6 +342,7 @@ public virtual Response UpdateThread(string threadId, Too /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual async Task UpdateThreadAsync(string threadId, RequestContent content, RequestContext context = null) { Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); @@ -373,6 +384,7 @@ public virtual async Task UpdateThreadAsync(string threadId, RequestCo /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual Response UpdateThread(string threadId, RequestContent content, RequestContext context = null) { Argument.AssertNotNullOrEmpty(threadId, nameof(threadId)); diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ToolConnection.Serialization.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ToolConnection.Serialization.cs deleted file mode 100644 index 76ae573eabcc..000000000000 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ToolConnection.Serialization.cs +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Agents.Persistent -{ - public partial class ToolConnection : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ToolConnection)} does not support writing '{format}' format."); - } - - writer.WritePropertyName("connection_id"u8); - writer.WriteStringValue(ConnectionId); - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - ToolConnection IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ToolConnection)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeToolConnection(document.RootElement, options); - } - - internal static ToolConnection DeserializeToolConnection(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - string connectionId = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("connection_id"u8)) - { - connectionId = property.Value.GetString(); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ToolConnection(connectionId, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options, AzureAIAgentsPersistentContext.Default); - default: - throw new FormatException($"The model {nameof(ToolConnection)} does not support writing '{options.Format}' format."); - } - } - - ToolConnection IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeToolConnection(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ToolConnection)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static ToolConnection FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeToolConnection(document.RootElement); - } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ToolConnection.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ToolConnection.cs deleted file mode 100644 index cc6f72bb901c..000000000000 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ToolConnection.cs +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Agents.Persistent -{ - /// A connection resource. - public partial class ToolConnection - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - /// A connection in a ToolConnectionList attached to this tool. - /// is null. - public ToolConnection(string connectionId) - { - Argument.AssertNotNull(connectionId, nameof(connectionId)); - - ConnectionId = connectionId; - } - - /// Initializes a new instance of . - /// A connection in a ToolConnectionList attached to this tool. - /// Keeps track of any properties unknown to the library. - internal ToolConnection(string connectionId, IDictionary serializedAdditionalRawData) - { - ConnectionId = connectionId; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// Initializes a new instance of for deserialization. - internal ToolConnection() - { - } - - /// A connection in a ToolConnectionList attached to this tool. - public string ConnectionId { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ToolConnectionList.Serialization.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ToolConnectionList.Serialization.cs deleted file mode 100644 index 0d4ac6da1f05..000000000000 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ToolConnectionList.Serialization.cs +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Agents.Persistent -{ - public partial class ToolConnectionList : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ToolConnectionList)} does not support writing '{format}' format."); - } - - if (Optional.IsCollectionDefined(ConnectionList)) - { - writer.WritePropertyName("connections"u8); - writer.WriteStartArray(); - foreach (var item in ConnectionList) - { - writer.WriteObjectValue(item, options); - } - writer.WriteEndArray(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - ToolConnectionList IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(ToolConnectionList)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeToolConnectionList(document.RootElement, options); - } - - internal static ToolConnectionList DeserializeToolConnectionList(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IList connections = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("connections"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(ToolConnection.DeserializeToolConnection(item, options)); - } - connections = array; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new ToolConnectionList(connections ?? new ChangeTrackingList(), serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options, AzureAIAgentsPersistentContext.Default); - default: - throw new FormatException($"The model {nameof(ToolConnectionList)} does not support writing '{options.Format}' format."); - } - } - - ToolConnectionList IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeToolConnectionList(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(ToolConnectionList)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static ToolConnectionList FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeToolConnectionList(document.RootElement); - } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ToolConnectionList.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ToolConnectionList.cs deleted file mode 100644 index a6dfc67c583d..000000000000 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ToolConnectionList.cs +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Agents.Persistent -{ - /// A set of connection resources currently used by either the `bing_grounding`, `fabric_dataagent`, or `sharepoint_grounding` tools. - public partial class ToolConnectionList - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - public ToolConnectionList() - { - ConnectionList = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// - /// The connections attached to this tool. There can be a maximum of 1 connection - /// resource attached to the tool. - /// - /// Keeps track of any properties unknown to the library. - internal ToolConnectionList(IList connectionList, IDictionary serializedAdditionalRawData) - { - ConnectionList = connectionList; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// - /// The connections attached to this tool. There can be a maximum of 1 connection - /// resource attached to the tool. - /// - public IList ConnectionList { get; } - } -} diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ToolDefinition.Serialization.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ToolDefinition.Serialization.cs index 6532e2849db9..30a08ddf2a8d 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ToolDefinition.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ToolDefinition.Serialization.cs @@ -79,15 +79,12 @@ internal static ToolDefinition DeserializeToolDefinition(JsonElement element, Mo { case "azure_ai_search": return AzureAISearchToolDefinition.DeserializeAzureAISearchToolDefinition(element, options); case "azure_function": return AzureFunctionToolDefinition.DeserializeAzureFunctionToolDefinition(element, options); - case "bing_custom_search": return BingCustomSearchToolDefinition.DeserializeBingCustomSearchToolDefinition(element, options); case "bing_grounding": return BingGroundingToolDefinition.DeserializeBingGroundingToolDefinition(element, options); case "code_interpreter": return CodeInterpreterToolDefinition.DeserializeCodeInterpreterToolDefinition(element, options); case "connected_agent": return ConnectedAgentToolDefinition.DeserializeConnectedAgentToolDefinition(element, options); - case "fabric_dataagent": return MicrosoftFabricToolDefinition.DeserializeMicrosoftFabricToolDefinition(element, options); case "file_search": return FileSearchToolDefinition.DeserializeFileSearchToolDefinition(element, options); case "function": return FunctionToolDefinition.DeserializeFunctionToolDefinition(element, options); case "openapi": return OpenApiToolDefinition.DeserializeOpenApiToolDefinition(element, options); - case "sharepoint_grounding": return SharepointToolDefinition.DeserializeSharepointToolDefinition(element, options); } } return UnknownToolDefinition.DeserializeUnknownToolDefinition(element, options); diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ToolDefinition.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ToolDefinition.cs index a632f3baa004..4d5d6347f9f6 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ToolDefinition.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ToolDefinition.cs @@ -13,7 +13,7 @@ namespace Azure.AI.Agents.Persistent /// /// An abstract representation of an input tool definition that an agent can use. /// 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 , , , , , , , , , and . + /// The available derived classes include , , , , , , and . /// public abstract partial class ToolDefinition { diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ToolResources.Serialization.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ToolResources.Serialization.cs index 8ea877d7f294..0750da4cdee9 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ToolResources.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ToolResources.Serialization.cs @@ -88,7 +88,7 @@ internal static ToolResources DeserializeToolResources(JsonElement element, Mode } CodeInterpreterToolResource codeInterpreter = default; FileSearchToolResource fileSearch = default; - AzureAISearchResource azureAiSearch = default; + AzureAISearchToolResource azureAiSearch = default; IDictionary serializedAdditionalRawData = default; Dictionary rawDataDictionary = new Dictionary(); foreach (var property in element.EnumerateObject()) @@ -117,7 +117,7 @@ internal static ToolResources DeserializeToolResources(JsonElement element, Mode { continue; } - azureAiSearch = AzureAISearchResource.DeserializeAzureAISearchResource(property.Value, options); + azureAiSearch = AzureAISearchToolResource.DeserializeAzureAISearchToolResource(property.Value, options); continue; } if (options.Format != "W") diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ToolResources.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ToolResources.cs index b4932dbc99d5..4e6fa850ae9b 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ToolResources.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/ToolResources.cs @@ -59,7 +59,7 @@ public ToolResources() /// Resources to be used by the `file_search` tool consisting of vector store IDs. /// Resources to be used by the `azure_ai_search` tool consisting of index IDs and names. /// Keeps track of any properties unknown to the library. - internal ToolResources(CodeInterpreterToolResource codeInterpreter, FileSearchToolResource fileSearch, AzureAISearchResource azureAISearch, IDictionary serializedAdditionalRawData) + internal ToolResources(CodeInterpreterToolResource codeInterpreter, FileSearchToolResource fileSearch, AzureAISearchToolResource azureAISearch, IDictionary serializedAdditionalRawData) { CodeInterpreter = codeInterpreter; FileSearch = fileSearch; @@ -72,6 +72,6 @@ internal ToolResources(CodeInterpreterToolResource codeInterpreter, FileSearchTo /// Resources to be used by the `file_search` tool consisting of vector store IDs. public FileSearchToolResource FileSearch { get; set; } /// Resources to be used by the `azure_ai_search` tool consisting of index IDs and names. - public AzureAISearchResource AzureAISearch { get; set; } + public AzureAISearchToolResource AzureAISearch { get; set; } } } diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/UpdateAgentRequest.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/UpdateAgentRequest.cs index 7b84d42ae316..4d769e19309a 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/UpdateAgentRequest.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/UpdateAgentRequest.cs @@ -60,7 +60,7 @@ internal UpdateAgentRequest() /// /// The modified collection of tools to enable for the agent. /// 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 , , , , , , , , , and . + /// The available derived classes include , , , , , , and . /// /// /// A set of resources that are used by the agent's tools. The resources are specific to the type of tool. For example, @@ -105,7 +105,7 @@ internal UpdateAgentRequest(string model, string name, string description, strin /// /// The modified collection of tools to enable for the agent. /// 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 , , , , , , , , , and . + /// The available derived classes include , , , , , , and . /// public IReadOnlyList Tools { get; } /// diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/UpdateCodeInterpreterToolResourceOptions.Serialization.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/UpdateCodeInterpreterToolResourceOptions.Serialization.cs deleted file mode 100644 index 5e4fae6a5921..000000000000 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/UpdateCodeInterpreterToolResourceOptions.Serialization.cs +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Agents.Persistent -{ - public partial class UpdateCodeInterpreterToolResourceOptions : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(UpdateCodeInterpreterToolResourceOptions)} does not support writing '{format}' format."); - } - - if (Optional.IsCollectionDefined(FileIds)) - { - writer.WritePropertyName("file_ids"u8); - writer.WriteStartArray(); - foreach (var item in FileIds) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - UpdateCodeInterpreterToolResourceOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(UpdateCodeInterpreterToolResourceOptions)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeUpdateCodeInterpreterToolResourceOptions(document.RootElement, options); - } - - internal static UpdateCodeInterpreterToolResourceOptions DeserializeUpdateCodeInterpreterToolResourceOptions(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IList fileIds = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("file_ids"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - fileIds = array; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new UpdateCodeInterpreterToolResourceOptions(fileIds ?? new ChangeTrackingList(), serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options, AzureAIAgentsPersistentContext.Default); - default: - throw new FormatException($"The model {nameof(UpdateCodeInterpreterToolResourceOptions)} does not support writing '{options.Format}' format."); - } - } - - UpdateCodeInterpreterToolResourceOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeUpdateCodeInterpreterToolResourceOptions(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(UpdateCodeInterpreterToolResourceOptions)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static UpdateCodeInterpreterToolResourceOptions FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeUpdateCodeInterpreterToolResourceOptions(document.RootElement); - } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/UpdateCodeInterpreterToolResourceOptions.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/UpdateCodeInterpreterToolResourceOptions.cs deleted file mode 100644 index 1f9bea0cb5c5..000000000000 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/UpdateCodeInterpreterToolResourceOptions.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Agents.Persistent -{ - /// Request object to update `code_interpreted` tool resources. - public partial class UpdateCodeInterpreterToolResourceOptions - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - public UpdateCodeInterpreterToolResourceOptions() - { - FileIds = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// A list of file IDs to override the current list of the agent. - /// Keeps track of any properties unknown to the library. - internal UpdateCodeInterpreterToolResourceOptions(IList fileIds, IDictionary serializedAdditionalRawData) - { - FileIds = fileIds; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// A list of file IDs to override the current list of the agent. - public IList FileIds { get; } - } -} diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/UpdateFileSearchToolResourceOptions.Serialization.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/UpdateFileSearchToolResourceOptions.Serialization.cs deleted file mode 100644 index 1f76fc928e42..000000000000 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/UpdateFileSearchToolResourceOptions.Serialization.cs +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Agents.Persistent -{ - public partial class UpdateFileSearchToolResourceOptions : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(UpdateFileSearchToolResourceOptions)} does not support writing '{format}' format."); - } - - if (Optional.IsCollectionDefined(VectorStoreIds)) - { - writer.WritePropertyName("vector_store_ids"u8); - writer.WriteStartArray(); - foreach (var item in VectorStoreIds) - { - writer.WriteStringValue(item); - } - writer.WriteEndArray(); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - UpdateFileSearchToolResourceOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(UpdateFileSearchToolResourceOptions)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeUpdateFileSearchToolResourceOptions(document.RootElement, options); - } - - internal static UpdateFileSearchToolResourceOptions DeserializeUpdateFileSearchToolResourceOptions(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - IList vectorStoreIds = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("vector_store_ids"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - List array = new List(); - foreach (var item in property.Value.EnumerateArray()) - { - array.Add(item.GetString()); - } - vectorStoreIds = array; - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new UpdateFileSearchToolResourceOptions(vectorStoreIds ?? new ChangeTrackingList(), serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options, AzureAIAgentsPersistentContext.Default); - default: - throw new FormatException($"The model {nameof(UpdateFileSearchToolResourceOptions)} does not support writing '{options.Format}' format."); - } - } - - UpdateFileSearchToolResourceOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeUpdateFileSearchToolResourceOptions(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(UpdateFileSearchToolResourceOptions)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static UpdateFileSearchToolResourceOptions FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeUpdateFileSearchToolResourceOptions(document.RootElement); - } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/UpdateFileSearchToolResourceOptions.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/UpdateFileSearchToolResourceOptions.cs deleted file mode 100644 index 70ef70317495..000000000000 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/UpdateFileSearchToolResourceOptions.cs +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Agents.Persistent -{ - /// Request object to update `file_search` tool resources. - public partial class UpdateFileSearchToolResourceOptions - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - public UpdateFileSearchToolResourceOptions() - { - VectorStoreIds = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// A list of vector store IDs to override the current list of the agent. - /// Keeps track of any properties unknown to the library. - internal UpdateFileSearchToolResourceOptions(IList vectorStoreIds, IDictionary serializedAdditionalRawData) - { - VectorStoreIds = vectorStoreIds; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// A list of vector store IDs to override the current list of the agent. - public IList VectorStoreIds { get; } - } -} diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/UpdateToolResourcesOptions.Serialization.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/UpdateToolResourcesOptions.Serialization.cs deleted file mode 100644 index a51b16bbd7ab..000000000000 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/UpdateToolResourcesOptions.Serialization.cs +++ /dev/null @@ -1,179 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.ClientModel.Primitives; -using System.Collections.Generic; -using System.Text.Json; -using Azure.Core; - -namespace Azure.AI.Agents.Persistent -{ - public partial class UpdateToolResourcesOptions : IUtf8JsonSerializable, IJsonModel - { - void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); - - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - writer.WriteStartObject(); - JsonModelWriteCore(writer, options); - writer.WriteEndObject(); - } - - /// The JSON writer. - /// The client options for reading and writing models. - protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(UpdateToolResourcesOptions)} does not support writing '{format}' format."); - } - - if (Optional.IsDefined(CodeInterpreter)) - { - writer.WritePropertyName("code_interpreter"u8); - writer.WriteObjectValue(CodeInterpreter, options); - } - if (Optional.IsDefined(FileSearch)) - { - writer.WritePropertyName("file_search"u8); - writer.WriteObjectValue(FileSearch, options); - } - if (Optional.IsDefined(AzureAISearch)) - { - writer.WritePropertyName("azure_ai_search"u8); - writer.WriteObjectValue(AzureAISearch, options); - } - if (options.Format != "W" && _serializedAdditionalRawData != null) - { - foreach (var item in _serializedAdditionalRawData) - { - writer.WritePropertyName(item.Key); -#if NET6_0_OR_GREATER - writer.WriteRawValue(item.Value); -#else - using (JsonDocument document = JsonDocument.Parse(item.Value, ModelSerializationExtensions.JsonDocumentOptions)) - { - JsonSerializer.Serialize(writer, document.RootElement); - } -#endif - } - } - } - - UpdateToolResourcesOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - if (format != "J") - { - throw new FormatException($"The model {nameof(UpdateToolResourcesOptions)} does not support reading '{format}' format."); - } - - using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeUpdateToolResourcesOptions(document.RootElement, options); - } - - internal static UpdateToolResourcesOptions DeserializeUpdateToolResourcesOptions(JsonElement element, ModelReaderWriterOptions options = null) - { - options ??= ModelSerializationExtensions.WireOptions; - - if (element.ValueKind == JsonValueKind.Null) - { - return null; - } - UpdateCodeInterpreterToolResourceOptions codeInterpreter = default; - UpdateFileSearchToolResourceOptions fileSearch = default; - AzureAISearchResource azureAiSearch = default; - IDictionary serializedAdditionalRawData = default; - Dictionary rawDataDictionary = new Dictionary(); - foreach (var property in element.EnumerateObject()) - { - if (property.NameEquals("code_interpreter"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - codeInterpreter = UpdateCodeInterpreterToolResourceOptions.DeserializeUpdateCodeInterpreterToolResourceOptions(property.Value, options); - continue; - } - if (property.NameEquals("file_search"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - fileSearch = UpdateFileSearchToolResourceOptions.DeserializeUpdateFileSearchToolResourceOptions(property.Value, options); - continue; - } - if (property.NameEquals("azure_ai_search"u8)) - { - if (property.Value.ValueKind == JsonValueKind.Null) - { - continue; - } - azureAiSearch = AzureAISearchResource.DeserializeAzureAISearchResource(property.Value, options); - continue; - } - if (options.Format != "W") - { - rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); - } - } - serializedAdditionalRawData = rawDataDictionary; - return new UpdateToolResourcesOptions(codeInterpreter, fileSearch, azureAiSearch, serializedAdditionalRawData); - } - - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - return ModelReaderWriter.Write(this, options, AzureAIAgentsPersistentContext.Default); - default: - throw new FormatException($"The model {nameof(UpdateToolResourcesOptions)} does not support writing '{options.Format}' format."); - } - } - - UpdateToolResourcesOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) - { - var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; - - switch (format) - { - case "J": - { - using JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeUpdateToolResourcesOptions(document.RootElement, options); - } - default: - throw new FormatException($"The model {nameof(UpdateToolResourcesOptions)} does not support reading '{options.Format}' format."); - } - } - - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; - - /// Deserializes the model from a raw response. - /// The response to deserialize the model from. - internal static UpdateToolResourcesOptions FromResponse(Response response) - { - using var document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); - return DeserializeUpdateToolResourcesOptions(document.RootElement); - } - - /// Convert into a . - internal virtual RequestContent ToRequestContent() - { - var content = new Utf8JsonRequestContent(); - content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); - return content; - } - } -} diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/UpdateToolResourcesOptions.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/UpdateToolResourcesOptions.cs deleted file mode 100644 index ff39241299ab..000000000000 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/UpdateToolResourcesOptions.cs +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. - -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Agents.Persistent -{ - /// - /// Request object. A set of resources that are used by the agent's tools. The resources are specific to the type of tool. - /// For example, the `code_interpreter` tool requires a list of file IDs, while the `file_search` tool requires a list of - /// vector store IDs. - /// - public partial class UpdateToolResourcesOptions - { - /// - /// Keeps track of any properties unknown to the library. - /// - /// To assign an object to the value of this property use . - /// - /// - /// To assign an already formatted json string to this property use . - /// - /// - /// Examples: - /// - /// - /// BinaryData.FromObjectAsJson("foo") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromString("\"foo\"") - /// Creates a payload of "foo". - /// - /// - /// BinaryData.FromObjectAsJson(new { key = "value" }) - /// Creates a payload of { "key": "value" }. - /// - /// - /// BinaryData.FromString("{\"key\": \"value\"}") - /// Creates a payload of { "key": "value" }. - /// - /// - /// - /// - private IDictionary _serializedAdditionalRawData; - - /// Initializes a new instance of . - public UpdateToolResourcesOptions() - { - } - - /// Initializes a new instance of . - /// - /// Overrides the list of file IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files - /// associated with the tool. - /// - /// Overrides the vector store attached to this agent. There can be a maximum of 1 vector store attached to the agent. - /// Overrides the resources to be used by the `azure_ai_search` tool consisting of index IDs and names. - /// Keeps track of any properties unknown to the library. - internal UpdateToolResourcesOptions(UpdateCodeInterpreterToolResourceOptions codeInterpreter, UpdateFileSearchToolResourceOptions fileSearch, AzureAISearchResource azureAISearch, IDictionary serializedAdditionalRawData) - { - CodeInterpreter = codeInterpreter; - FileSearch = fileSearch; - AzureAISearch = azureAISearch; - _serializedAdditionalRawData = serializedAdditionalRawData; - } - - /// - /// Overrides the list of file IDs made available to the `code_interpreter` tool. There can be a maximum of 20 files - /// associated with the tool. - /// - public UpdateCodeInterpreterToolResourceOptions CodeInterpreter { get; set; } - /// Overrides the vector store attached to this agent. There can be a maximum of 1 vector store attached to the agent. - public UpdateFileSearchToolResourceOptions FileSearch { get; set; } - /// Overrides the resources to be used by the `azure_ai_search` tool consisting of index IDs and names. - public AzureAISearchResource AzureAISearch { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/UploadFileRequest.Serialization.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/UploadFileRequest.Serialization.cs index 630757d555d5..556457d136fb 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/UploadFileRequest.Serialization.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/UploadFileRequest.Serialization.cs @@ -36,7 +36,14 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("file"u8); - writer.WriteObjectValue(Data, options); +#if NET6_0_OR_GREATER + writer.WriteRawValue(global::System.BinaryData.FromStream(Data)); +#else + using (JsonDocument document = JsonDocument.Parse(BinaryData.FromStream(Data), ModelSerializationExtensions.JsonDocumentOptions)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif writer.WritePropertyName("purpose"u8); writer.WriteStringValue(Purpose.ToString()); if (Optional.IsDefined(Filename)) @@ -81,7 +88,7 @@ internal static UploadFileRequest DeserializeUploadFileRequest(JsonElement eleme { return null; } - File file = default; + Stream file = default; PersistentAgentFilePurpose purpose = default; string filename = default; IDictionary serializedAdditionalRawData = default; @@ -90,7 +97,7 @@ internal static UploadFileRequest DeserializeUploadFileRequest(JsonElement eleme { if (property.NameEquals("file"u8)) { - file = File.DeserializeFile(property.Value, options); + file = BinaryData.FromString(property.Value.GetRawText()).ToStream(); continue; } if (property.NameEquals("purpose"u8)) diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/UploadFileRequest.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/UploadFileRequest.cs index de3f5be1f220..8237de65309a 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/UploadFileRequest.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/UploadFileRequest.cs @@ -7,6 +7,7 @@ using System; using System.Collections.Generic; +using System.IO; namespace Azure.AI.Agents.Persistent { @@ -49,7 +50,7 @@ internal partial class UploadFileRequest /// The file data, in bytes. /// The intended purpose of the uploaded file. Use `assistants` for Agents and Message files, `vision` for Agents image file inputs, `batch` for Batch API, and `fine-tune` for Fine-tuning. /// is null. - public UploadFileRequest(File data, PersistentAgentFilePurpose purpose) + public UploadFileRequest(Stream data, PersistentAgentFilePurpose purpose) { Argument.AssertNotNull(data, nameof(data)); @@ -62,7 +63,7 @@ public UploadFileRequest(File data, PersistentAgentFilePurpose purpose) /// The intended purpose of the uploaded file. Use `assistants` for Agents and Message files, `vision` for Agents image file inputs, `batch` for Batch API, and `fine-tune` for Fine-tuning. /// The name of the file. /// Keeps track of any properties unknown to the library. - internal UploadFileRequest(File data, PersistentAgentFilePurpose purpose, string filename, IDictionary serializedAdditionalRawData) + internal UploadFileRequest(Stream data, PersistentAgentFilePurpose purpose, string filename, IDictionary serializedAdditionalRawData) { Data = data; Purpose = purpose; @@ -76,7 +77,7 @@ internal UploadFileRequest() } /// The file data, in bytes. - public File Data { get; } + public Stream Data { get; } /// The intended purpose of the uploaded file. Use `assistants` for Agents and Message files, `vision` for Agents image file inputs, `batch` for Batch API, and `fine-tune` for Fine-tuning. public PersistentAgentFilePurpose Purpose { get; } /// The name of the file. diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/VectorStoreFileBatches.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/VectorStoreFileBatches.cs index 0f5fac22d94d..f163ba4b80a2 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/VectorStoreFileBatches.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/VectorStoreFileBatches.cs @@ -63,6 +63,7 @@ internal VectorStoreFileBatches(ClientDiagnostics clientDiagnostics, HttpPipelin /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. + /// public virtual async Task> CreateVectorStoreFileBatchAsync(string vectorStoreId, IEnumerable fileIds = null, IEnumerable dataSources = null, VectorStoreChunkingStrategy chunkingStrategy = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); @@ -81,6 +82,7 @@ public virtual async Task> CreateVectorStoreFileB /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. + /// public virtual Response CreateVectorStoreFileBatch(string vectorStoreId, IEnumerable fileIds = null, IEnumerable dataSources = null, VectorStoreChunkingStrategy chunkingStrategy = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); @@ -113,6 +115,7 @@ public virtual Response CreateVectorStoreFileBatch(string /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual async Task CreateVectorStoreFileBatchAsync(string vectorStoreId, RequestContent content, RequestContext context = null) { Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); @@ -154,6 +157,7 @@ public virtual async Task CreateVectorStoreFileBatchAsync(string vecto /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual Response CreateVectorStoreFileBatch(string vectorStoreId, RequestContent content, RequestContext context = null) { Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); @@ -179,6 +183,7 @@ public virtual Response CreateVectorStoreFileBatch(string vectorStoreId, Request /// The cancellation token to use. /// or is null. /// or is an empty string, and was expected to be non-empty. + /// public virtual async Task> GetVectorStoreFileBatchAsync(string vectorStoreId, string batchId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); @@ -195,6 +200,7 @@ public virtual async Task> GetVectorStoreFileBatc /// The cancellation token to use. /// or is null. /// or is an empty string, and was expected to be non-empty. + /// public virtual Response GetVectorStoreFileBatch(string vectorStoreId, string batchId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); @@ -227,6 +233,7 @@ public virtual Response GetVectorStoreFileBatch(string vec /// or is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual async Task GetVectorStoreFileBatchAsync(string vectorStoreId, string batchId, RequestContext context) { Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); @@ -268,6 +275,7 @@ public virtual async Task GetVectorStoreFileBatchAsync(string vectorSt /// or is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual Response GetVectorStoreFileBatch(string vectorStoreId, string batchId, RequestContext context) { Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); @@ -293,6 +301,7 @@ public virtual Response GetVectorStoreFileBatch(string vectorStoreId, string bat /// The cancellation token to use. /// or is null. /// or is an empty string, and was expected to be non-empty. + /// public virtual async Task> CancelVectorStoreFileBatchAsync(string vectorStoreId, string batchId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); @@ -309,6 +318,7 @@ public virtual async Task> CancelVectorStoreFileB /// The cancellation token to use. /// or is null. /// or is an empty string, and was expected to be non-empty. + /// public virtual Response CancelVectorStoreFileBatch(string vectorStoreId, string batchId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); @@ -341,6 +351,7 @@ public virtual Response CancelVectorStoreFileBatch(string /// or is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual async Task CancelVectorStoreFileBatchAsync(string vectorStoreId, string batchId, RequestContext context) { Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); @@ -382,6 +393,7 @@ public virtual async Task CancelVectorStoreFileBatchAsync(string vecto /// or is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual Response CancelVectorStoreFileBatch(string vectorStoreId, string batchId, RequestContext context) { Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); @@ -470,6 +482,7 @@ internal HttpMessage CreateGetVectorStoreFileBatchFilesRequest(string vectorStor { uri.AppendQuery("filter", filter, true); } + uri.AppendQuery("api-version", _apiVersion, true); if (limit != null) { uri.AppendQuery("limit", limit.Value, true); diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/VectorStoreFiles.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/VectorStoreFiles.cs index d67776d9ebf0..cf1164b0ec12 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/VectorStoreFiles.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/VectorStoreFiles.cs @@ -62,6 +62,7 @@ internal VectorStoreFiles(ClientDiagnostics clientDiagnostics, HttpPipeline pipe /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. + /// public virtual async Task> CreateVectorStoreFileAsync(string vectorStoreId, string fileId = null, VectorStoreDataSource dataSource = null, VectorStoreChunkingStrategy chunkingStrategy = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); @@ -80,6 +81,7 @@ public virtual async Task> CreateVectorStoreFileAsync( /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. + /// public virtual Response CreateVectorStoreFile(string vectorStoreId, string fileId = null, VectorStoreDataSource dataSource = null, VectorStoreChunkingStrategy chunkingStrategy = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); @@ -112,6 +114,7 @@ public virtual Response CreateVectorStoreFile(string vectorStor /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual async Task CreateVectorStoreFileAsync(string vectorStoreId, RequestContent content, RequestContext context = null) { Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); @@ -153,6 +156,7 @@ public virtual async Task CreateVectorStoreFileAsync(string vectorStor /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual Response CreateVectorStoreFile(string vectorStoreId, RequestContent content, RequestContext context = null) { Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); @@ -178,6 +182,7 @@ public virtual Response CreateVectorStoreFile(string vectorStoreId, RequestConte /// The cancellation token to use. /// or is null. /// or is an empty string, and was expected to be non-empty. + /// public virtual async Task> GetVectorStoreFileAsync(string vectorStoreId, string fileId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); @@ -194,6 +199,7 @@ public virtual async Task> GetVectorStoreFileAsync(str /// The cancellation token to use. /// or is null. /// or is an empty string, and was expected to be non-empty. + /// public virtual Response GetVectorStoreFile(string vectorStoreId, string fileId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); @@ -226,6 +232,7 @@ public virtual Response GetVectorStoreFile(string vectorStoreId /// or is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual async Task GetVectorStoreFileAsync(string vectorStoreId, string fileId, RequestContext context) { Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); @@ -267,6 +274,7 @@ public virtual async Task GetVectorStoreFileAsync(string vectorStoreId /// or is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual Response GetVectorStoreFile(string vectorStoreId, string fileId, RequestContext context) { Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); diff --git a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/VectorStores.cs b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/VectorStores.cs index 46d62ede6ffd..dc7baba5cd4d 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/VectorStores.cs +++ b/sdk/ai/Azure.AI.Agents.Persistent/src/Generated/VectorStores.cs @@ -60,6 +60,7 @@ internal VectorStores(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline /// The chunking strategy used to chunk the file(s). If not set, will use the auto strategy. Only applicable if file_ids is non-empty. /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. /// The cancellation token to use. + /// public virtual async Task> CreateVectorStoreAsync(IEnumerable fileIds = null, string name = null, VectorStoreConfiguration storeConfiguration = null, VectorStoreExpirationPolicy expiresAfter = null, VectorStoreChunkingStrategy chunkingStrategy = null, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default) { CreateVectorStoreRequest createVectorStoreRequest = new CreateVectorStoreRequest( @@ -83,6 +84,7 @@ public virtual async Task> CreateVectorSto /// The chunking strategy used to chunk the file(s). If not set, will use the auto strategy. Only applicable if file_ids is non-empty. /// A set of up to 16 key/value pairs that can be attached to an object, used for storing additional information about that object in a structured format. Keys may be up to 64 characters in length and values may be up to 512 characters in length. /// The cancellation token to use. + /// public virtual Response CreateVectorStore(IEnumerable fileIds = null, string name = null, VectorStoreConfiguration storeConfiguration = null, VectorStoreExpirationPolicy expiresAfter = null, VectorStoreChunkingStrategy chunkingStrategy = null, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default) { CreateVectorStoreRequest createVectorStoreRequest = new CreateVectorStoreRequest( @@ -118,6 +120,7 @@ public virtual Response CreateVectorStore(IEnumerab /// is null. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual async Task CreateVectorStoreAsync(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -156,6 +159,7 @@ public virtual async Task CreateVectorStoreAsync(RequestContent conten /// is null. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual Response CreateVectorStore(RequestContent content, RequestContext context = null) { Argument.AssertNotNull(content, nameof(content)); @@ -179,6 +183,7 @@ public virtual Response CreateVectorStore(RequestContent content, RequestContext /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. + /// public virtual async Task> GetVectorStoreAsync(string vectorStoreId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); @@ -193,6 +198,7 @@ public virtual async Task> GetVectorStoreA /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. + /// public virtual Response GetVectorStore(string vectorStoreId, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); @@ -223,6 +229,7 @@ public virtual Response GetVectorStore(string vecto /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual async Task GetVectorStoreAsync(string vectorStoreId, RequestContext context) { Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); @@ -262,6 +269,7 @@ public virtual async Task GetVectorStoreAsync(string vectorStoreId, Re /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual Response GetVectorStore(string vectorStoreId, RequestContext context) { Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); @@ -288,6 +296,7 @@ public virtual Response GetVectorStore(string vectorStoreId, RequestContext cont /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. + /// public virtual async Task> ModifyVectorStoreAsync(string vectorStoreId, string name = null, VectorStoreExpirationPolicy expiresAfter = null, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); @@ -306,6 +315,7 @@ public virtual async Task> ModifyVectorSto /// The cancellation token to use. /// is null. /// is an empty string, and was expected to be non-empty. + /// public virtual Response ModifyVectorStore(string vectorStoreId, string name = null, VectorStoreExpirationPolicy expiresAfter = null, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); @@ -338,6 +348,7 @@ public virtual Response ModifyVectorStore(string ve /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual async Task ModifyVectorStoreAsync(string vectorStoreId, RequestContent content, RequestContext context = null) { Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); @@ -379,6 +390,7 @@ public virtual async Task ModifyVectorStoreAsync(string vectorStoreId, /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. /// The response returned from the service. + /// public virtual Response ModifyVectorStore(string vectorStoreId, RequestContent content, RequestContext context = null) { Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId)); diff --git a/sdk/ai/Azure.AI.Agents.Persistent/tests/Generated/Samples/Samples_PersistentAgentsAdministrationClient.cs b/sdk/ai/Azure.AI.Agents.Persistent/tests/Generated/Samples/Samples_PersistentAgentsAdministrationClient.cs new file mode 100644 index 000000000000..0272c2974302 --- /dev/null +++ b/sdk/ai/Azure.AI.Agents.Persistent/tests/Generated/Samples/Samples_PersistentAgentsAdministrationClient.cs @@ -0,0 +1,1125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.AI.Agents.Persistent.Samples +{ + public partial class Samples_PersistentAgentsAdministrationClient + { + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Agents_CreateAgent_CreateAgentMaximumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PersistentAgentsAdministrationClient client = new PersistentAgentsAdministrationClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + model = "jyrgfmhrrrngtonrmo", + name = "zyldigcd", + description = "dhjkjzixwadczfduxpodfrdhgz", + instructions = "haeralumiezrrsaqzmbkkjcfxpqqog", + tools = Array.Empty(), + tool_resources = new + { + code_interpreter = new + { + file_ids = new object[] + { +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul" + }, + data_sources = new object[] + { +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +} + }, + }, + file_search = new + { + vector_store_ids = new object[] + { +"jkrrjfupyxehwacylflmx" + }, + vector_stores = new object[] + { +new +{ +name = "bftl", +configuration = new +{ +data_sources = new object[] +{ +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +} +}, +}, +} + }, + }, + azure_ai_search = new + { + indexes = new object[] + { +new +{ +index_connection_id = "zkqk", +index_name = "yvxhjyiomlffkuboqokcojfd", +query_type = "simple", +top_k = 27, +filter = "jjbewpsjmygox", +index_asset_id = "iwfmzmxzh", +} + }, + }, + }, + temperature = 11F, + top_p = 19F, + metadata = new + { + key8068 = "ebsxjdqlsifbuarpdcrwysf", + }, + }); + Response response = client.CreateAgent(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("model").ToString()); + Console.WriteLine(result.GetProperty("instructions").ToString()); + Console.WriteLine(result.GetProperty("tools")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("tool_resources").ToString()); + Console.WriteLine(result.GetProperty("temperature").ToString()); + Console.WriteLine(result.GetProperty("top_p").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Agents_CreateAgent_CreateAgentMaximumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PersistentAgentsAdministrationClient client = new PersistentAgentsAdministrationClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + model = "jyrgfmhrrrngtonrmo", + name = "zyldigcd", + description = "dhjkjzixwadczfduxpodfrdhgz", + instructions = "haeralumiezrrsaqzmbkkjcfxpqqog", + tools = Array.Empty(), + tool_resources = new + { + code_interpreter = new + { + file_ids = new object[] + { +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul" + }, + data_sources = new object[] + { +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +} + }, + }, + file_search = new + { + vector_store_ids = new object[] + { +"jkrrjfupyxehwacylflmx" + }, + vector_stores = new object[] + { +new +{ +name = "bftl", +configuration = new +{ +data_sources = new object[] +{ +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +} +}, +}, +} + }, + }, + azure_ai_search = new + { + indexes = new object[] + { +new +{ +index_connection_id = "zkqk", +index_name = "yvxhjyiomlffkuboqokcojfd", +query_type = "simple", +top_k = 27, +filter = "jjbewpsjmygox", +index_asset_id = "iwfmzmxzh", +} + }, + }, + }, + temperature = 11F, + top_p = 19F, + metadata = new + { + key8068 = "ebsxjdqlsifbuarpdcrwysf", + }, + }); + Response response = await client.CreateAgentAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("model").ToString()); + Console.WriteLine(result.GetProperty("instructions").ToString()); + Console.WriteLine(result.GetProperty("tools")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("tool_resources").ToString()); + Console.WriteLine(result.GetProperty("temperature").ToString()); + Console.WriteLine(result.GetProperty("top_p").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Agents_CreateAgent_CreateAgentMaximumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PersistentAgentsAdministrationClient client = new PersistentAgentsAdministrationClient(endpoint, credential); + + Response response = client.CreateAgent("jyrgfmhrrrngtonrmo"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Agents_CreateAgent_CreateAgentMaximumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PersistentAgentsAdministrationClient client = new PersistentAgentsAdministrationClient(endpoint, credential); + + Response response = await client.CreateAgentAsync("jyrgfmhrrrngtonrmo"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Agents_CreateAgent_CreateAgentMinimumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PersistentAgentsAdministrationClient client = new PersistentAgentsAdministrationClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + model = "jyrgfmhrrrngtonrmo", + }); + Response response = client.CreateAgent(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("model").ToString()); + Console.WriteLine(result.GetProperty("instructions").ToString()); + Console.WriteLine(result.GetProperty("tools")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("tool_resources").ToString()); + Console.WriteLine(result.GetProperty("temperature").ToString()); + Console.WriteLine(result.GetProperty("top_p").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Agents_CreateAgent_CreateAgentMinimumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PersistentAgentsAdministrationClient client = new PersistentAgentsAdministrationClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + model = "jyrgfmhrrrngtonrmo", + }); + Response response = await client.CreateAgentAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("model").ToString()); + Console.WriteLine(result.GetProperty("instructions").ToString()); + Console.WriteLine(result.GetProperty("tools")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("tool_resources").ToString()); + Console.WriteLine(result.GetProperty("temperature").ToString()); + Console.WriteLine(result.GetProperty("top_p").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Agents_CreateAgent_CreateAgentMinimumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PersistentAgentsAdministrationClient client = new PersistentAgentsAdministrationClient(endpoint, credential); + + Response response = client.CreateAgent("jyrgfmhrrrngtonrmo"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Agents_CreateAgent_CreateAgentMinimumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PersistentAgentsAdministrationClient client = new PersistentAgentsAdministrationClient(endpoint, credential); + + Response response = await client.CreateAgentAsync("jyrgfmhrrrngtonrmo"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Agents_GetAgent_GetAgentMaximumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PersistentAgentsAdministrationClient client = new PersistentAgentsAdministrationClient(endpoint, credential); + + Response response = client.GetAgent("rzrtnsfncjtctybnxemiugavvf", (RequestContext)null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("model").ToString()); + Console.WriteLine(result.GetProperty("instructions").ToString()); + Console.WriteLine(result.GetProperty("tools")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("tool_resources").ToString()); + Console.WriteLine(result.GetProperty("temperature").ToString()); + Console.WriteLine(result.GetProperty("top_p").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Agents_GetAgent_GetAgentMaximumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PersistentAgentsAdministrationClient client = new PersistentAgentsAdministrationClient(endpoint, credential); + + Response response = await client.GetAgentAsync("rzrtnsfncjtctybnxemiugavvf", (RequestContext)null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("model").ToString()); + Console.WriteLine(result.GetProperty("instructions").ToString()); + Console.WriteLine(result.GetProperty("tools")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("tool_resources").ToString()); + Console.WriteLine(result.GetProperty("temperature").ToString()); + Console.WriteLine(result.GetProperty("top_p").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Agents_GetAgent_GetAgentMaximumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PersistentAgentsAdministrationClient client = new PersistentAgentsAdministrationClient(endpoint, credential); + + Response response = client.GetAgent("rzrtnsfncjtctybnxemiugavvf"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Agents_GetAgent_GetAgentMaximumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PersistentAgentsAdministrationClient client = new PersistentAgentsAdministrationClient(endpoint, credential); + + Response response = await client.GetAgentAsync("rzrtnsfncjtctybnxemiugavvf"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Agents_GetAgent_GetAgentMinimumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PersistentAgentsAdministrationClient client = new PersistentAgentsAdministrationClient(endpoint, credential); + + Response response = client.GetAgent("rzrtnsfncjtctybnxemiugavvf", (RequestContext)null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("model").ToString()); + Console.WriteLine(result.GetProperty("instructions").ToString()); + Console.WriteLine(result.GetProperty("tools")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("tool_resources").ToString()); + Console.WriteLine(result.GetProperty("temperature").ToString()); + Console.WriteLine(result.GetProperty("top_p").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Agents_GetAgent_GetAgentMinimumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PersistentAgentsAdministrationClient client = new PersistentAgentsAdministrationClient(endpoint, credential); + + Response response = await client.GetAgentAsync("rzrtnsfncjtctybnxemiugavvf", (RequestContext)null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("model").ToString()); + Console.WriteLine(result.GetProperty("instructions").ToString()); + Console.WriteLine(result.GetProperty("tools")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("tool_resources").ToString()); + Console.WriteLine(result.GetProperty("temperature").ToString()); + Console.WriteLine(result.GetProperty("top_p").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Agents_GetAgent_GetAgentMinimumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PersistentAgentsAdministrationClient client = new PersistentAgentsAdministrationClient(endpoint, credential); + + Response response = client.GetAgent("rzrtnsfncjtctybnxemiugavvf"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Agents_GetAgent_GetAgentMinimumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PersistentAgentsAdministrationClient client = new PersistentAgentsAdministrationClient(endpoint, credential); + + Response response = await client.GetAgentAsync("rzrtnsfncjtctybnxemiugavvf"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Agents_UpdateAgent_UpdateAgentMaximumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PersistentAgentsAdministrationClient client = new PersistentAgentsAdministrationClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + model = "ovsqsbcptyb", + name = "twuqmjwybuqaolohuuhwwgnmfxpwgj", + description = "iosozem", + instructions = "wvkhggyrkzvhx", + tools = Array.Empty(), + tool_resources = new + { + code_interpreter = new + { + file_ids = new object[] + { +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul" + }, + data_sources = new object[] + { +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +} + }, + }, + file_search = new + { + vector_store_ids = new object[] + { +"jkrrjfupyxehwacylflmx" + }, + vector_stores = new object[] + { +new +{ +name = "bftl", +configuration = new +{ +data_sources = new object[] +{ +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +} +}, +}, +} + }, + }, + azure_ai_search = new + { + indexes = new object[] + { +new +{ +index_connection_id = "zkqk", +index_name = "yvxhjyiomlffkuboqokcojfd", +query_type = "simple", +top_k = 27, +filter = "jjbewpsjmygox", +index_asset_id = "iwfmzmxzh", +} + }, + }, + }, + temperature = 26F, + top_p = 14F, + metadata = new + { + key11 = "mpbdrolmnthhjmjq", + }, + }); + Response response = client.UpdateAgent("nibpceztzjbmfzoas", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("model").ToString()); + Console.WriteLine(result.GetProperty("instructions").ToString()); + Console.WriteLine(result.GetProperty("tools")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("tool_resources").ToString()); + Console.WriteLine(result.GetProperty("temperature").ToString()); + Console.WriteLine(result.GetProperty("top_p").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Agents_UpdateAgent_UpdateAgentMaximumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PersistentAgentsAdministrationClient client = new PersistentAgentsAdministrationClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new + { + model = "ovsqsbcptyb", + name = "twuqmjwybuqaolohuuhwwgnmfxpwgj", + description = "iosozem", + instructions = "wvkhggyrkzvhx", + tools = Array.Empty(), + tool_resources = new + { + code_interpreter = new + { + file_ids = new object[] + { +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul" + }, + data_sources = new object[] + { +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +} + }, + }, + file_search = new + { + vector_store_ids = new object[] + { +"jkrrjfupyxehwacylflmx" + }, + vector_stores = new object[] + { +new +{ +name = "bftl", +configuration = new +{ +data_sources = new object[] +{ +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +} +}, +}, +} + }, + }, + azure_ai_search = new + { + indexes = new object[] + { +new +{ +index_connection_id = "zkqk", +index_name = "yvxhjyiomlffkuboqokcojfd", +query_type = "simple", +top_k = 27, +filter = "jjbewpsjmygox", +index_asset_id = "iwfmzmxzh", +} + }, + }, + }, + temperature = 26F, + top_p = 14F, + metadata = new + { + key11 = "mpbdrolmnthhjmjq", + }, + }); + Response response = await client.UpdateAgentAsync("nibpceztzjbmfzoas", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("model").ToString()); + Console.WriteLine(result.GetProperty("instructions").ToString()); + Console.WriteLine(result.GetProperty("tools")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("tool_resources").ToString()); + Console.WriteLine(result.GetProperty("temperature").ToString()); + Console.WriteLine(result.GetProperty("top_p").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Agents_UpdateAgent_UpdateAgentMaximumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PersistentAgentsAdministrationClient client = new PersistentAgentsAdministrationClient(endpoint, credential); + + Response response = client.UpdateAgent("nibpceztzjbmfzoas"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Agents_UpdateAgent_UpdateAgentMaximumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PersistentAgentsAdministrationClient client = new PersistentAgentsAdministrationClient(endpoint, credential); + + Response response = await client.UpdateAgentAsync("nibpceztzjbmfzoas"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Agents_UpdateAgent_UpdateAgentMinimumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PersistentAgentsAdministrationClient client = new PersistentAgentsAdministrationClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new object()); + Response response = client.UpdateAgent("nibpceztzjbmfzoas", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("model").ToString()); + Console.WriteLine(result.GetProperty("instructions").ToString()); + Console.WriteLine(result.GetProperty("tools")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("tool_resources").ToString()); + Console.WriteLine(result.GetProperty("temperature").ToString()); + Console.WriteLine(result.GetProperty("top_p").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Agents_UpdateAgent_UpdateAgentMinimumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PersistentAgentsAdministrationClient client = new PersistentAgentsAdministrationClient(endpoint, credential); + + using RequestContent content = RequestContent.Create(new object()); + Response response = await client.UpdateAgentAsync("nibpceztzjbmfzoas", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("model").ToString()); + Console.WriteLine(result.GetProperty("instructions").ToString()); + Console.WriteLine(result.GetProperty("tools")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("tool_resources").ToString()); + Console.WriteLine(result.GetProperty("temperature").ToString()); + Console.WriteLine(result.GetProperty("top_p").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Agents_UpdateAgent_UpdateAgentMinimumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PersistentAgentsAdministrationClient client = new PersistentAgentsAdministrationClient(endpoint, credential); + + Response response = client.UpdateAgent("nibpceztzjbmfzoas"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Agents_UpdateAgent_UpdateAgentMinimumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PersistentAgentsAdministrationClient client = new PersistentAgentsAdministrationClient(endpoint, credential); + + Response response = await client.UpdateAgentAsync("nibpceztzjbmfzoas"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Agents_GetAgents_ListAgentsMaximumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PersistentAgentsAdministrationClient client = new PersistentAgentsAdministrationClient(endpoint, credential); + + foreach (BinaryData item in client.GetAgents(23, "asc", "ybuapkj", "yicprwkzcjbeirwuznafws", (RequestContext)null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("model").ToString()); + Console.WriteLine(result.GetProperty("instructions").ToString()); + Console.WriteLine(result.GetProperty("tools")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("tool_resources").ToString()); + Console.WriteLine(result.GetProperty("temperature").ToString()); + Console.WriteLine(result.GetProperty("top_p").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Agents_GetAgents_ListAgentsMaximumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PersistentAgentsAdministrationClient client = new PersistentAgentsAdministrationClient(endpoint, credential); + + await foreach (BinaryData item in client.GetAgentsAsync(23, "asc", "ybuapkj", "yicprwkzcjbeirwuznafws", (RequestContext)null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("model").ToString()); + Console.WriteLine(result.GetProperty("instructions").ToString()); + Console.WriteLine(result.GetProperty("tools")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("tool_resources").ToString()); + Console.WriteLine(result.GetProperty("temperature").ToString()); + Console.WriteLine(result.GetProperty("top_p").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Agents_GetAgents_ListAgentsMaximumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PersistentAgentsAdministrationClient client = new PersistentAgentsAdministrationClient(endpoint, credential); + + foreach (PersistentAgent item in client.GetAgents()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Agents_GetAgents_ListAgentsMaximumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PersistentAgentsAdministrationClient client = new PersistentAgentsAdministrationClient(endpoint, credential); + + await foreach (PersistentAgent item in client.GetAgentsAsync()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Agents_GetAgents_ListAgentsMinimumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PersistentAgentsAdministrationClient client = new PersistentAgentsAdministrationClient(endpoint, credential); + + foreach (BinaryData item in client.GetAgents((int?)null, (string)null, (string)null, (string)null, (RequestContext)null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("model").ToString()); + Console.WriteLine(result.GetProperty("instructions").ToString()); + Console.WriteLine(result.GetProperty("tools")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("tool_resources").ToString()); + Console.WriteLine(result.GetProperty("temperature").ToString()); + Console.WriteLine(result.GetProperty("top_p").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Agents_GetAgents_ListAgentsMinimumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PersistentAgentsAdministrationClient client = new PersistentAgentsAdministrationClient(endpoint, credential); + + await foreach (BinaryData item in client.GetAgentsAsync((int?)null, (string)null, (string)null, (string)null, (RequestContext)null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("description").ToString()); + Console.WriteLine(result.GetProperty("model").ToString()); + Console.WriteLine(result.GetProperty("instructions").ToString()); + Console.WriteLine(result.GetProperty("tools")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("tool_resources").ToString()); + Console.WriteLine(result.GetProperty("temperature").ToString()); + Console.WriteLine(result.GetProperty("top_p").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Agents_GetAgents_ListAgentsMinimumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PersistentAgentsAdministrationClient client = new PersistentAgentsAdministrationClient(endpoint, credential); + + foreach (PersistentAgent item in client.GetAgents()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Agents_GetAgents_ListAgentsMinimumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PersistentAgentsAdministrationClient client = new PersistentAgentsAdministrationClient(endpoint, credential); + + await foreach (PersistentAgent item in client.GetAgentsAsync()) + { + } + } + } +} diff --git a/sdk/ai/Azure.AI.Agents.Persistent/tests/Generated/Samples/Samples_PersistentAgentsFiles.cs b/sdk/ai/Azure.AI.Agents.Persistent/tests/Generated/Samples/Samples_PersistentAgentsFiles.cs new file mode 100644 index 000000000000..7f2658442ef5 --- /dev/null +++ b/sdk/ai/Azure.AI.Agents.Persistent/tests/Generated/Samples/Samples_PersistentAgentsFiles.cs @@ -0,0 +1,239 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.AI.Agents.Persistent.Samples +{ + public partial class Samples_PersistentAgentsFiles + { + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Files_GetFile_FilesGetFileMaximumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PersistentAgentsFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetPersistentAgentsFilesClient(); + + Response response = client.GetFile("lsvyhecgodljeaavd", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("bytes").ToString()); + Console.WriteLine(result.GetProperty("filename").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("purpose").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Files_GetFile_FilesGetFileMaximumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PersistentAgentsFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetPersistentAgentsFilesClient(); + + Response response = await client.GetFileAsync("lsvyhecgodljeaavd", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("bytes").ToString()); + Console.WriteLine(result.GetProperty("filename").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("purpose").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Files_GetFile_FilesGetFileMaximumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PersistentAgentsFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetPersistentAgentsFilesClient(); + + Response response = client.GetFile("lsvyhecgodljeaavd"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Files_GetFile_FilesGetFileMaximumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PersistentAgentsFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetPersistentAgentsFilesClient(); + + Response response = await client.GetFileAsync("lsvyhecgodljeaavd"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Files_GetFile_FilesGetFileMinimumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PersistentAgentsFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetPersistentAgentsFilesClient(); + + Response response = client.GetFile("cpkshmceejnyuivzhyorchrl", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("bytes").ToString()); + Console.WriteLine(result.GetProperty("filename").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("purpose").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Files_GetFile_FilesGetFileMinimumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PersistentAgentsFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetPersistentAgentsFilesClient(); + + Response response = await client.GetFileAsync("cpkshmceejnyuivzhyorchrl", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("bytes").ToString()); + Console.WriteLine(result.GetProperty("filename").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("purpose").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Files_GetFile_FilesGetFileMinimumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PersistentAgentsFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetPersistentAgentsFilesClient(); + + Response response = client.GetFile("cpkshmceejnyuivzhyorchrl"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Files_GetFile_FilesGetFileMinimumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PersistentAgentsFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetPersistentAgentsFilesClient(); + + Response response = await client.GetFileAsync("cpkshmceejnyuivzhyorchrl"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Files_GetFileContent_FilesGetFileContentMaximumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PersistentAgentsFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetPersistentAgentsFilesClient(); + + Response response = client.GetFileContent("dfzstslvjtioavergjgq", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Files_GetFileContent_FilesGetFileContentMaximumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PersistentAgentsFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetPersistentAgentsFilesClient(); + + Response response = await client.GetFileContentAsync("dfzstslvjtioavergjgq", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Files_GetFileContent_FilesGetFileContentMaximumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PersistentAgentsFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetPersistentAgentsFilesClient(); + + Response response = client.GetFileContent("dfzstslvjtioavergjgq"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Files_GetFileContent_FilesGetFileContentMaximumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PersistentAgentsFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetPersistentAgentsFilesClient(); + + Response response = await client.GetFileContentAsync("dfzstslvjtioavergjgq"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Files_GetFileContent_FilesGetFileContentMinimumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PersistentAgentsFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetPersistentAgentsFilesClient(); + + Response response = client.GetFileContent("jpzynxpsrccmo", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Files_GetFileContent_FilesGetFileContentMinimumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PersistentAgentsFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetPersistentAgentsFilesClient(); + + Response response = await client.GetFileContentAsync("jpzynxpsrccmo", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Files_GetFileContent_FilesGetFileContentMinimumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PersistentAgentsFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetPersistentAgentsFilesClient(); + + Response response = client.GetFileContent("jpzynxpsrccmo"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Files_GetFileContent_FilesGetFileContentMinimumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + PersistentAgentsFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetPersistentAgentsFilesClient(); + + Response response = await client.GetFileContentAsync("jpzynxpsrccmo"); + } + } +} diff --git a/sdk/ai/Azure.AI.Agents.Persistent/tests/Generated/Samples/Samples_ThreadMessages.cs b/sdk/ai/Azure.AI.Agents.Persistent/tests/Generated/Samples/Samples_ThreadMessages.cs new file mode 100644 index 000000000000..8368b614500c --- /dev/null +++ b/sdk/ai/Azure.AI.Agents.Persistent/tests/Generated/Samples/Samples_ThreadMessages.cs @@ -0,0 +1,621 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.AI.Agents.Persistent.Samples +{ + public partial class Samples_ThreadMessages + { + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Messages_CreateMessage_MessagesCreateMessageMaximumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadMessages client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadMessagesClient(); + + using RequestContent content = RequestContent.Create(new + { + role = "user", + attachments = new object[] + { +new +{ +file_id = "uslxhectlaptpkjcxnjzhkzprso", +data_source = new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +tools = Array.Empty(), +} + }, + metadata = new + { + key3153 = "qn", + }, + }); + Response response = client.CreateMessage("zipaoiwxasiavnmlnkg", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("thread_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("incomplete_details").GetProperty("reason").ToString()); + Console.WriteLine(result.GetProperty("completed_at").ToString()); + Console.WriteLine(result.GetProperty("incomplete_at").ToString()); + Console.WriteLine(result.GetProperty("role").ToString()); + Console.WriteLine(result.GetProperty("content")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("assistant_id").ToString()); + Console.WriteLine(result.GetProperty("run_id").ToString()); + Console.WriteLine(result.GetProperty("attachments")[0].GetProperty("tools")[0].ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Messages_CreateMessage_MessagesCreateMessageMaximumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadMessages client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadMessagesClient(); + + using RequestContent content = RequestContent.Create(new + { + role = "user", + attachments = new object[] + { +new +{ +file_id = "uslxhectlaptpkjcxnjzhkzprso", +data_source = new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +tools = Array.Empty(), +} + }, + metadata = new + { + key3153 = "qn", + }, + }); + Response response = await client.CreateMessageAsync("zipaoiwxasiavnmlnkg", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("thread_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("incomplete_details").GetProperty("reason").ToString()); + Console.WriteLine(result.GetProperty("completed_at").ToString()); + Console.WriteLine(result.GetProperty("incomplete_at").ToString()); + Console.WriteLine(result.GetProperty("role").ToString()); + Console.WriteLine(result.GetProperty("content")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("assistant_id").ToString()); + Console.WriteLine(result.GetProperty("run_id").ToString()); + Console.WriteLine(result.GetProperty("attachments")[0].GetProperty("tools")[0].ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Messages_CreateMessage_MessagesCreateMessageMaximumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadMessages client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadMessagesClient(); + + Response response = client.CreateMessage("zipaoiwxasiavnmlnkg", MessageRole.User, (BinaryData)null); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Messages_CreateMessage_MessagesCreateMessageMaximumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadMessages client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadMessagesClient(); + + Response response = await client.CreateMessageAsync("zipaoiwxasiavnmlnkg", MessageRole.User, (BinaryData)null); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Messages_GetMessage_MessagesGetMessageMaximumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadMessages client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadMessagesClient(); + + Response response = client.GetMessage("wazfimispaosrwcw", "rntlkaswrsmq", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("thread_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("incomplete_details").GetProperty("reason").ToString()); + Console.WriteLine(result.GetProperty("completed_at").ToString()); + Console.WriteLine(result.GetProperty("incomplete_at").ToString()); + Console.WriteLine(result.GetProperty("role").ToString()); + Console.WriteLine(result.GetProperty("content")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("assistant_id").ToString()); + Console.WriteLine(result.GetProperty("run_id").ToString()); + Console.WriteLine(result.GetProperty("attachments")[0].GetProperty("tools")[0].ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Messages_GetMessage_MessagesGetMessageMaximumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadMessages client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadMessagesClient(); + + Response response = await client.GetMessageAsync("wazfimispaosrwcw", "rntlkaswrsmq", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("thread_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("incomplete_details").GetProperty("reason").ToString()); + Console.WriteLine(result.GetProperty("completed_at").ToString()); + Console.WriteLine(result.GetProperty("incomplete_at").ToString()); + Console.WriteLine(result.GetProperty("role").ToString()); + Console.WriteLine(result.GetProperty("content")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("assistant_id").ToString()); + Console.WriteLine(result.GetProperty("run_id").ToString()); + Console.WriteLine(result.GetProperty("attachments")[0].GetProperty("tools")[0].ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Messages_GetMessage_MessagesGetMessageMaximumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadMessages client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadMessagesClient(); + + Response response = client.GetMessage("wazfimispaosrwcw", "rntlkaswrsmq"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Messages_GetMessage_MessagesGetMessageMaximumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadMessages client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadMessagesClient(); + + Response response = await client.GetMessageAsync("wazfimispaosrwcw", "rntlkaswrsmq"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Messages_GetMessage_MessagesGetMessageMinimumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadMessages client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadMessagesClient(); + + Response response = client.GetMessage("gnhpgvsdkyugddnkifumj", "krpdbqetvarfbwcczwa", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("thread_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("incomplete_details").GetProperty("reason").ToString()); + Console.WriteLine(result.GetProperty("completed_at").ToString()); + Console.WriteLine(result.GetProperty("incomplete_at").ToString()); + Console.WriteLine(result.GetProperty("role").ToString()); + Console.WriteLine(result.GetProperty("content")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("assistant_id").ToString()); + Console.WriteLine(result.GetProperty("run_id").ToString()); + Console.WriteLine(result.GetProperty("attachments")[0].GetProperty("tools")[0].ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Messages_GetMessage_MessagesGetMessageMinimumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadMessages client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadMessagesClient(); + + Response response = await client.GetMessageAsync("gnhpgvsdkyugddnkifumj", "krpdbqetvarfbwcczwa", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("thread_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("incomplete_details").GetProperty("reason").ToString()); + Console.WriteLine(result.GetProperty("completed_at").ToString()); + Console.WriteLine(result.GetProperty("incomplete_at").ToString()); + Console.WriteLine(result.GetProperty("role").ToString()); + Console.WriteLine(result.GetProperty("content")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("assistant_id").ToString()); + Console.WriteLine(result.GetProperty("run_id").ToString()); + Console.WriteLine(result.GetProperty("attachments")[0].GetProperty("tools")[0].ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Messages_GetMessage_MessagesGetMessageMinimumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadMessages client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadMessagesClient(); + + Response response = client.GetMessage("gnhpgvsdkyugddnkifumj", "krpdbqetvarfbwcczwa"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Messages_GetMessage_MessagesGetMessageMinimumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadMessages client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadMessagesClient(); + + Response response = await client.GetMessageAsync("gnhpgvsdkyugddnkifumj", "krpdbqetvarfbwcczwa"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Messages_UpdateMessage_MessagesUpdateMessageMaximumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadMessages client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadMessagesClient(); + + using RequestContent content = RequestContent.Create(new + { + metadata = new + { + key1225 = "spvnrxlujhmwk", + }, + }); + Response response = client.UpdateMessage("sbdgvkmigm", "jjhbtcdqkx", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("thread_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("incomplete_details").GetProperty("reason").ToString()); + Console.WriteLine(result.GetProperty("completed_at").ToString()); + Console.WriteLine(result.GetProperty("incomplete_at").ToString()); + Console.WriteLine(result.GetProperty("role").ToString()); + Console.WriteLine(result.GetProperty("content")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("assistant_id").ToString()); + Console.WriteLine(result.GetProperty("run_id").ToString()); + Console.WriteLine(result.GetProperty("attachments")[0].GetProperty("tools")[0].ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Messages_UpdateMessage_MessagesUpdateMessageMaximumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadMessages client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadMessagesClient(); + + using RequestContent content = RequestContent.Create(new + { + metadata = new + { + key1225 = "spvnrxlujhmwk", + }, + }); + Response response = await client.UpdateMessageAsync("sbdgvkmigm", "jjhbtcdqkx", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("thread_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("incomplete_details").GetProperty("reason").ToString()); + Console.WriteLine(result.GetProperty("completed_at").ToString()); + Console.WriteLine(result.GetProperty("incomplete_at").ToString()); + Console.WriteLine(result.GetProperty("role").ToString()); + Console.WriteLine(result.GetProperty("content")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("assistant_id").ToString()); + Console.WriteLine(result.GetProperty("run_id").ToString()); + Console.WriteLine(result.GetProperty("attachments")[0].GetProperty("tools")[0].ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Messages_UpdateMessage_MessagesUpdateMessageMaximumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadMessages client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadMessagesClient(); + + Response response = client.UpdateMessage("sbdgvkmigm", "jjhbtcdqkx"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Messages_UpdateMessage_MessagesUpdateMessageMaximumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadMessages client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadMessagesClient(); + + Response response = await client.UpdateMessageAsync("sbdgvkmigm", "jjhbtcdqkx"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Messages_UpdateMessage_MessagesUpdateMessageMinimumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadMessages client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadMessagesClient(); + + using RequestContent content = RequestContent.Create(new object()); + Response response = client.UpdateMessage("houmkok", "dac", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("thread_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("incomplete_details").GetProperty("reason").ToString()); + Console.WriteLine(result.GetProperty("completed_at").ToString()); + Console.WriteLine(result.GetProperty("incomplete_at").ToString()); + Console.WriteLine(result.GetProperty("role").ToString()); + Console.WriteLine(result.GetProperty("content")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("assistant_id").ToString()); + Console.WriteLine(result.GetProperty("run_id").ToString()); + Console.WriteLine(result.GetProperty("attachments")[0].GetProperty("tools")[0].ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Messages_UpdateMessage_MessagesUpdateMessageMinimumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadMessages client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadMessagesClient(); + + using RequestContent content = RequestContent.Create(new object()); + Response response = await client.UpdateMessageAsync("houmkok", "dac", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("thread_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("incomplete_details").GetProperty("reason").ToString()); + Console.WriteLine(result.GetProperty("completed_at").ToString()); + Console.WriteLine(result.GetProperty("incomplete_at").ToString()); + Console.WriteLine(result.GetProperty("role").ToString()); + Console.WriteLine(result.GetProperty("content")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("assistant_id").ToString()); + Console.WriteLine(result.GetProperty("run_id").ToString()); + Console.WriteLine(result.GetProperty("attachments")[0].GetProperty("tools")[0].ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Messages_UpdateMessage_MessagesUpdateMessageMinimumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadMessages client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadMessagesClient(); + + Response response = client.UpdateMessage("houmkok", "dac"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Messages_UpdateMessage_MessagesUpdateMessageMinimumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadMessages client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadMessagesClient(); + + Response response = await client.UpdateMessageAsync("houmkok", "dac"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Messages_GetMessages_MessagesListMessagesMaximumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadMessages client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadMessagesClient(); + + foreach (BinaryData item in client.GetMessages("rxigqqgnuzjqffpk", "mtwpthaktboemc", 20, "asc", "prlgmgvf", "wbhklengvltnlzp", (RequestContext)null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("thread_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("incomplete_details").GetProperty("reason").ToString()); + Console.WriteLine(result.GetProperty("completed_at").ToString()); + Console.WriteLine(result.GetProperty("incomplete_at").ToString()); + Console.WriteLine(result.GetProperty("role").ToString()); + Console.WriteLine(result.GetProperty("content")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("assistant_id").ToString()); + Console.WriteLine(result.GetProperty("run_id").ToString()); + Console.WriteLine(result.GetProperty("attachments")[0].GetProperty("tools")[0].ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Messages_GetMessages_MessagesListMessagesMaximumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadMessages client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadMessagesClient(); + + await foreach (BinaryData item in client.GetMessagesAsync("rxigqqgnuzjqffpk", "mtwpthaktboemc", 20, "asc", "prlgmgvf", "wbhklengvltnlzp", (RequestContext)null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("thread_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("incomplete_details").GetProperty("reason").ToString()); + Console.WriteLine(result.GetProperty("completed_at").ToString()); + Console.WriteLine(result.GetProperty("incomplete_at").ToString()); + Console.WriteLine(result.GetProperty("role").ToString()); + Console.WriteLine(result.GetProperty("content")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("assistant_id").ToString()); + Console.WriteLine(result.GetProperty("run_id").ToString()); + Console.WriteLine(result.GetProperty("attachments")[0].GetProperty("tools")[0].ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Messages_GetMessages_MessagesListMessagesMaximumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadMessages client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadMessagesClient(); + + foreach (PersistentThreadMessage item in client.GetMessages("rxigqqgnuzjqffpk")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Messages_GetMessages_MessagesListMessagesMaximumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadMessages client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadMessagesClient(); + + await foreach (PersistentThreadMessage item in client.GetMessagesAsync("rxigqqgnuzjqffpk")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Messages_GetMessages_MessagesListMessagesMinimumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadMessages client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadMessagesClient(); + + foreach (BinaryData item in client.GetMessages("fzxnlymcyzxdahitxdeoqcn", (string)null, (int?)null, (string)null, (string)null, (string)null, (RequestContext)null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("thread_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("incomplete_details").GetProperty("reason").ToString()); + Console.WriteLine(result.GetProperty("completed_at").ToString()); + Console.WriteLine(result.GetProperty("incomplete_at").ToString()); + Console.WriteLine(result.GetProperty("role").ToString()); + Console.WriteLine(result.GetProperty("content")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("assistant_id").ToString()); + Console.WriteLine(result.GetProperty("run_id").ToString()); + Console.WriteLine(result.GetProperty("attachments")[0].GetProperty("tools")[0].ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Messages_GetMessages_MessagesListMessagesMinimumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadMessages client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadMessagesClient(); + + await foreach (BinaryData item in client.GetMessagesAsync("fzxnlymcyzxdahitxdeoqcn", (string)null, (int?)null, (string)null, (string)null, (string)null, (RequestContext)null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("thread_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("incomplete_details").GetProperty("reason").ToString()); + Console.WriteLine(result.GetProperty("completed_at").ToString()); + Console.WriteLine(result.GetProperty("incomplete_at").ToString()); + Console.WriteLine(result.GetProperty("role").ToString()); + Console.WriteLine(result.GetProperty("content")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("assistant_id").ToString()); + Console.WriteLine(result.GetProperty("run_id").ToString()); + Console.WriteLine(result.GetProperty("attachments")[0].GetProperty("tools")[0].ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Messages_GetMessages_MessagesListMessagesMinimumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadMessages client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadMessagesClient(); + + foreach (PersistentThreadMessage item in client.GetMessages("fzxnlymcyzxdahitxdeoqcn")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Messages_GetMessages_MessagesListMessagesMinimumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadMessages client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadMessagesClient(); + + await foreach (PersistentThreadMessage item in client.GetMessagesAsync("fzxnlymcyzxdahitxdeoqcn")) + { + } + } + } +} diff --git a/sdk/ai/Azure.AI.Agents.Persistent/tests/Generated/Samples/Samples_ThreadRunSteps.cs b/sdk/ai/Azure.AI.Agents.Persistent/tests/Generated/Samples/Samples_ThreadRunSteps.cs new file mode 100644 index 000000000000..215e2eba775e --- /dev/null +++ b/sdk/ai/Azure.AI.Agents.Persistent/tests/Generated/Samples/Samples_ThreadRunSteps.cs @@ -0,0 +1,352 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.AI.Agents.Persistent.Samples +{ + public partial class Samples_ThreadRunSteps + { + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_RunSteps_GetRunStep_RunStepsGetRunStepMaximumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadRunSteps client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunStepsClient(); + + Response response = client.GetRunStep("o", "gtmbdfovkwaxlpsn", "vbyblatygkybmhm", new RunAdditionalFieldList[] { RunAdditionalFieldList.FileSearchContents }, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("assistant_id").ToString()); + Console.WriteLine(result.GetProperty("thread_id").ToString()); + Console.WriteLine(result.GetProperty("run_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("step_details").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("expired_at").ToString()); + Console.WriteLine(result.GetProperty("completed_at").ToString()); + Console.WriteLine(result.GetProperty("cancelled_at").ToString()); + Console.WriteLine(result.GetProperty("failed_at").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_RunSteps_GetRunStep_RunStepsGetRunStepMaximumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadRunSteps client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunStepsClient(); + + Response response = await client.GetRunStepAsync("o", "gtmbdfovkwaxlpsn", "vbyblatygkybmhm", new RunAdditionalFieldList[] { RunAdditionalFieldList.FileSearchContents }, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("assistant_id").ToString()); + Console.WriteLine(result.GetProperty("thread_id").ToString()); + Console.WriteLine(result.GetProperty("run_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("step_details").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("expired_at").ToString()); + Console.WriteLine(result.GetProperty("completed_at").ToString()); + Console.WriteLine(result.GetProperty("cancelled_at").ToString()); + Console.WriteLine(result.GetProperty("failed_at").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_RunSteps_GetRunStep_RunStepsGetRunStepMaximumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadRunSteps client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunStepsClient(); + + Response response = client.GetRunStep("o", "gtmbdfovkwaxlpsn", "vbyblatygkybmhm"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_RunSteps_GetRunStep_RunStepsGetRunStepMaximumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadRunSteps client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunStepsClient(); + + Response response = await client.GetRunStepAsync("o", "gtmbdfovkwaxlpsn", "vbyblatygkybmhm"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_RunSteps_GetRunStep_RunStepsGetRunStepMinimumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadRunSteps client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunStepsClient(); + + Response response = client.GetRunStep("vluit", "icivumwmgrcxgmpdzhtffb", "baweljsuxtvj", null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("assistant_id").ToString()); + Console.WriteLine(result.GetProperty("thread_id").ToString()); + Console.WriteLine(result.GetProperty("run_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("step_details").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("expired_at").ToString()); + Console.WriteLine(result.GetProperty("completed_at").ToString()); + Console.WriteLine(result.GetProperty("cancelled_at").ToString()); + Console.WriteLine(result.GetProperty("failed_at").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_RunSteps_GetRunStep_RunStepsGetRunStepMinimumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadRunSteps client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunStepsClient(); + + Response response = await client.GetRunStepAsync("vluit", "icivumwmgrcxgmpdzhtffb", "baweljsuxtvj", null, null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("assistant_id").ToString()); + Console.WriteLine(result.GetProperty("thread_id").ToString()); + Console.WriteLine(result.GetProperty("run_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("step_details").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("expired_at").ToString()); + Console.WriteLine(result.GetProperty("completed_at").ToString()); + Console.WriteLine(result.GetProperty("cancelled_at").ToString()); + Console.WriteLine(result.GetProperty("failed_at").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_RunSteps_GetRunStep_RunStepsGetRunStepMinimumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadRunSteps client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunStepsClient(); + + Response response = client.GetRunStep("vluit", "icivumwmgrcxgmpdzhtffb", "baweljsuxtvj"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_RunSteps_GetRunStep_RunStepsGetRunStepMinimumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadRunSteps client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunStepsClient(); + + Response response = await client.GetRunStepAsync("vluit", "icivumwmgrcxgmpdzhtffb", "baweljsuxtvj"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_RunSteps_GetRunSteps_RunStepsListRunStepsMaximumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadRunSteps client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunStepsClient(); + + foreach (BinaryData item in client.GetRunSteps("gjhbhgfoqzdgbmhpfzowgndoykr", "rwmtddbxjqdscrdq", new RunAdditionalFieldList[] { RunAdditionalFieldList.FileSearchContents }, 15, "asc", "ptxb", "dxecoccswnru", (RequestContext)null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("assistant_id").ToString()); + Console.WriteLine(result.GetProperty("thread_id").ToString()); + Console.WriteLine(result.GetProperty("run_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("step_details").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("expired_at").ToString()); + Console.WriteLine(result.GetProperty("completed_at").ToString()); + Console.WriteLine(result.GetProperty("cancelled_at").ToString()); + Console.WriteLine(result.GetProperty("failed_at").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_RunSteps_GetRunSteps_RunStepsListRunStepsMaximumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadRunSteps client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunStepsClient(); + + await foreach (BinaryData item in client.GetRunStepsAsync("gjhbhgfoqzdgbmhpfzowgndoykr", "rwmtddbxjqdscrdq", new RunAdditionalFieldList[] { RunAdditionalFieldList.FileSearchContents }, 15, "asc", "ptxb", "dxecoccswnru", (RequestContext)null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("assistant_id").ToString()); + Console.WriteLine(result.GetProperty("thread_id").ToString()); + Console.WriteLine(result.GetProperty("run_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("step_details").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("expired_at").ToString()); + Console.WriteLine(result.GetProperty("completed_at").ToString()); + Console.WriteLine(result.GetProperty("cancelled_at").ToString()); + Console.WriteLine(result.GetProperty("failed_at").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_RunSteps_GetRunSteps_RunStepsListRunStepsMaximumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadRunSteps client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunStepsClient(); + + foreach (RunStep item in client.GetRunSteps("gjhbhgfoqzdgbmhpfzowgndoykr", "rwmtddbxjqdscrdq")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_RunSteps_GetRunSteps_RunStepsListRunStepsMaximumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadRunSteps client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunStepsClient(); + + await foreach (RunStep item in client.GetRunStepsAsync("gjhbhgfoqzdgbmhpfzowgndoykr", "rwmtddbxjqdscrdq")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_RunSteps_GetRunSteps_RunStepsListRunStepsMinimumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadRunSteps client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunStepsClient(); + + foreach (BinaryData item in client.GetRunSteps("tecrxeayzprgkvrmtsdxmnyq", "rx", (IEnumerable)null, (int?)null, (string)null, (string)null, (string)null, (RequestContext)null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("assistant_id").ToString()); + Console.WriteLine(result.GetProperty("thread_id").ToString()); + Console.WriteLine(result.GetProperty("run_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("step_details").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("expired_at").ToString()); + Console.WriteLine(result.GetProperty("completed_at").ToString()); + Console.WriteLine(result.GetProperty("cancelled_at").ToString()); + Console.WriteLine(result.GetProperty("failed_at").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_RunSteps_GetRunSteps_RunStepsListRunStepsMinimumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadRunSteps client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunStepsClient(); + + await foreach (BinaryData item in client.GetRunStepsAsync("tecrxeayzprgkvrmtsdxmnyq", "rx", (IEnumerable)null, (int?)null, (string)null, (string)null, (string)null, (RequestContext)null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("assistant_id").ToString()); + Console.WriteLine(result.GetProperty("thread_id").ToString()); + Console.WriteLine(result.GetProperty("run_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("step_details").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("expired_at").ToString()); + Console.WriteLine(result.GetProperty("completed_at").ToString()); + Console.WriteLine(result.GetProperty("cancelled_at").ToString()); + Console.WriteLine(result.GetProperty("failed_at").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_RunSteps_GetRunSteps_RunStepsListRunStepsMinimumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadRunSteps client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunStepsClient(); + + foreach (RunStep item in client.GetRunSteps("tecrxeayzprgkvrmtsdxmnyq", "rx")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_RunSteps_GetRunSteps_RunStepsListRunStepsMinimumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadRunSteps client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunStepsClient(); + + await foreach (RunStep item in client.GetRunStepsAsync("tecrxeayzprgkvrmtsdxmnyq", "rx")) + { + } + } + } +} diff --git a/sdk/ai/Azure.AI.Agents.Persistent/tests/Generated/Samples/Samples_ThreadRuns.cs b/sdk/ai/Azure.AI.Agents.Persistent/tests/Generated/Samples/Samples_ThreadRuns.cs new file mode 100644 index 000000000000..846fb19e200a --- /dev/null +++ b/sdk/ai/Azure.AI.Agents.Persistent/tests/Generated/Samples/Samples_ThreadRuns.cs @@ -0,0 +1,783 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.AI.Agents.Persistent.Samples +{ + public partial class Samples_ThreadRuns + { + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Runs_CreateRun_RunsCreateRunMaximumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadRuns client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunsClient(); + + using RequestContent content = RequestContent.Create(new + { + assistant_id = "jsgtmtrsdyptblawced", + model = "yefdnxmqfpqutszahxptiqgatxohu", + instructions = "jdhepydeilwuqxwgxliiiekqdbt", + additional_instructions = "oyacdunpwfbtz", + additional_messages = new object[] + { +new +{ +role = "user", +attachments = new object[] +{ +new +{ +file_id = "uslxhectlaptpkjcxnjzhkzprso", +data_source = new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +tools = Array.Empty(), +} +}, +metadata = new +{ +key3153 = "qn", +}, +} + }, + tools = Array.Empty(), + stream = true, + temperature = 8F, + top_p = 3F, + max_prompt_tokens = 21, + max_completion_tokens = 12, + truncation_strategy = new + { + type = "auto", + last_messages = 6, + }, + parallel_tool_calls = true, + metadata = new + { + key5117 = "vfjqhklfxpyyojenxqnitzynwpqt", + }, + }); + Response response = client.CreateRun("hhkihlfdkkrjn", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("thread_id").ToString()); + Console.WriteLine(result.GetProperty("assistant_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("model").ToString()); + Console.WriteLine(result.GetProperty("instructions").ToString()); + Console.WriteLine(result.GetProperty("tools")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("expires_at").ToString()); + Console.WriteLine(result.GetProperty("started_at").ToString()); + Console.WriteLine(result.GetProperty("completed_at").ToString()); + Console.WriteLine(result.GetProperty("cancelled_at").ToString()); + Console.WriteLine(result.GetProperty("failed_at").ToString()); + Console.WriteLine(result.GetProperty("incomplete_details").GetProperty("reason").ToString()); + Console.WriteLine(result.GetProperty("usage").GetProperty("completion_tokens").ToString()); + Console.WriteLine(result.GetProperty("usage").GetProperty("prompt_tokens").ToString()); + Console.WriteLine(result.GetProperty("usage").GetProperty("total_tokens").ToString()); + Console.WriteLine(result.GetProperty("max_prompt_tokens").ToString()); + Console.WriteLine(result.GetProperty("max_completion_tokens").ToString()); + Console.WriteLine(result.GetProperty("truncation_strategy").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("tool_choice").ToString()); + Console.WriteLine(result.GetProperty("response_format").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("parallel_tool_calls").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Runs_CreateRun_RunsCreateRunMaximumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadRuns client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunsClient(); + + using RequestContent content = RequestContent.Create(new + { + assistant_id = "jsgtmtrsdyptblawced", + model = "yefdnxmqfpqutszahxptiqgatxohu", + instructions = "jdhepydeilwuqxwgxliiiekqdbt", + additional_instructions = "oyacdunpwfbtz", + additional_messages = new object[] + { +new +{ +role = "user", +attachments = new object[] +{ +new +{ +file_id = "uslxhectlaptpkjcxnjzhkzprso", +data_source = new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +tools = Array.Empty(), +} +}, +metadata = new +{ +key3153 = "qn", +}, +} + }, + tools = Array.Empty(), + stream = true, + temperature = 8F, + top_p = 3F, + max_prompt_tokens = 21, + max_completion_tokens = 12, + truncation_strategy = new + { + type = "auto", + last_messages = 6, + }, + parallel_tool_calls = true, + metadata = new + { + key5117 = "vfjqhklfxpyyojenxqnitzynwpqt", + }, + }); + Response response = await client.CreateRunAsync("hhkihlfdkkrjn", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("thread_id").ToString()); + Console.WriteLine(result.GetProperty("assistant_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("model").ToString()); + Console.WriteLine(result.GetProperty("instructions").ToString()); + Console.WriteLine(result.GetProperty("tools")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("expires_at").ToString()); + Console.WriteLine(result.GetProperty("started_at").ToString()); + Console.WriteLine(result.GetProperty("completed_at").ToString()); + Console.WriteLine(result.GetProperty("cancelled_at").ToString()); + Console.WriteLine(result.GetProperty("failed_at").ToString()); + Console.WriteLine(result.GetProperty("incomplete_details").GetProperty("reason").ToString()); + Console.WriteLine(result.GetProperty("usage").GetProperty("completion_tokens").ToString()); + Console.WriteLine(result.GetProperty("usage").GetProperty("prompt_tokens").ToString()); + Console.WriteLine(result.GetProperty("usage").GetProperty("total_tokens").ToString()); + Console.WriteLine(result.GetProperty("max_prompt_tokens").ToString()); + Console.WriteLine(result.GetProperty("max_completion_tokens").ToString()); + Console.WriteLine(result.GetProperty("truncation_strategy").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("tool_choice").ToString()); + Console.WriteLine(result.GetProperty("response_format").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("parallel_tool_calls").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Runs_CreateRun_RunsCreateRunMaximumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadRuns client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunsClient(); + + Response response = client.CreateRun("hhkihlfdkkrjn", "jsgtmtrsdyptblawced"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Runs_CreateRun_RunsCreateRunMaximumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadRuns client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunsClient(); + + Response response = await client.CreateRunAsync("hhkihlfdkkrjn", "jsgtmtrsdyptblawced"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Runs_GetRun_RunsGetRunMaximumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadRuns client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunsClient(); + + Response response = client.GetRun("sqccjmfw", "acsobiqvtzctqgmfilzbouk", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("thread_id").ToString()); + Console.WriteLine(result.GetProperty("assistant_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("model").ToString()); + Console.WriteLine(result.GetProperty("instructions").ToString()); + Console.WriteLine(result.GetProperty("tools")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("expires_at").ToString()); + Console.WriteLine(result.GetProperty("started_at").ToString()); + Console.WriteLine(result.GetProperty("completed_at").ToString()); + Console.WriteLine(result.GetProperty("cancelled_at").ToString()); + Console.WriteLine(result.GetProperty("failed_at").ToString()); + Console.WriteLine(result.GetProperty("incomplete_details").GetProperty("reason").ToString()); + Console.WriteLine(result.GetProperty("usage").GetProperty("completion_tokens").ToString()); + Console.WriteLine(result.GetProperty("usage").GetProperty("prompt_tokens").ToString()); + Console.WriteLine(result.GetProperty("usage").GetProperty("total_tokens").ToString()); + Console.WriteLine(result.GetProperty("max_prompt_tokens").ToString()); + Console.WriteLine(result.GetProperty("max_completion_tokens").ToString()); + Console.WriteLine(result.GetProperty("truncation_strategy").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("tool_choice").ToString()); + Console.WriteLine(result.GetProperty("response_format").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("parallel_tool_calls").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Runs_GetRun_RunsGetRunMaximumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadRuns client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunsClient(); + + Response response = await client.GetRunAsync("sqccjmfw", "acsobiqvtzctqgmfilzbouk", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("thread_id").ToString()); + Console.WriteLine(result.GetProperty("assistant_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("model").ToString()); + Console.WriteLine(result.GetProperty("instructions").ToString()); + Console.WriteLine(result.GetProperty("tools")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("expires_at").ToString()); + Console.WriteLine(result.GetProperty("started_at").ToString()); + Console.WriteLine(result.GetProperty("completed_at").ToString()); + Console.WriteLine(result.GetProperty("cancelled_at").ToString()); + Console.WriteLine(result.GetProperty("failed_at").ToString()); + Console.WriteLine(result.GetProperty("incomplete_details").GetProperty("reason").ToString()); + Console.WriteLine(result.GetProperty("usage").GetProperty("completion_tokens").ToString()); + Console.WriteLine(result.GetProperty("usage").GetProperty("prompt_tokens").ToString()); + Console.WriteLine(result.GetProperty("usage").GetProperty("total_tokens").ToString()); + Console.WriteLine(result.GetProperty("max_prompt_tokens").ToString()); + Console.WriteLine(result.GetProperty("max_completion_tokens").ToString()); + Console.WriteLine(result.GetProperty("truncation_strategy").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("tool_choice").ToString()); + Console.WriteLine(result.GetProperty("response_format").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("parallel_tool_calls").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Runs_GetRun_RunsGetRunMaximumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadRuns client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunsClient(); + + Response response = client.GetRun("sqccjmfw", "acsobiqvtzctqgmfilzbouk"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Runs_GetRun_RunsGetRunMaximumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadRuns client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunsClient(); + + Response response = await client.GetRunAsync("sqccjmfw", "acsobiqvtzctqgmfilzbouk"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Runs_UpdateRun_RunsUpdateRunMaximumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadRuns client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunsClient(); + + using RequestContent content = RequestContent.Create(new + { + metadata = new + { + key5657 = "pzozpdyzydhspttzavjorh", + }, + }); + Response response = client.UpdateRun("wnookprnxkufoddul", "aifrevvhqlpbxsdkflwkzpdlyewggr", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("thread_id").ToString()); + Console.WriteLine(result.GetProperty("assistant_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("model").ToString()); + Console.WriteLine(result.GetProperty("instructions").ToString()); + Console.WriteLine(result.GetProperty("tools")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("expires_at").ToString()); + Console.WriteLine(result.GetProperty("started_at").ToString()); + Console.WriteLine(result.GetProperty("completed_at").ToString()); + Console.WriteLine(result.GetProperty("cancelled_at").ToString()); + Console.WriteLine(result.GetProperty("failed_at").ToString()); + Console.WriteLine(result.GetProperty("incomplete_details").GetProperty("reason").ToString()); + Console.WriteLine(result.GetProperty("usage").GetProperty("completion_tokens").ToString()); + Console.WriteLine(result.GetProperty("usage").GetProperty("prompt_tokens").ToString()); + Console.WriteLine(result.GetProperty("usage").GetProperty("total_tokens").ToString()); + Console.WriteLine(result.GetProperty("max_prompt_tokens").ToString()); + Console.WriteLine(result.GetProperty("max_completion_tokens").ToString()); + Console.WriteLine(result.GetProperty("truncation_strategy").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("tool_choice").ToString()); + Console.WriteLine(result.GetProperty("response_format").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("parallel_tool_calls").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Runs_UpdateRun_RunsUpdateRunMaximumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadRuns client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunsClient(); + + using RequestContent content = RequestContent.Create(new + { + metadata = new + { + key5657 = "pzozpdyzydhspttzavjorh", + }, + }); + Response response = await client.UpdateRunAsync("wnookprnxkufoddul", "aifrevvhqlpbxsdkflwkzpdlyewggr", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("thread_id").ToString()); + Console.WriteLine(result.GetProperty("assistant_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("model").ToString()); + Console.WriteLine(result.GetProperty("instructions").ToString()); + Console.WriteLine(result.GetProperty("tools")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("expires_at").ToString()); + Console.WriteLine(result.GetProperty("started_at").ToString()); + Console.WriteLine(result.GetProperty("completed_at").ToString()); + Console.WriteLine(result.GetProperty("cancelled_at").ToString()); + Console.WriteLine(result.GetProperty("failed_at").ToString()); + Console.WriteLine(result.GetProperty("incomplete_details").GetProperty("reason").ToString()); + Console.WriteLine(result.GetProperty("usage").GetProperty("completion_tokens").ToString()); + Console.WriteLine(result.GetProperty("usage").GetProperty("prompt_tokens").ToString()); + Console.WriteLine(result.GetProperty("usage").GetProperty("total_tokens").ToString()); + Console.WriteLine(result.GetProperty("max_prompt_tokens").ToString()); + Console.WriteLine(result.GetProperty("max_completion_tokens").ToString()); + Console.WriteLine(result.GetProperty("truncation_strategy").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("tool_choice").ToString()); + Console.WriteLine(result.GetProperty("response_format").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("parallel_tool_calls").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Runs_UpdateRun_RunsUpdateRunMaximumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadRuns client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunsClient(); + + Response response = client.UpdateRun("wnookprnxkufoddul", "aifrevvhqlpbxsdkflwkzpdlyewggr"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Runs_UpdateRun_RunsUpdateRunMaximumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadRuns client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunsClient(); + + Response response = await client.UpdateRunAsync("wnookprnxkufoddul", "aifrevvhqlpbxsdkflwkzpdlyewggr"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Runs_SubmitToolOutputsToRun_RunsSubmitToolOutputsToRunMaximumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadRuns client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunsClient(); + + using RequestContent content = RequestContent.Create(new + { + tool_outputs = new object[] + { +new +{ +tool_call_id = "jccizgl", +output = "tfpajqwuaghahhyzmn", +} + }, + stream = true, + }); + Response response = client.SubmitToolOutputsToRun("fponkaqg", "qt", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("thread_id").ToString()); + Console.WriteLine(result.GetProperty("assistant_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("model").ToString()); + Console.WriteLine(result.GetProperty("instructions").ToString()); + Console.WriteLine(result.GetProperty("tools")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("expires_at").ToString()); + Console.WriteLine(result.GetProperty("started_at").ToString()); + Console.WriteLine(result.GetProperty("completed_at").ToString()); + Console.WriteLine(result.GetProperty("cancelled_at").ToString()); + Console.WriteLine(result.GetProperty("failed_at").ToString()); + Console.WriteLine(result.GetProperty("incomplete_details").GetProperty("reason").ToString()); + Console.WriteLine(result.GetProperty("usage").GetProperty("completion_tokens").ToString()); + Console.WriteLine(result.GetProperty("usage").GetProperty("prompt_tokens").ToString()); + Console.WriteLine(result.GetProperty("usage").GetProperty("total_tokens").ToString()); + Console.WriteLine(result.GetProperty("max_prompt_tokens").ToString()); + Console.WriteLine(result.GetProperty("max_completion_tokens").ToString()); + Console.WriteLine(result.GetProperty("truncation_strategy").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("tool_choice").ToString()); + Console.WriteLine(result.GetProperty("response_format").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("parallel_tool_calls").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Runs_SubmitToolOutputsToRun_RunsSubmitToolOutputsToRunMaximumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadRuns client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunsClient(); + + using RequestContent content = RequestContent.Create(new + { + tool_outputs = new object[] + { +new +{ +tool_call_id = "jccizgl", +output = "tfpajqwuaghahhyzmn", +} + }, + stream = true, + }); + Response response = await client.SubmitToolOutputsToRunAsync("fponkaqg", "qt", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("thread_id").ToString()); + Console.WriteLine(result.GetProperty("assistant_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("model").ToString()); + Console.WriteLine(result.GetProperty("instructions").ToString()); + Console.WriteLine(result.GetProperty("tools")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("expires_at").ToString()); + Console.WriteLine(result.GetProperty("started_at").ToString()); + Console.WriteLine(result.GetProperty("completed_at").ToString()); + Console.WriteLine(result.GetProperty("cancelled_at").ToString()); + Console.WriteLine(result.GetProperty("failed_at").ToString()); + Console.WriteLine(result.GetProperty("incomplete_details").GetProperty("reason").ToString()); + Console.WriteLine(result.GetProperty("usage").GetProperty("completion_tokens").ToString()); + Console.WriteLine(result.GetProperty("usage").GetProperty("prompt_tokens").ToString()); + Console.WriteLine(result.GetProperty("usage").GetProperty("total_tokens").ToString()); + Console.WriteLine(result.GetProperty("max_prompt_tokens").ToString()); + Console.WriteLine(result.GetProperty("max_completion_tokens").ToString()); + Console.WriteLine(result.GetProperty("truncation_strategy").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("tool_choice").ToString()); + Console.WriteLine(result.GetProperty("response_format").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("parallel_tool_calls").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Runs_SubmitToolOutputsToRun_RunsSubmitToolOutputsToRunMaximumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadRuns client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunsClient(); + + Response response = client.SubmitToolOutputsToRun("fponkaqg", "qt", new ToolOutput[] + { +new ToolOutput +{ +ToolCallId = "jccizgl", +Output = "tfpajqwuaghahhyzmn", +} + }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Runs_SubmitToolOutputsToRun_RunsSubmitToolOutputsToRunMaximumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadRuns client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunsClient(); + + Response response = await client.SubmitToolOutputsToRunAsync("fponkaqg", "qt", new ToolOutput[] + { +new ToolOutput +{ +ToolCallId = "jccizgl", +Output = "tfpajqwuaghahhyzmn", +} + }); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Runs_CancelRun_RunsCancelRunMaximumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadRuns client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunsClient(); + + Response response = client.CancelRun("cfgrrkaqlomzywojd", "dgpclan", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("thread_id").ToString()); + Console.WriteLine(result.GetProperty("assistant_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("model").ToString()); + Console.WriteLine(result.GetProperty("instructions").ToString()); + Console.WriteLine(result.GetProperty("tools")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("expires_at").ToString()); + Console.WriteLine(result.GetProperty("started_at").ToString()); + Console.WriteLine(result.GetProperty("completed_at").ToString()); + Console.WriteLine(result.GetProperty("cancelled_at").ToString()); + Console.WriteLine(result.GetProperty("failed_at").ToString()); + Console.WriteLine(result.GetProperty("incomplete_details").GetProperty("reason").ToString()); + Console.WriteLine(result.GetProperty("usage").GetProperty("completion_tokens").ToString()); + Console.WriteLine(result.GetProperty("usage").GetProperty("prompt_tokens").ToString()); + Console.WriteLine(result.GetProperty("usage").GetProperty("total_tokens").ToString()); + Console.WriteLine(result.GetProperty("max_prompt_tokens").ToString()); + Console.WriteLine(result.GetProperty("max_completion_tokens").ToString()); + Console.WriteLine(result.GetProperty("truncation_strategy").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("tool_choice").ToString()); + Console.WriteLine(result.GetProperty("response_format").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("parallel_tool_calls").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Runs_CancelRun_RunsCancelRunMaximumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadRuns client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunsClient(); + + Response response = await client.CancelRunAsync("cfgrrkaqlomzywojd", "dgpclan", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("thread_id").ToString()); + Console.WriteLine(result.GetProperty("assistant_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("model").ToString()); + Console.WriteLine(result.GetProperty("instructions").ToString()); + Console.WriteLine(result.GetProperty("tools")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("expires_at").ToString()); + Console.WriteLine(result.GetProperty("started_at").ToString()); + Console.WriteLine(result.GetProperty("completed_at").ToString()); + Console.WriteLine(result.GetProperty("cancelled_at").ToString()); + Console.WriteLine(result.GetProperty("failed_at").ToString()); + Console.WriteLine(result.GetProperty("incomplete_details").GetProperty("reason").ToString()); + Console.WriteLine(result.GetProperty("usage").GetProperty("completion_tokens").ToString()); + Console.WriteLine(result.GetProperty("usage").GetProperty("prompt_tokens").ToString()); + Console.WriteLine(result.GetProperty("usage").GetProperty("total_tokens").ToString()); + Console.WriteLine(result.GetProperty("max_prompt_tokens").ToString()); + Console.WriteLine(result.GetProperty("max_completion_tokens").ToString()); + Console.WriteLine(result.GetProperty("truncation_strategy").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("tool_choice").ToString()); + Console.WriteLine(result.GetProperty("response_format").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("parallel_tool_calls").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Runs_CancelRun_RunsCancelRunMaximumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadRuns client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunsClient(); + + Response response = client.CancelRun("cfgrrkaqlomzywojd", "dgpclan"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Runs_CancelRun_RunsCancelRunMaximumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadRuns client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunsClient(); + + Response response = await client.CancelRunAsync("cfgrrkaqlomzywojd", "dgpclan"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Runs_GetRuns_RunsListRunsMaximumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadRuns client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunsClient(); + + foreach (BinaryData item in client.GetRuns("luhcnx", 29, "asc", "lbxjqlfasgdfb", "ukgtkdgvuzzjlnjjdxotjvgw", (RequestContext)null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("thread_id").ToString()); + Console.WriteLine(result.GetProperty("assistant_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("model").ToString()); + Console.WriteLine(result.GetProperty("instructions").ToString()); + Console.WriteLine(result.GetProperty("tools")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("expires_at").ToString()); + Console.WriteLine(result.GetProperty("started_at").ToString()); + Console.WriteLine(result.GetProperty("completed_at").ToString()); + Console.WriteLine(result.GetProperty("cancelled_at").ToString()); + Console.WriteLine(result.GetProperty("failed_at").ToString()); + Console.WriteLine(result.GetProperty("incomplete_details").GetProperty("reason").ToString()); + Console.WriteLine(result.GetProperty("usage").GetProperty("completion_tokens").ToString()); + Console.WriteLine(result.GetProperty("usage").GetProperty("prompt_tokens").ToString()); + Console.WriteLine(result.GetProperty("usage").GetProperty("total_tokens").ToString()); + Console.WriteLine(result.GetProperty("max_prompt_tokens").ToString()); + Console.WriteLine(result.GetProperty("max_completion_tokens").ToString()); + Console.WriteLine(result.GetProperty("truncation_strategy").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("tool_choice").ToString()); + Console.WriteLine(result.GetProperty("response_format").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("parallel_tool_calls").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Runs_GetRuns_RunsListRunsMaximumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadRuns client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunsClient(); + + await foreach (BinaryData item in client.GetRunsAsync("luhcnx", 29, "asc", "lbxjqlfasgdfb", "ukgtkdgvuzzjlnjjdxotjvgw", (RequestContext)null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("thread_id").ToString()); + Console.WriteLine(result.GetProperty("assistant_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("model").ToString()); + Console.WriteLine(result.GetProperty("instructions").ToString()); + Console.WriteLine(result.GetProperty("tools")[0].GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("expires_at").ToString()); + Console.WriteLine(result.GetProperty("started_at").ToString()); + Console.WriteLine(result.GetProperty("completed_at").ToString()); + Console.WriteLine(result.GetProperty("cancelled_at").ToString()); + Console.WriteLine(result.GetProperty("failed_at").ToString()); + Console.WriteLine(result.GetProperty("incomplete_details").GetProperty("reason").ToString()); + Console.WriteLine(result.GetProperty("usage").GetProperty("completion_tokens").ToString()); + Console.WriteLine(result.GetProperty("usage").GetProperty("prompt_tokens").ToString()); + Console.WriteLine(result.GetProperty("usage").GetProperty("total_tokens").ToString()); + Console.WriteLine(result.GetProperty("max_prompt_tokens").ToString()); + Console.WriteLine(result.GetProperty("max_completion_tokens").ToString()); + Console.WriteLine(result.GetProperty("truncation_strategy").GetProperty("type").ToString()); + Console.WriteLine(result.GetProperty("tool_choice").ToString()); + Console.WriteLine(result.GetProperty("response_format").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + Console.WriteLine(result.GetProperty("parallel_tool_calls").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Runs_GetRuns_RunsListRunsMaximumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadRuns client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunsClient(); + + foreach (ThreadRun item in client.GetRuns("luhcnx")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Runs_GetRuns_RunsListRunsMaximumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + ThreadRuns client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadRunsClient(); + + await foreach (ThreadRun item in client.GetRunsAsync("luhcnx")) + { + } + } + } +} diff --git a/sdk/ai/Azure.AI.Agents.Persistent/tests/Generated/Samples/Samples_Threads.cs b/sdk/ai/Azure.AI.Agents.Persistent/tests/Generated/Samples/Samples_Threads.cs new file mode 100644 index 000000000000..380018475ea4 --- /dev/null +++ b/sdk/ai/Azure.AI.Agents.Persistent/tests/Generated/Samples/Samples_Threads.cs @@ -0,0 +1,967 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.AI.Agents.Persistent.Samples +{ + public partial class Samples_Threads + { + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Threads_CreateThread_ThreadsCreateThreadMaximumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Threads client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadsClient(); + + using RequestContent content = RequestContent.Create(new + { + messages = new object[] + { +new +{ +role = "user", +attachments = new object[] +{ +new +{ +file_id = "uslxhectlaptpkjcxnjzhkzprso", +data_source = new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +tools = Array.Empty(), +} +}, +metadata = new +{ +key3153 = "qn", +}, +} + }, + tool_resources = new + { + code_interpreter = new + { + file_ids = new object[] + { +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul" + }, + data_sources = new object[] + { +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +} + }, + }, + file_search = new + { + vector_store_ids = new object[] + { +"jkrrjfupyxehwacylflmx" + }, + vector_stores = new object[] + { +new +{ +name = "bftl", +configuration = new +{ +data_sources = new object[] +{ +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +} +}, +}, +} + }, + }, + azure_ai_search = new + { + indexes = new object[] + { +new +{ +index_connection_id = "zkqk", +index_name = "yvxhjyiomlffkuboqokcojfd", +query_type = "simple", +top_k = 27, +filter = "jjbewpsjmygox", +index_asset_id = "iwfmzmxzh", +} + }, + }, + }, + metadata = new + { + key3592 = "ceowgmecukwwpkdpcolnctahhocsk", + }, + }); + Response response = client.CreateThread(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("tool_resources").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Threads_CreateThread_ThreadsCreateThreadMaximumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Threads client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadsClient(); + + using RequestContent content = RequestContent.Create(new + { + messages = new object[] + { +new +{ +role = "user", +attachments = new object[] +{ +new +{ +file_id = "uslxhectlaptpkjcxnjzhkzprso", +data_source = new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +tools = Array.Empty(), +} +}, +metadata = new +{ +key3153 = "qn", +}, +} + }, + tool_resources = new + { + code_interpreter = new + { + file_ids = new object[] + { +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul" + }, + data_sources = new object[] + { +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +} + }, + }, + file_search = new + { + vector_store_ids = new object[] + { +"jkrrjfupyxehwacylflmx" + }, + vector_stores = new object[] + { +new +{ +name = "bftl", +configuration = new +{ +data_sources = new object[] +{ +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +} +}, +}, +} + }, + }, + azure_ai_search = new + { + indexes = new object[] + { +new +{ +index_connection_id = "zkqk", +index_name = "yvxhjyiomlffkuboqokcojfd", +query_type = "simple", +top_k = 27, +filter = "jjbewpsjmygox", +index_asset_id = "iwfmzmxzh", +} + }, + }, + }, + metadata = new + { + key3592 = "ceowgmecukwwpkdpcolnctahhocsk", + }, + }); + Response response = await client.CreateThreadAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("tool_resources").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Threads_CreateThread_ThreadsCreateThreadMaximumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Threads client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadsClient(); + + Response response = client.CreateThread(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Threads_CreateThread_ThreadsCreateThreadMaximumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Threads client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadsClient(); + + Response response = await client.CreateThreadAsync(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Threads_GetThread_ThreadsGetThreadMaximumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Threads client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadsClient(); + + Response response = client.GetThread("hxzrocmui", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("tool_resources").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Threads_GetThread_ThreadsGetThreadMaximumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Threads client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadsClient(); + + Response response = await client.GetThreadAsync("hxzrocmui", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("tool_resources").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Threads_GetThread_ThreadsGetThreadMaximumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Threads client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadsClient(); + + Response response = client.GetThread("hxzrocmui"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Threads_GetThread_ThreadsGetThreadMaximumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Threads client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadsClient(); + + Response response = await client.GetThreadAsync("hxzrocmui"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Threads_GetThread_ThreadsGetThreadMinimumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Threads client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadsClient(); + + Response response = client.GetThread("rhseczbsktxawm", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("tool_resources").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Threads_GetThread_ThreadsGetThreadMinimumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Threads client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadsClient(); + + Response response = await client.GetThreadAsync("rhseczbsktxawm", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("tool_resources").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Threads_GetThread_ThreadsGetThreadMinimumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Threads client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadsClient(); + + Response response = client.GetThread("rhseczbsktxawm"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Threads_GetThread_ThreadsGetThreadMinimumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Threads client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadsClient(); + + Response response = await client.GetThreadAsync("rhseczbsktxawm"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Threads_UpdateThread_ThreadsUpdateThreadMaximumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Threads client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadsClient(); + + using RequestContent content = RequestContent.Create(new + { + tool_resources = new + { + code_interpreter = new + { + file_ids = new object[] + { +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul" + }, + data_sources = new object[] + { +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +} + }, + }, + file_search = new + { + vector_store_ids = new object[] + { +"jkrrjfupyxehwacylflmx" + }, + vector_stores = new object[] + { +new +{ +name = "bftl", +configuration = new +{ +data_sources = new object[] +{ +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +} +}, +}, +} + }, + }, + azure_ai_search = new + { + indexes = new object[] + { +new +{ +index_connection_id = "zkqk", +index_name = "yvxhjyiomlffkuboqokcojfd", +query_type = "simple", +top_k = 27, +filter = "jjbewpsjmygox", +index_asset_id = "iwfmzmxzh", +} + }, + }, + }, + metadata = new + { + key519 = "wfrlgjrbfxnwuz", + }, + }); + Response response = client.UpdateThread("rsiw", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("tool_resources").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Threads_UpdateThread_ThreadsUpdateThreadMaximumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Threads client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadsClient(); + + using RequestContent content = RequestContent.Create(new + { + tool_resources = new + { + code_interpreter = new + { + file_ids = new object[] + { +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul", +"nfbbvmtttxtmwzmjtkzhgul" + }, + data_sources = new object[] + { +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +} + }, + }, + file_search = new + { + vector_store_ids = new object[] + { +"jkrrjfupyxehwacylflmx" + }, + vector_stores = new object[] + { +new +{ +name = "bftl", +configuration = new +{ +data_sources = new object[] +{ +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +} +}, +}, +} + }, + }, + azure_ai_search = new + { + indexes = new object[] + { +new +{ +index_connection_id = "zkqk", +index_name = "yvxhjyiomlffkuboqokcojfd", +query_type = "simple", +top_k = 27, +filter = "jjbewpsjmygox", +index_asset_id = "iwfmzmxzh", +} + }, + }, + }, + metadata = new + { + key519 = "wfrlgjrbfxnwuz", + }, + }); + Response response = await client.UpdateThreadAsync("rsiw", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("tool_resources").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Threads_UpdateThread_ThreadsUpdateThreadMaximumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Threads client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadsClient(); + + Response response = client.UpdateThread("rsiw"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Threads_UpdateThread_ThreadsUpdateThreadMaximumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Threads client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadsClient(); + + Response response = await client.UpdateThreadAsync("rsiw"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Threads_UpdateThread_ThreadsUpdateThreadMinimumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Threads client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadsClient(); + + using RequestContent content = RequestContent.Create(new object()); + Response response = client.UpdateThread("rsiw", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("tool_resources").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Threads_UpdateThread_ThreadsUpdateThreadMinimumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Threads client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadsClient(); + + using RequestContent content = RequestContent.Create(new object()); + Response response = await client.UpdateThreadAsync("rsiw", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("tool_resources").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Threads_UpdateThread_ThreadsUpdateThreadMinimumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Threads client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadsClient(); + + Response response = client.UpdateThread("rsiw"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Threads_UpdateThread_ThreadsUpdateThreadMinimumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Threads client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadsClient(); + + Response response = await client.UpdateThreadAsync("rsiw"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Threads_GetThreads_ThreadsListThreadsMaximumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Threads client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadsClient(); + + foreach (BinaryData item in client.GetThreads(13, "asc", "qwsovpslduftmfinaxtskq", "ycnypgacaospvdmaffiwipymykd", (RequestContext)null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("tool_resources").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Threads_GetThreads_ThreadsListThreadsMaximumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Threads client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadsClient(); + + await foreach (BinaryData item in client.GetThreadsAsync(13, "asc", "qwsovpslduftmfinaxtskq", "ycnypgacaospvdmaffiwipymykd", (RequestContext)null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("tool_resources").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Threads_GetThreads_ThreadsListThreadsMaximumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Threads client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadsClient(); + + foreach (PersistentAgentThread item in client.GetThreads()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Threads_GetThreads_ThreadsListThreadsMaximumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Threads client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadsClient(); + + await foreach (PersistentAgentThread item in client.GetThreadsAsync()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Threads_GetThreads_ThreadsListThreadsMinimumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Threads client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadsClient(); + + foreach (BinaryData item in client.GetThreads((int?)null, (string)null, (string)null, (string)null, (RequestContext)null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("tool_resources").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Threads_GetThreads_ThreadsListThreadsMinimumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Threads client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadsClient(); + + await foreach (BinaryData item in client.GetThreadsAsync((int?)null, (string)null, (string)null, (string)null, (RequestContext)null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("tool_resources").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_Threads_GetThreads_ThreadsListThreadsMinimumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Threads client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadsClient(); + + foreach (PersistentAgentThread item in client.GetThreads()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_Threads_GetThreads_ThreadsListThreadsMinimumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + Threads client = new PersistentAgentsAdministrationClient(endpoint, credential).GetThreadsClient(); + + await foreach (PersistentAgentThread item in client.GetThreadsAsync()) + { + } + } + } +} diff --git a/sdk/ai/Azure.AI.Agents.Persistent/tests/Generated/Samples/Samples_VectorStoreFileBatches.cs b/sdk/ai/Azure.AI.Agents.Persistent/tests/Generated/Samples/Samples_VectorStoreFileBatches.cs new file mode 100644 index 000000000000..776b60874237 --- /dev/null +++ b/sdk/ai/Azure.AI.Agents.Persistent/tests/Generated/Samples/Samples_VectorStoreFileBatches.cs @@ -0,0 +1,4307 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.AI.Agents.Persistent.Samples +{ + public partial class Samples_VectorStoreFileBatches + { + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_VectorStoreFileBatches_CreateVectorStoreFileBatch_VectorStoreFileBatchesCreateVectorStoreFileBatchMaximumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStoreFileBatches client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFileBatchesClient(); + + using RequestContent content = RequestContent.Create(new + { + file_ids = new object[] + { +"sseovtmhsfpghlqyzulhnhhhasall", +"sseovtmhsfpghlqyzulhnhhhasall", +"sseovtmhsfpghlqyzulhnhhhasall", +"sseovtmhsfpghlqyzulhnhhhasall", +"sseovtmhsfpghlqyzulhnhhhasall", +"sseovtmhsfpghlqyzulhnhhhasall", +"sseovtmhsfpghlqyzulhnhhhasall", +"sseovtmhsfpghlqyzulhnhhhasall" + }, + data_sources = new object[] + { +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +} + }, + }); + Response response = client.CreateVectorStoreFileBatch("bvcjtemrnqtycjuaerlxllednm", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("vector_store_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("in_progress").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("completed").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("failed").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("cancelled").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("total").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_VectorStoreFileBatches_CreateVectorStoreFileBatch_VectorStoreFileBatchesCreateVectorStoreFileBatchMaximumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStoreFileBatches client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFileBatchesClient(); + + using RequestContent content = RequestContent.Create(new + { + file_ids = new object[] + { +"sseovtmhsfpghlqyzulhnhhhasall", +"sseovtmhsfpghlqyzulhnhhhasall", +"sseovtmhsfpghlqyzulhnhhhasall", +"sseovtmhsfpghlqyzulhnhhhasall", +"sseovtmhsfpghlqyzulhnhhhasall", +"sseovtmhsfpghlqyzulhnhhhasall", +"sseovtmhsfpghlqyzulhnhhhasall", +"sseovtmhsfpghlqyzulhnhhhasall" + }, + data_sources = new object[] + { +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +}, +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +} + }, + }); + Response response = await client.CreateVectorStoreFileBatchAsync("bvcjtemrnqtycjuaerlxllednm", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("vector_store_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("in_progress").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("completed").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("failed").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("cancelled").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("total").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_VectorStoreFileBatches_CreateVectorStoreFileBatch_VectorStoreFileBatchesCreateVectorStoreFileBatchMaximumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStoreFileBatches client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFileBatchesClient(); + + Response response = client.CreateVectorStoreFileBatch("bvcjtemrnqtycjuaerlxllednm"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_VectorStoreFileBatches_CreateVectorStoreFileBatch_VectorStoreFileBatchesCreateVectorStoreFileBatchMaximumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStoreFileBatches client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFileBatchesClient(); + + Response response = await client.CreateVectorStoreFileBatchAsync("bvcjtemrnqtycjuaerlxllednm"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_VectorStoreFileBatches_CreateVectorStoreFileBatch_VectorStoreFileBatchesCreateVectorStoreFileBatchMinimumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStoreFileBatches client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFileBatchesClient(); + + using RequestContent content = RequestContent.Create(new object()); + Response response = client.CreateVectorStoreFileBatch("eyxdrn", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("vector_store_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("in_progress").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("completed").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("failed").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("cancelled").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("total").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_VectorStoreFileBatches_CreateVectorStoreFileBatch_VectorStoreFileBatchesCreateVectorStoreFileBatchMinimumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStoreFileBatches client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFileBatchesClient(); + + using RequestContent content = RequestContent.Create(new object()); + Response response = await client.CreateVectorStoreFileBatchAsync("eyxdrn", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("vector_store_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("in_progress").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("completed").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("failed").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("cancelled").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("total").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_VectorStoreFileBatches_CreateVectorStoreFileBatch_VectorStoreFileBatchesCreateVectorStoreFileBatchMinimumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStoreFileBatches client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFileBatchesClient(); + + Response response = client.CreateVectorStoreFileBatch("eyxdrn"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_VectorStoreFileBatches_CreateVectorStoreFileBatch_VectorStoreFileBatchesCreateVectorStoreFileBatchMinimumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStoreFileBatches client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFileBatchesClient(); + + Response response = await client.CreateVectorStoreFileBatchAsync("eyxdrn"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_VectorStoreFileBatches_GetVectorStoreFileBatch_VectorStoreFileBatchesGetVectorStoreFileBatchMaximumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStoreFileBatches client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFileBatchesClient(); + + Response response = client.GetVectorStoreFileBatch("kdcqszoqvfaipuhvijnwxmegovmeuv", "juytv", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("vector_store_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("in_progress").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("completed").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("failed").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("cancelled").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("total").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_VectorStoreFileBatches_GetVectorStoreFileBatch_VectorStoreFileBatchesGetVectorStoreFileBatchMaximumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStoreFileBatches client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFileBatchesClient(); + + Response response = await client.GetVectorStoreFileBatchAsync("kdcqszoqvfaipuhvijnwxmegovmeuv", "juytv", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("vector_store_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("in_progress").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("completed").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("failed").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("cancelled").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("total").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_VectorStoreFileBatches_GetVectorStoreFileBatch_VectorStoreFileBatchesGetVectorStoreFileBatchMaximumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStoreFileBatches client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFileBatchesClient(); + + Response response = client.GetVectorStoreFileBatch("kdcqszoqvfaipuhvijnwxmegovmeuv", "juytv"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_VectorStoreFileBatches_GetVectorStoreFileBatch_VectorStoreFileBatchesGetVectorStoreFileBatchMaximumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStoreFileBatches client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFileBatchesClient(); + + Response response = await client.GetVectorStoreFileBatchAsync("kdcqszoqvfaipuhvijnwxmegovmeuv", "juytv"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_VectorStoreFileBatches_GetVectorStoreFileBatch_VectorStoreFileBatchesGetVectorStoreFileBatchMinimumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStoreFileBatches client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFileBatchesClient(); + + Response response = client.GetVectorStoreFileBatch("kz", "pmzxfueg", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("vector_store_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("in_progress").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("completed").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("failed").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("cancelled").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("total").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_VectorStoreFileBatches_GetVectorStoreFileBatch_VectorStoreFileBatchesGetVectorStoreFileBatchMinimumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStoreFileBatches client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFileBatchesClient(); + + Response response = await client.GetVectorStoreFileBatchAsync("kz", "pmzxfueg", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("vector_store_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("in_progress").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("completed").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("failed").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("cancelled").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("total").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_VectorStoreFileBatches_GetVectorStoreFileBatch_VectorStoreFileBatchesGetVectorStoreFileBatchMinimumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStoreFileBatches client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFileBatchesClient(); + + Response response = client.GetVectorStoreFileBatch("kz", "pmzxfueg"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_VectorStoreFileBatches_GetVectorStoreFileBatch_VectorStoreFileBatchesGetVectorStoreFileBatchMinimumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStoreFileBatches client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFileBatchesClient(); + + Response response = await client.GetVectorStoreFileBatchAsync("kz", "pmzxfueg"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_VectorStoreFileBatches_CancelVectorStoreFileBatch_VectorStoreFileBatchesCancelVectorStoreFileBatchMaximumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStoreFileBatches client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFileBatchesClient(); + + Response response = client.CancelVectorStoreFileBatch("kpjojtaxsspjvzyxmfgwxusqde", "lqtvimqtqecqy", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("vector_store_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("in_progress").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("completed").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("failed").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("cancelled").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("total").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_VectorStoreFileBatches_CancelVectorStoreFileBatch_VectorStoreFileBatchesCancelVectorStoreFileBatchMaximumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStoreFileBatches client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFileBatchesClient(); + + Response response = await client.CancelVectorStoreFileBatchAsync("kpjojtaxsspjvzyxmfgwxusqde", "lqtvimqtqecqy", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("vector_store_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("in_progress").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("completed").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("failed").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("cancelled").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("total").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_VectorStoreFileBatches_CancelVectorStoreFileBatch_VectorStoreFileBatchesCancelVectorStoreFileBatchMaximumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStoreFileBatches client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFileBatchesClient(); + + Response response = client.CancelVectorStoreFileBatch("kpjojtaxsspjvzyxmfgwxusqde", "lqtvimqtqecqy"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_VectorStoreFileBatches_CancelVectorStoreFileBatch_VectorStoreFileBatchesCancelVectorStoreFileBatchMaximumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStoreFileBatches client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFileBatchesClient(); + + Response response = await client.CancelVectorStoreFileBatchAsync("kpjojtaxsspjvzyxmfgwxusqde", "lqtvimqtqecqy"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_VectorStoreFileBatches_CancelVectorStoreFileBatch_VectorStoreFileBatchesCancelVectorStoreFileBatchMinimumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStoreFileBatches client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFileBatchesClient(); + + Response response = client.CancelVectorStoreFileBatch("fldyjeftzzkqinhz", "qsniwwejf", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("vector_store_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("in_progress").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("completed").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("failed").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("cancelled").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("total").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_VectorStoreFileBatches_CancelVectorStoreFileBatch_VectorStoreFileBatchesCancelVectorStoreFileBatchMinimumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStoreFileBatches client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFileBatchesClient(); + + Response response = await client.CancelVectorStoreFileBatchAsync("fldyjeftzzkqinhz", "qsniwwejf", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("vector_store_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("in_progress").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("completed").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("failed").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("cancelled").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("total").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_VectorStoreFileBatches_CancelVectorStoreFileBatch_VectorStoreFileBatchesCancelVectorStoreFileBatchMinimumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStoreFileBatches client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFileBatchesClient(); + + Response response = client.CancelVectorStoreFileBatch("fldyjeftzzkqinhz", "qsniwwejf"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_VectorStoreFileBatches_CancelVectorStoreFileBatch_VectorStoreFileBatchesCancelVectorStoreFileBatchMinimumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStoreFileBatches client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFileBatchesClient(); + + Response response = await client.CancelVectorStoreFileBatchAsync("fldyjeftzzkqinhz", "qsniwwejf"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_VectorStoreFileBatches_GetVectorStoreFileBatchFiles_VectorStoreFileBatchesListVectorStoreFileBatchFilesMaximumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStoreFileBatches client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFileBatchesClient(); + + foreach (BinaryData item in client.GetVectorStoreFileBatchFiles("itweqinnhpanpqxkxwqfi", "b", "in_progress", 22, "asc", "uotopjkuhxuxypqooudmdt", "lunnzgjqyjlrlvsldrkhrjvaqfovp", (RequestContext)null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("usage_bytes").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("vector_store_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("chunking_strategy").GetProperty("type").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_VectorStoreFileBatches_GetVectorStoreFileBatchFiles_VectorStoreFileBatchesListVectorStoreFileBatchFilesMaximumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStoreFileBatches client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFileBatchesClient(); + + await foreach (BinaryData item in client.GetVectorStoreFileBatchFilesAsync("itweqinnhpanpqxkxwqfi", "b", "in_progress", 22, "asc", "uotopjkuhxuxypqooudmdt", "lunnzgjqyjlrlvsldrkhrjvaqfovp", (RequestContext)null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("usage_bytes").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("vector_store_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("chunking_strategy").GetProperty("type").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_VectorStoreFileBatches_GetVectorStoreFileBatchFiles_VectorStoreFileBatchesListVectorStoreFileBatchFilesMaximumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStoreFileBatches client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFileBatchesClient(); + + foreach (VectorStoreFile item in client.GetVectorStoreFileBatchFiles("itweqinnhpanpqxkxwqfi", "b")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_VectorStoreFileBatches_GetVectorStoreFileBatchFiles_VectorStoreFileBatchesListVectorStoreFileBatchFilesMaximumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStoreFileBatches client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFileBatchesClient(); + + await foreach (VectorStoreFile item in client.GetVectorStoreFileBatchFilesAsync("itweqinnhpanpqxkxwqfi", "b")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_VectorStoreFileBatches_GetVectorStoreFileBatchFiles_VectorStoreFileBatchesListVectorStoreFileBatchFilesMinimumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStoreFileBatches client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFileBatchesClient(); + + foreach (BinaryData item in client.GetVectorStoreFileBatchFiles("awzuqhqpzl", "gipykvmemjcss", (string)null, (int?)null, (string)null, (string)null, (string)null, (RequestContext)null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("usage_bytes").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("vector_store_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("chunking_strategy").GetProperty("type").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_VectorStoreFileBatches_GetVectorStoreFileBatchFiles_VectorStoreFileBatchesListVectorStoreFileBatchFilesMinimumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStoreFileBatches client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFileBatchesClient(); + + await foreach (BinaryData item in client.GetVectorStoreFileBatchFilesAsync("awzuqhqpzl", "gipykvmemjcss", (string)null, (int?)null, (string)null, (string)null, (string)null, (RequestContext)null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("usage_bytes").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("vector_store_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("chunking_strategy").GetProperty("type").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_VectorStoreFileBatches_GetVectorStoreFileBatchFiles_VectorStoreFileBatchesListVectorStoreFileBatchFilesMinimumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStoreFileBatches client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFileBatchesClient(); + + foreach (VectorStoreFile item in client.GetVectorStoreFileBatchFiles("awzuqhqpzl", "gipykvmemjcss")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_VectorStoreFileBatches_GetVectorStoreFileBatchFiles_VectorStoreFileBatchesListVectorStoreFileBatchFilesMinimumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStoreFileBatches client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFileBatchesClient(); + + await foreach (VectorStoreFile item in client.GetVectorStoreFileBatchFilesAsync("awzuqhqpzl", "gipykvmemjcss")) + { + } + } + } +} diff --git a/sdk/ai/Azure.AI.Agents.Persistent/tests/Generated/Samples/Samples_VectorStoreFiles.cs b/sdk/ai/Azure.AI.Agents.Persistent/tests/Generated/Samples/Samples_VectorStoreFiles.cs new file mode 100644 index 000000000000..66cc2cb9f1a9 --- /dev/null +++ b/sdk/ai/Azure.AI.Agents.Persistent/tests/Generated/Samples/Samples_VectorStoreFiles.cs @@ -0,0 +1,379 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.AI.Agents.Persistent.Samples +{ + public partial class Samples_VectorStoreFiles + { + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_VectorStoreFiles_CreateVectorStoreFile_VectorStoreFilesCreateVectorStoreFileMaximumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStoreFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFilesClient(); + + using RequestContent content = RequestContent.Create(new + { + file_id = "emdzaopxo", + data_source = new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + }); + Response response = client.CreateVectorStoreFile("kox", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("usage_bytes").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("vector_store_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("chunking_strategy").GetProperty("type").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_VectorStoreFiles_CreateVectorStoreFile_VectorStoreFilesCreateVectorStoreFileMaximumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStoreFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFilesClient(); + + using RequestContent content = RequestContent.Create(new + { + file_id = "emdzaopxo", + data_source = new + { + uri = "soctjzrqyjyxixlqr", + type = "uri_asset", + }, + }); + Response response = await client.CreateVectorStoreFileAsync("kox", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("usage_bytes").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("vector_store_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("chunking_strategy").GetProperty("type").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_VectorStoreFiles_CreateVectorStoreFile_VectorStoreFilesCreateVectorStoreFileMaximumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStoreFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFilesClient(); + + Response response = client.CreateVectorStoreFile("kox"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_VectorStoreFiles_CreateVectorStoreFile_VectorStoreFilesCreateVectorStoreFileMaximumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStoreFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFilesClient(); + + Response response = await client.CreateVectorStoreFileAsync("kox"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_VectorStoreFiles_GetVectorStoreFile_VectorStoreFilesGetVectorStoreFileMaximumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStoreFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFilesClient(); + + Response response = client.GetVectorStoreFile("bds", "qusinxkarhcskvxntuym", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("usage_bytes").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("vector_store_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("chunking_strategy").GetProperty("type").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_VectorStoreFiles_GetVectorStoreFile_VectorStoreFilesGetVectorStoreFileMaximumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStoreFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFilesClient(); + + Response response = await client.GetVectorStoreFileAsync("bds", "qusinxkarhcskvxntuym", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("usage_bytes").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("vector_store_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("chunking_strategy").GetProperty("type").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_VectorStoreFiles_GetVectorStoreFile_VectorStoreFilesGetVectorStoreFileMaximumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStoreFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFilesClient(); + + Response response = client.GetVectorStoreFile("bds", "qusinxkarhcskvxntuym"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_VectorStoreFiles_GetVectorStoreFile_VectorStoreFilesGetVectorStoreFileMaximumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStoreFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFilesClient(); + + Response response = await client.GetVectorStoreFileAsync("bds", "qusinxkarhcskvxntuym"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_VectorStoreFiles_GetVectorStoreFile_VectorStoreFilesGetVectorStoreFileMinimumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStoreFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFilesClient(); + + Response response = client.GetVectorStoreFile("fakyvuniwxszpqxxcovnohhacypzp", "sar", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("usage_bytes").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("vector_store_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("chunking_strategy").GetProperty("type").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_VectorStoreFiles_GetVectorStoreFile_VectorStoreFilesGetVectorStoreFileMinimumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStoreFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFilesClient(); + + Response response = await client.GetVectorStoreFileAsync("fakyvuniwxszpqxxcovnohhacypzp", "sar", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("usage_bytes").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("vector_store_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("chunking_strategy").GetProperty("type").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_VectorStoreFiles_GetVectorStoreFile_VectorStoreFilesGetVectorStoreFileMinimumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStoreFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFilesClient(); + + Response response = client.GetVectorStoreFile("fakyvuniwxszpqxxcovnohhacypzp", "sar"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_VectorStoreFiles_GetVectorStoreFile_VectorStoreFilesGetVectorStoreFileMinimumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStoreFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFilesClient(); + + Response response = await client.GetVectorStoreFileAsync("fakyvuniwxszpqxxcovnohhacypzp", "sar"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_VectorStoreFiles_GetVectorStoreFiles_VectorStoreFilesListVectorStoreFilesMaximumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStoreFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFilesClient(); + + foreach (BinaryData item in client.GetVectorStoreFiles("nuppye", "in_progress", 8, "asc", "cayfrop", "rdxomcqockbejgfxd", (RequestContext)null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("usage_bytes").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("vector_store_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("chunking_strategy").GetProperty("type").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_VectorStoreFiles_GetVectorStoreFiles_VectorStoreFilesListVectorStoreFilesMaximumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStoreFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFilesClient(); + + await foreach (BinaryData item in client.GetVectorStoreFilesAsync("nuppye", "in_progress", 8, "asc", "cayfrop", "rdxomcqockbejgfxd", (RequestContext)null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("usage_bytes").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("vector_store_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("chunking_strategy").GetProperty("type").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_VectorStoreFiles_GetVectorStoreFiles_VectorStoreFilesListVectorStoreFilesMaximumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStoreFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFilesClient(); + + foreach (VectorStoreFile item in client.GetVectorStoreFiles("nuppye")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_VectorStoreFiles_GetVectorStoreFiles_VectorStoreFilesListVectorStoreFilesMaximumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStoreFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFilesClient(); + + await foreach (VectorStoreFile item in client.GetVectorStoreFilesAsync("nuppye")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_VectorStoreFiles_GetVectorStoreFiles_VectorStoreFilesListVectorStoreFilesMinimumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStoreFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFilesClient(); + + foreach (BinaryData item in client.GetVectorStoreFiles("rijuypqar", (string)null, (int?)null, (string)null, (string)null, (string)null, (RequestContext)null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("usage_bytes").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("vector_store_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("chunking_strategy").GetProperty("type").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_VectorStoreFiles_GetVectorStoreFiles_VectorStoreFilesListVectorStoreFilesMinimumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStoreFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFilesClient(); + + await foreach (BinaryData item in client.GetVectorStoreFilesAsync("rijuypqar", (string)null, (int?)null, (string)null, (string)null, (string)null, (RequestContext)null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("usage_bytes").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("vector_store_id").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("code").ToString()); + Console.WriteLine(result.GetProperty("last_error").GetProperty("message").ToString()); + Console.WriteLine(result.GetProperty("chunking_strategy").GetProperty("type").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_VectorStoreFiles_GetVectorStoreFiles_VectorStoreFilesListVectorStoreFilesMinimumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStoreFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFilesClient(); + + foreach (VectorStoreFile item in client.GetVectorStoreFiles("rijuypqar")) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_VectorStoreFiles_GetVectorStoreFiles_VectorStoreFilesListVectorStoreFilesMinimumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStoreFiles client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoreFilesClient(); + + await foreach (VectorStoreFile item in client.GetVectorStoreFilesAsync("rijuypqar")) + { + } + } + } +} diff --git a/sdk/ai/Azure.AI.Agents.Persistent/tests/Generated/Samples/Samples_VectorStores.cs b/sdk/ai/Azure.AI.Agents.Persistent/tests/Generated/Samples/Samples_VectorStores.cs new file mode 100644 index 000000000000..9d27135b362e --- /dev/null +++ b/sdk/ai/Azure.AI.Agents.Persistent/tests/Generated/Samples/Samples_VectorStores.cs @@ -0,0 +1,747 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Text.Json; +using System.Threading.Tasks; +using Azure.Core; +using Azure.Identity; +using NUnit.Framework; + +namespace Azure.AI.Agents.Persistent.Samples +{ + public partial class Samples_VectorStores + { + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_VectorStores_CreateVectorStore_VectorStoresCreateVectorStoreMaximumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStores client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoresClient(); + + using RequestContent content = RequestContent.Create(new + { + file_ids = new object[] + { +"hileejdmsljnblywbqgrycpbeczbt", +"hileejdmsljnblywbqgrycpbeczbt", +"hileejdmsljnblywbqgrycpbeczbt", +"hileejdmsljnblywbqgrycpbeczbt", +"hileejdmsljnblywbqgrycpbeczbt", +"hileejdmsljnblywbqgrycpbeczbt", +"hileejdmsljnblywbqgrycpbeczbt", +"hileejdmsljnblywbqgrycpbeczbt", +"hileejdmsljnblywbqgrycpbeczbt", +"hileejdmsljnblywbqgrycpbeczbt", +"hileejdmsljnblywbqgrycpbeczbt", +"hileejdmsljnblywbqgrycpbeczbt", +"hileejdmsljnblywbqgrycpbeczbt", +"hileejdmsljnblywbqgrycpbeczbt", +"hileejdmsljnblywbqgrycpbeczbt", +"hileejdmsljnblywbqgrycpbeczbt", +"hileejdmsljnblywbqgrycpbeczbt", +"hileejdmsljnblywbqgrycpbeczbt", +"hileejdmsljnblywbqgrycpbeczbt", +"hileejdmsljnblywbqgrycpbeczbt" + }, + name = "u", + configuration = new + { + data_sources = new object[] + { +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +} + }, + }, + expires_after = new + { + anchor = "last_active_at", + days = 73, + }, + metadata = new + { + key9029 = "ghicfhykvpyj", + }, + }); + Response response = client.CreateVectorStore(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("usage_bytes").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("in_progress").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("completed").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("failed").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("cancelled").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("total").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("last_active_at").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_VectorStores_CreateVectorStore_VectorStoresCreateVectorStoreMaximumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStores client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoresClient(); + + using RequestContent content = RequestContent.Create(new + { + file_ids = new object[] + { +"hileejdmsljnblywbqgrycpbeczbt", +"hileejdmsljnblywbqgrycpbeczbt", +"hileejdmsljnblywbqgrycpbeczbt", +"hileejdmsljnblywbqgrycpbeczbt", +"hileejdmsljnblywbqgrycpbeczbt", +"hileejdmsljnblywbqgrycpbeczbt", +"hileejdmsljnblywbqgrycpbeczbt", +"hileejdmsljnblywbqgrycpbeczbt", +"hileejdmsljnblywbqgrycpbeczbt", +"hileejdmsljnblywbqgrycpbeczbt", +"hileejdmsljnblywbqgrycpbeczbt", +"hileejdmsljnblywbqgrycpbeczbt", +"hileejdmsljnblywbqgrycpbeczbt", +"hileejdmsljnblywbqgrycpbeczbt", +"hileejdmsljnblywbqgrycpbeczbt", +"hileejdmsljnblywbqgrycpbeczbt", +"hileejdmsljnblywbqgrycpbeczbt", +"hileejdmsljnblywbqgrycpbeczbt", +"hileejdmsljnblywbqgrycpbeczbt", +"hileejdmsljnblywbqgrycpbeczbt" + }, + name = "u", + configuration = new + { + data_sources = new object[] + { +new +{ +uri = "soctjzrqyjyxixlqr", +type = "uri_asset", +} + }, + }, + expires_after = new + { + anchor = "last_active_at", + days = 73, + }, + metadata = new + { + key9029 = "ghicfhykvpyj", + }, + }); + Response response = await client.CreateVectorStoreAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("usage_bytes").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("in_progress").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("completed").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("failed").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("cancelled").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("total").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("last_active_at").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_VectorStores_CreateVectorStore_VectorStoresCreateVectorStoreMaximumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStores client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoresClient(); + + Response response = client.CreateVectorStore(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_VectorStores_CreateVectorStore_VectorStoresCreateVectorStoreMaximumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStores client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoresClient(); + + Response response = await client.CreateVectorStoreAsync(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_VectorStores_CreateVectorStore_VectorStoresCreateVectorStoreMinimumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStores client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoresClient(); + + using RequestContent content = RequestContent.Create(new object()); + Response response = client.CreateVectorStore(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("usage_bytes").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("in_progress").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("completed").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("failed").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("cancelled").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("total").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("last_active_at").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_VectorStores_CreateVectorStore_VectorStoresCreateVectorStoreMinimumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStores client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoresClient(); + + using RequestContent content = RequestContent.Create(new object()); + Response response = await client.CreateVectorStoreAsync(content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("usage_bytes").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("in_progress").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("completed").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("failed").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("cancelled").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("total").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("last_active_at").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_VectorStores_CreateVectorStore_VectorStoresCreateVectorStoreMinimumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStores client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoresClient(); + + Response response = client.CreateVectorStore(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_VectorStores_CreateVectorStore_VectorStoresCreateVectorStoreMinimumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStores client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoresClient(); + + Response response = await client.CreateVectorStoreAsync(); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_VectorStores_GetVectorStore_VectorStoresGetVectorStoreMaximumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStores client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoresClient(); + + Response response = client.GetVectorStore("vjsfufonwjwzvygdq", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("usage_bytes").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("in_progress").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("completed").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("failed").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("cancelled").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("total").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("last_active_at").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_VectorStores_GetVectorStore_VectorStoresGetVectorStoreMaximumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStores client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoresClient(); + + Response response = await client.GetVectorStoreAsync("vjsfufonwjwzvygdq", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("usage_bytes").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("in_progress").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("completed").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("failed").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("cancelled").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("total").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("last_active_at").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_VectorStores_GetVectorStore_VectorStoresGetVectorStoreMaximumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStores client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoresClient(); + + Response response = client.GetVectorStore("vjsfufonwjwzvygdq"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_VectorStores_GetVectorStore_VectorStoresGetVectorStoreMaximumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStores client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoresClient(); + + Response response = await client.GetVectorStoreAsync("vjsfufonwjwzvygdq"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_VectorStores_GetVectorStore_VectorStoresGetVectorStoreMinimumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStores client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoresClient(); + + Response response = client.GetVectorStore("jhrejmwmyblsdagsx", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("usage_bytes").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("in_progress").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("completed").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("failed").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("cancelled").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("total").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("last_active_at").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_VectorStores_GetVectorStore_VectorStoresGetVectorStoreMinimumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStores client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoresClient(); + + Response response = await client.GetVectorStoreAsync("jhrejmwmyblsdagsx", null); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("usage_bytes").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("in_progress").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("completed").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("failed").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("cancelled").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("total").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("last_active_at").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_VectorStores_GetVectorStore_VectorStoresGetVectorStoreMinimumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStores client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoresClient(); + + Response response = client.GetVectorStore("jhrejmwmyblsdagsx"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_VectorStores_GetVectorStore_VectorStoresGetVectorStoreMinimumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStores client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoresClient(); + + Response response = await client.GetVectorStoreAsync("jhrejmwmyblsdagsx"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_VectorStores_ModifyVectorStore_VectorStoresModifyVectorStoreMaximumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStores client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoresClient(); + + using RequestContent content = RequestContent.Create(new + { + name = "jcrzfsgxsgelufbkjidfvnu", + expires_after = new + { + anchor = "last_active_at", + days = 73, + }, + metadata = new + { + key9792 = "cxmmdtwupsjnjixdoaravhbkrqqqm", + }, + }); + Response response = client.ModifyVectorStore("pqhrqxzleymrjogjppdtlmxlsfculn", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("usage_bytes").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("in_progress").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("completed").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("failed").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("cancelled").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("total").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("last_active_at").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_VectorStores_ModifyVectorStore_VectorStoresModifyVectorStoreMaximumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStores client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoresClient(); + + using RequestContent content = RequestContent.Create(new + { + name = "jcrzfsgxsgelufbkjidfvnu", + expires_after = new + { + anchor = "last_active_at", + days = 73, + }, + metadata = new + { + key9792 = "cxmmdtwupsjnjixdoaravhbkrqqqm", + }, + }); + Response response = await client.ModifyVectorStoreAsync("pqhrqxzleymrjogjppdtlmxlsfculn", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("usage_bytes").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("in_progress").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("completed").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("failed").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("cancelled").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("total").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("last_active_at").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_VectorStores_ModifyVectorStore_VectorStoresModifyVectorStoreMaximumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStores client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoresClient(); + + Response response = client.ModifyVectorStore("pqhrqxzleymrjogjppdtlmxlsfculn"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_VectorStores_ModifyVectorStore_VectorStoresModifyVectorStoreMaximumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStores client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoresClient(); + + Response response = await client.ModifyVectorStoreAsync("pqhrqxzleymrjogjppdtlmxlsfculn"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_VectorStores_ModifyVectorStore_VectorStoresModifyVectorStoreMinimumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStores client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoresClient(); + + using RequestContent content = RequestContent.Create(new object()); + Response response = client.ModifyVectorStore("jlamdmhxwayxxeiexcyulxcocw", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("usage_bytes").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("in_progress").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("completed").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("failed").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("cancelled").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("total").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("last_active_at").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_VectorStores_ModifyVectorStore_VectorStoresModifyVectorStoreMinimumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStores client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoresClient(); + + using RequestContent content = RequestContent.Create(new object()); + Response response = await client.ModifyVectorStoreAsync("jlamdmhxwayxxeiexcyulxcocw", content); + + JsonElement result = JsonDocument.Parse(response.ContentStream).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("usage_bytes").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("in_progress").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("completed").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("failed").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("cancelled").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("total").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("last_active_at").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_VectorStores_ModifyVectorStore_VectorStoresModifyVectorStoreMinimumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStores client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoresClient(); + + Response response = client.ModifyVectorStore("jlamdmhxwayxxeiexcyulxcocw"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_VectorStores_ModifyVectorStore_VectorStoresModifyVectorStoreMinimumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStores client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoresClient(); + + Response response = await client.ModifyVectorStoreAsync("jlamdmhxwayxxeiexcyulxcocw"); + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_VectorStores_GetVectorStores_VectorStoresListVectorStoresMaximumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStores client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoresClient(); + + foreach (BinaryData item in client.GetVectorStores(20, "asc", "cfgbzxzpyyflnolbxpkbsz", "forspimiuzzd", (RequestContext)null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("usage_bytes").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("in_progress").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("completed").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("failed").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("cancelled").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("total").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("last_active_at").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_VectorStores_GetVectorStores_VectorStoresListVectorStoresMaximumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStores client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoresClient(); + + await foreach (BinaryData item in client.GetVectorStoresAsync(20, "asc", "cfgbzxzpyyflnolbxpkbsz", "forspimiuzzd", (RequestContext)null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("usage_bytes").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("in_progress").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("completed").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("failed").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("cancelled").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("total").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("last_active_at").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_VectorStores_GetVectorStores_VectorStoresListVectorStoresMaximumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStores client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoresClient(); + + foreach (PersistentAgentsVectorStore item in client.GetVectorStores()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_VectorStores_GetVectorStores_VectorStoresListVectorStoresMaximumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStores client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoresClient(); + + await foreach (PersistentAgentsVectorStore item in client.GetVectorStoresAsync()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_VectorStores_GetVectorStores_VectorStoresListVectorStoresMinimumSet() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStores client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoresClient(); + + foreach (BinaryData item in client.GetVectorStores((int?)null, (string)null, (string)null, (string)null, (RequestContext)null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("usage_bytes").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("in_progress").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("completed").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("failed").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("cancelled").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("total").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("last_active_at").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_VectorStores_GetVectorStores_VectorStoresListVectorStoresMinimumSet_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStores client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoresClient(); + + await foreach (BinaryData item in client.GetVectorStoresAsync((int?)null, (string)null, (string)null, (string)null, (RequestContext)null)) + { + JsonElement result = JsonDocument.Parse(item.ToStream()).RootElement; + Console.WriteLine(result.GetProperty("id").ToString()); + Console.WriteLine(result.GetProperty("object").ToString()); + Console.WriteLine(result.GetProperty("created_at").ToString()); + Console.WriteLine(result.GetProperty("name").ToString()); + Console.WriteLine(result.GetProperty("usage_bytes").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("in_progress").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("completed").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("failed").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("cancelled").ToString()); + Console.WriteLine(result.GetProperty("file_counts").GetProperty("total").ToString()); + Console.WriteLine(result.GetProperty("status").ToString()); + Console.WriteLine(result.GetProperty("last_active_at").ToString()); + Console.WriteLine(result.GetProperty("metadata").GetProperty("").ToString()); + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public void Example_VectorStores_GetVectorStores_VectorStoresListVectorStoresMinimumSet_Convenience() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStores client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoresClient(); + + foreach (PersistentAgentsVectorStore item in client.GetVectorStores()) + { + } + } + + [Test] + [Ignore("Only validating compilation of examples")] + public async Task Example_VectorStores_GetVectorStores_VectorStoresListVectorStoresMinimumSet_Convenience_Async() + { + Uri endpoint = new Uri(""); + TokenCredential credential = new DefaultAzureCredential(); + VectorStores client = new PersistentAgentsAdministrationClient(endpoint, credential).GetVectorStoresClient(); + + await foreach (PersistentAgentsVectorStore item in client.GetVectorStoresAsync()) + { + } + } + } +} diff --git a/sdk/ai/Azure.AI.Agents.Persistent/tsp-location.yaml b/sdk/ai/Azure.AI.Agents.Persistent/tsp-location.yaml index 35e2e6045ef4..4fac42c5d133 100644 --- a/sdk/ai/Azure.AI.Agents.Persistent/tsp-location.yaml +++ b/sdk/ai/Azure.AI.Agents.Persistent/tsp-location.yaml @@ -1,4 +1,4 @@ directory: specification/ai/Azure.AI.Agents -commit: 6625eb323d07755a1d77c17dc713e484d3c1e00e +commit: 3dd9eb300c152900aeb6036bb73da30889fb851c repo: Azure/azure-rest-api-specs additionalDirectories: