diff --git a/sdk/ai/Azure.AI.Agents/Azure.AI.Agents.sln b/sdk/ai/Azure.AI.Agents/Azure.AI.Agents.sln
new file mode 100644
index 000000000000..377bd9a46c50
--- /dev/null
+++ b/sdk/ai/Azure.AI.Agents/Azure.AI.Agents.sln
@@ -0,0 +1,56 @@
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.29709.97
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Azure.Core.TestFramework", "..\..\core\Azure.Core.TestFramework\src\Azure.Core.TestFramework.csproj", "{ECC730C1-4AEA-420C-916A-66B19B79E4DC}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.AI.Agents", "src\Azure.AI.Agents.csproj", "{28FF4005-4467-4E36-92E7-DEA27DEB1519}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Azure.AI.Agents.Tests", "tests\Azure.AI.Agents.Tests.csproj", "{1F1CD1D4-9932-4B73-99D8-C252A67D4B46}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {B0C276D1-2930-4887-B29A-D1A33E7009A2}.Release|Any CPU.Build.0 = Release|Any CPU
+ {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {8E9A77AC-792A-4432-8320-ACFD46730401}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {8E9A77AC-792A-4432-8320-ACFD46730401}.Release|Any CPU.Build.0 = Release|Any CPU
+ {ECC730C1-4AEA-420C-916A-66B19B79E4DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {ECC730C1-4AEA-420C-916A-66B19B79E4DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {ECC730C1-4AEA-420C-916A-66B19B79E4DC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {ECC730C1-4AEA-420C-916A-66B19B79E4DC}.Release|Any CPU.Build.0 = Release|Any CPU
+ {A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {A4241C1F-A53D-474C-9E4E-075054407E74}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {A4241C1F-A53D-474C-9E4E-075054407E74}.Release|Any CPU.Build.0 = Release|Any CPU
+ {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {FA8BD3F1-8616-47B6-974C-7576CDF4717E}.Release|Any CPU.Build.0 = Release|Any CPU
+ {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {85677AD3-C214-42FA-AE6E-49B956CAC8DC}.Release|Any CPU.Build.0 = Release|Any CPU
+ {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {28FF4005-4467-4E36-92E7-DEA27DEB1519}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1F1CD1D4-9932-4B73-99D8-C252A67D4B46}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {A97F4B90-2591-4689-B1F8-5F21FE6D6CAE}
+ EndGlobalSection
+EndGlobal
diff --git a/sdk/ai/Azure.AI.Agents/CHANGELOG.md b/sdk/ai/Azure.AI.Agents/CHANGELOG.md
new file mode 100644
index 000000000000..8b33f0fedccc
--- /dev/null
+++ b/sdk/ai/Azure.AI.Agents/CHANGELOG.md
@@ -0,0 +1,11 @@
+# Release History
+
+## 1.0.0-beta.1 (Unreleased)
+
+### Features Added
+
+### Breaking Changes
+
+### Bugs Fixed
+
+### Other Changes
\ No newline at end of file
diff --git a/sdk/ai/Azure.AI.Agents/Directory.Build.props b/sdk/ai/Azure.AI.Agents/Directory.Build.props
new file mode 100644
index 000000000000..63bd836ad44b
--- /dev/null
+++ b/sdk/ai/Azure.AI.Agents/Directory.Build.props
@@ -0,0 +1,6 @@
+
+
+
+
diff --git a/sdk/ai/Azure.AI.Agents/README.md b/sdk/ai/Azure.AI.Agents/README.md
new file mode 100644
index 000000000000..3bd6a50545dd
--- /dev/null
+++ b/sdk/ai/Azure.AI.Agents/README.md
@@ -0,0 +1,107 @@
+# Azure.AI.Agents client library for .NET
+
+Azure.AI.Agents is a managed service that helps developers get secret simply and securely.
+
+Use the client library for to:
+
+* [Get secret](https://docs.microsoft.com/azure)
+
+[Source code][source_root] | [Package (NuGet)][package] | [API reference documentation][reference_docs] | [Product documentation][azconfig_docs] | [Samples][source_samples]
+
+ [Source code](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Agents/src) | [Package (NuGet)](https://www.nuget.org/packages) | [API reference documentation](https://azure.github.io/azure-sdk-for-net) | [Product documentation](https://docs.microsoft.com/azure)
+
+## Getting started
+
+This section should include everything a developer needs to do to install and create their first client connection *very quickly*.
+
+### Install the package
+
+First, provide instruction for obtaining and installing the package or library. This section might include only a single line of code, like `dotnet add package package-name`, but should enable a developer to successfully install the package from NuGet, npm, or even cloning a GitHub repository.
+
+Install the client library for .NET with [NuGet](https://www.nuget.org/ ):
+
+```dotnetcli
+dotnet add package Azure.AI.Agents --prerelease
+```
+
+### Prerequisites
+
+Include a section after the install command that details any requirements that must be satisfied before a developer can [authenticate](#authenticate-the-client) and test all of the snippets in the [Examples](#examples) section. For example, for Cosmos DB:
+
+> You must have an [Azure subscription](https://azure.microsoft.com/free/dotnet/) and [Cosmos DB account](https://docs.microsoft.com/azure/cosmos-db/account-overview) (SQL API). In order to take advantage of the C# 8.0 syntax, it is recommended that you compile using the [.NET Core SDK](https://dotnet.microsoft.com/download) 3.0 or higher with a [language version](https://docs.microsoft.com/dotnet/csharp/language-reference/configure-language-version#override-a-default) of `latest`. It is also possible to compile with the .NET Core SDK 2.1.x using a language version of `preview`.
+
+### Authenticate the client
+
+If your library requires authentication for use, such as for Azure services, include instructions and example code needed for initializing and authenticating.
+
+For example, include details on obtaining an account key and endpoint URI, setting environment variables for each, and initializing the client object.
+
+### Service API versions
+
+The client library targets the latest service API version by default. A client instance accepts an optional service API version parameter from its options to specify which API version service to communicate.
+
+#### Select a service API version
+
+You have the flexibility to explicitly select a supported service API version when instantiating a client by configuring its associated options. This ensures that the client can communicate with services using the specified API version.
+
+For example,
+
+```C# Snippet:CreateClientForSpecificApiVersion
+Uri endpoint = new Uri("");
+DefaultAzureCredential credential = new DefaultAzureCredential();
+ClientOptions options = new ClientOptions(ClientOptions.ServiceVersion.)
+var client = new Client(endpoint, credential, options);
+```
+
+When selecting an API version, it's important to verify that there are no breaking changes compared to the latest API version. If there are significant differences, API calls may fail due to incompatibility.
+
+Always ensure that the chosen API version is fully supported and operational for your specific use case and that it aligns with the service's versioning policy.
+
+## Key concepts
+
+The *Key concepts* section should describe the functionality of the main classes. Point out the most important and useful classes in the package (with links to their reference pages) and explain how those classes work together. Feel free to use bulleted lists, tables, code blocks, or even diagrams for clarity.
+
+Include the *Thread safety* and *Additional concepts* sections below at the end of your *Key concepts* section. You may remove or add links depending on what your library makes use of:
+
+### Thread safety
+
+We guarantee that all client instance methods are thread-safe and independent of each other ([guideline](https://azure.github.io/azure-sdk/dotnet_introduction.html#dotnet-service-methods-thread-safety)). This ensures that the recommendation of reusing client instances is always safe, even across threads.
+
+### Additional concepts
+
+[Client options](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#configuring-service-clients-using-clientoptions) |
+[Accessing the response](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#accessing-http-response-details-using-responset) |
+[Long-running operations](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#consuming-long-running-operations-using-operationt) |
+[Handling failures](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#reporting-errors-requestfailedexception) |
+[Diagnostics](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/samples/Diagnostics.md) |
+[Mocking](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/README.md#mocking) |
+[Client lifetime](https://devblogs.microsoft.com/azure-sdk/lifetime-management-and-thread-safety-guarantees-of-azure-sdk-net-clients/)
+
+
+## Examples
+
+You can familiarize yourself with different APIs using [Samples](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/ai/Azure.AI.Agents/samples).
+
+## Troubleshooting
+
+Describe common errors and exceptions, how to "unpack" them if necessary, and include guidance for graceful handling and recovery.
+
+Provide information to help developers avoid throttling or other service-enforced errors they might encounter. For example, provide guidance and examples for using retry or connection policies in the API.
+
+If the package or a related package supports it, include tips for logging or enabling instrumentation to help them debug their code.
+
+## Next steps
+
+* Provide a link to additional code examples, ideally to those sitting alongside the README in the package's `/samples` directory.
+* If appropriate, point users to other packages that might be useful.
+* If you think there's a good chance that developers might stumble across your package in error (because they're searching for specific functionality and mistakenly think the package provides that functionality), point them to the packages they might be looking for.
+
+## Contributing
+
+This is a template, but your SDK readme should include details on how to contribute code to the repo/package.
+
+
+[style-guide-msft]: https://docs.microsoft.com/style-guide/capitalization
+[style-guide-cloud]: https://aka.ms/azsdk/cloud-style-guide
+
+
\ No newline at end of file
diff --git a/sdk/ai/Azure.AI.Agents/src/Azure.AI.Agents.csproj b/sdk/ai/Azure.AI.Agents/src/Azure.AI.Agents.csproj
new file mode 100644
index 000000000000..29380a01c002
--- /dev/null
+++ b/sdk/ai/Azure.AI.Agents/src/Azure.AI.Agents.csproj
@@ -0,0 +1,19 @@
+
+
+ This is the Azure.AI.Agents client library for developing .NET applications with rich experience.
+ Azure SDK Code Generation Azure.AI.Agents for Azure Data Plane
+ 1.0.0-beta.1
+ Azure.AI.Agents
+ $(RequiredTargetFrameworks)
+ true
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sdk/ai/Azure.AI.Agents/src/Generated/AIAgentsClientBuilderExtensions.cs b/sdk/ai/Azure.AI.Agents/src/Generated/AIAgentsClientBuilderExtensions.cs
new file mode 100644
index 000000000000..932566684e89
--- /dev/null
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/AIAgentsClientBuilderExtensions.cs
@@ -0,0 +1,38 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using Azure.AI.Agents;
+using Azure.Core.Extensions;
+
+namespace Microsoft.Extensions.Azure
+{
+ /// Extension methods to add to client builder.
+ public static partial class AIAgentsClientBuilderExtensions
+ {
+ /// Registers a instance.
+ /// The builder to register with.
+ /// The Azure AI Foundry project endpoint, in the form `https://<azure-region>.api.azureml.ms` or `https://<private-link-guid>.<azure-region>.api.azureml.ms`, where <azure-region> is the Azure region where the project is deployed (e.g. westus) and <private-link-guid> is the GUID of the Enterprise private link.
+ /// The Azure subscription ID.
+ /// The name of the Azure Resource Group.
+ /// The Azure AI Foundry project name.
+ public static IAzureClientBuilder AddAgentsClient(this TBuilder builder, Uri endpoint, string subscriptionId, string resourceGroupName, string projectName)
+ where TBuilder : IAzureClientFactoryBuilderWithCredential
+ {
+ return builder.RegisterClientFactory((options, cred) => new AgentsClient(endpoint, subscriptionId, resourceGroupName, projectName, cred, options));
+ }
+
+ /// Registers a instance.
+ /// The builder to register with.
+ /// The configuration values.
+ public static IAzureClientBuilder AddAgentsClient(this TBuilder builder, TConfiguration configuration)
+ where TBuilder : IAzureClientFactoryBuilderWithConfiguration
+ {
+ return builder.RegisterClientFactory(configuration);
+ }
+ }
+}
diff --git a/sdk/ai/Azure.AI.Agents/src/Generated/AIAgentsModelFactory.cs b/sdk/ai/Azure.AI.Agents/src/Generated/AIAgentsModelFactory.cs
new file mode 100644
index 000000000000..920a0a5908d6
--- /dev/null
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/AIAgentsModelFactory.cs
@@ -0,0 +1,1053 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+
+namespace Azure.AI.Agents
+{
+ /// Model factory for models.
+ public static partial class AIAgentsModelFactory
+ {
+ /// Initializes a new instance of .
+ /// The type of binding, which is always 'storage_queue'.
+ /// Storage queue.
+ /// A new instance for mocking.
+ public static AzureFunctionBinding AzureFunctionBinding(AzureFunctionBindingType type = default, AzureFunctionStorageQueue storageQueue = null)
+ {
+ return new AzureFunctionBinding(type, storageQueue, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Type.
+ /// The JSON schema, describing response format.
+ /// A new instance for mocking.
+ public static ResponseFormatJsonSchemaType ResponseFormatJsonSchemaType(ResponseFormatJsonSchemaTypeType type = default, ResponseFormatJsonSchema jsonSchema = null)
+ {
+ return new ResponseFormatJsonSchemaType(type, jsonSchema, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The identifier, which can be referenced in API endpoints.
+ /// The object type, which is always assistant.
+ /// The Unix timestamp, in seconds, representing when this object was created.
+ /// The name of the agent.
+ /// The description of the agent.
+ /// The ID of the model to use.
+ /// The system instructions for the agent to use.
+ ///
+ /// 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 .
+ ///
+ ///
+ /// 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.
+ ///
+ ///
+ /// What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random,
+ /// while lower values like 0.2 will make it more focused and deterministic.
+ ///
+ ///
+ /// An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass.
+ /// So 0.1 means only the tokens comprising the top 10% probability mass are considered.
+ ///
+ /// We generally recommend altering this or temperature but not both.
+ ///
+ /// The response format of the tool calls used by this agent.
+ /// 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.
+ /// A new instance for mocking.
+ public static Agent Agent(string id = null, AgentObject @object = default, DateTimeOffset createdAt = default, string name = null, string description = null, string model = null, string instructions = null, IEnumerable tools = null, ToolResources toolResources = null, float? temperature = null, float? topP = null, BinaryData responseFormat = null, IReadOnlyDictionary metadata = null)
+ {
+ tools ??= new List();
+ metadata ??= new Dictionary();
+
+ return new Agent(
+ id,
+ @object,
+ createdAt,
+ name,
+ description,
+ model,
+ instructions,
+ tools?.ToList(),
+ toolResources,
+ temperature,
+ topP,
+ responseFormat,
+ metadata,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ ///
+ /// The role of the entity that is creating the message. Allowed values include:
+ /// - `user`: Indicates the message is sent by an actual user and should be used in most
+ /// cases to represent user-generated messages.
+ /// - `assistant`: Indicates the message is generated by the agent. Use this value to insert
+ /// messages from the agent into the
+ /// conversation.
+ ///
+ ///
+ /// The textual content of the initial message. Currently, robust input including images and annotated text may only be provided via
+ /// a separate call to the create message API.
+ ///
+ /// A list of files attached to the message, and the tools they should be added to.
+ /// 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.
+ /// A new instance for mocking.
+ public static ThreadMessageOptions ThreadMessageOptions(MessageRole role = default, string content = null, IEnumerable attachments = null, IDictionary metadata = null)
+ {
+ attachments ??= new List();
+ metadata ??= new Dictionary();
+
+ return new ThreadMessageOptions(role, content, attachments?.ToList(), metadata, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The identifier, which can be referenced in API endpoints.
+ /// The object type, which is always 'thread'.
+ /// The Unix timestamp, in seconds, representing when this object was created.
+ ///
+ /// A set of resources that are made available to the agent's tools in this thread. 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.
+ ///
+ /// 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.
+ /// A new instance for mocking.
+ public static AgentThread AgentThread(string id = null, AgentThreadObject @object = default, DateTimeOffset createdAt = default, ToolResources toolResources = null, IReadOnlyDictionary metadata = null)
+ {
+ metadata ??= new Dictionary();
+
+ return new AgentThread(
+ id,
+ @object,
+ createdAt,
+ toolResources,
+ metadata,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The identifier, which can be referenced in API endpoints.
+ /// The object type, which is always 'thread.message'.
+ /// The Unix timestamp, in seconds, representing when this object was created.
+ /// The ID of the thread that this message belongs to.
+ /// The status of the message.
+ /// On an incomplete message, details about why the message is incomplete.
+ /// The Unix timestamp (in seconds) for when the message was completed.
+ /// The Unix timestamp (in seconds) for when the message was marked as incomplete.
+ /// The role associated with the agent thread message.
+ ///
+ /// The list of content items associated with the agent thread message.
+ /// 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 .
+ ///
+ /// If applicable, the ID of the agent that authored this message.
+ /// If applicable, the ID of the run associated with the authoring of this message.
+ /// A list of files attached to the message, and the tools they were added to.
+ /// 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.
+ /// A new instance for mocking.
+ public static ThreadMessage ThreadMessage(string id = null, ThreadMessageObject @object = default, DateTimeOffset createdAt = default, string threadId = null, MessageStatus status = default, MessageIncompleteDetails incompleteDetails = null, DateTimeOffset? completedAt = null, DateTimeOffset? incompleteAt = null, MessageRole role = default, IEnumerable contentItems = null, string agentId = null, string runId = null, IEnumerable attachments = null, IReadOnlyDictionary metadata = null)
+ {
+ contentItems ??= new List();
+ attachments ??= new List();
+ metadata ??= new Dictionary();
+
+ return new ThreadMessage(
+ id,
+ @object,
+ createdAt,
+ threadId,
+ status,
+ incompleteDetails,
+ completedAt,
+ incompleteAt,
+ role,
+ contentItems?.ToList(),
+ agentId,
+ runId,
+ attachments?.ToList(),
+ metadata,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The provided reason describing why the message was marked as incomplete.
+ /// A new instance for mocking.
+ public static MessageIncompleteDetails MessageIncompleteDetails(MessageIncompleteDetailsReason reason = default)
+ {
+ return new MessageIncompleteDetails(reason, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The object type.
+ /// The textual content associated with this text annotation item.
+ /// A new instance for mocking.
+ public static MessageTextAnnotation MessageTextAnnotation(string type = null, string text = null)
+ {
+ return new UnknownMessageTextAnnotation(type, text, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The textual content associated with this text annotation item.
+ /// The details of the URL citation.
+ /// The first text index associated with this text annotation.
+ /// The last text index associated with this text annotation.
+ /// A new instance for mocking.
+ public static MessageTextUrlCitationAnnotation MessageTextUrlCitationAnnotation(string text = null, MessageTextUrlCitationDetails urlCitation = null, int? startIndex = null, int? endIndex = null)
+ {
+ return new MessageTextUrlCitationAnnotation(
+ "url_citation",
+ text,
+ serializedAdditionalRawData: null,
+ urlCitation,
+ startIndex,
+ endIndex);
+ }
+
+ /// Initializes a new instance of .
+ /// The URL associated with this citation.
+ /// The title of the URL.
+ /// A new instance for mocking.
+ public static MessageTextUrlCitationDetails MessageTextUrlCitationDetails(string url = null, string title = null)
+ {
+ return new MessageTextUrlCitationDetails(url, title, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The identifier, which can be referenced in API endpoints.
+ /// The object type, which is always 'thread.run'.
+ /// The ID of the thread associated with this run.
+ /// The ID of the agent associated with the thread this run was performed against.
+ /// The status of the agent thread run.
+ ///
+ /// The details of the action required for the agent thread run to continue.
+ /// 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 .
+ ///
+ /// The last error, if any, encountered by this agent thread run.
+ /// The ID of the model to use.
+ /// The overridden system instructions used for this agent thread run.
+ ///
+ /// 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 Unix timestamp, in seconds, representing when this object was created.
+ /// The Unix timestamp, in seconds, representing when this item expires.
+ /// The Unix timestamp, in seconds, representing when this item was started.
+ /// The Unix timestamp, in seconds, representing when this completed.
+ /// The Unix timestamp, in seconds, representing when this was cancelled.
+ /// The Unix timestamp, in seconds, representing when this failed.
+ /// Details on why the run is incomplete. Will be `null` if the run is not incomplete.
+ /// Usage statistics related to the run. This value will be `null` if the run is not in a terminal state (i.e. `in_progress`, `queued`, etc.).
+ /// The sampling temperature used for this run. If not set, defaults to 1.
+ /// The nucleus sampling value used for this run. If not set, defaults to 1.
+ /// The maximum number of prompt tokens specified to have been used over the course of the run.
+ /// The maximum number of completion tokens specified to have been used over the course of the run.
+ /// The strategy to use for dropping messages as the context windows moves forward.
+ /// Controls whether or not and which tool is called by the model.
+ /// The response format of the tool calls used in this run.
+ /// 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.
+ /// 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.
+ /// A new instance for mocking.
+ public static ThreadRun ThreadRun(string id = null, ThreadRunObject @object = default, string threadId = null, string agentId = null, RunStatus status = default, RequiredAction requiredAction = null, RunError lastError = null, string model = null, string instructions = null, IEnumerable tools = null, DateTimeOffset createdAt = default, DateTimeOffset? expiresAt = null, DateTimeOffset? startedAt = null, DateTimeOffset? completedAt = null, DateTimeOffset? cancelledAt = null, DateTimeOffset? failedAt = null, IncompleteRunDetails incompleteDetails = null, RunCompletionUsage usage = null, float? temperature = null, float? topP = null, int? maxPromptTokens = null, int? maxCompletionTokens = null, TruncationObject truncationStrategy = null, BinaryData toolChoice = null, BinaryData responseFormat = null, IReadOnlyDictionary metadata = null, UpdateToolResourcesOptions toolResources = null, bool parallelToolCalls = default)
+ {
+ tools ??= new List();
+ metadata ??= new Dictionary();
+
+ return new ThreadRun(
+ id,
+ @object,
+ threadId,
+ agentId,
+ status,
+ requiredAction,
+ lastError,
+ model,
+ instructions,
+ tools?.ToList(),
+ createdAt,
+ expiresAt,
+ startedAt,
+ completedAt,
+ cancelledAt,
+ failedAt,
+ incompleteDetails,
+ usage,
+ temperature,
+ topP,
+ maxPromptTokens,
+ maxCompletionTokens,
+ truncationStrategy,
+ toolChoice,
+ responseFormat,
+ metadata,
+ toolResources,
+ parallelToolCalls,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The object type for the required tool call.
+ /// The ID of the tool call. This ID must be referenced when submitting tool outputs.
+ /// A new instance for mocking.
+ public static RequiredToolCall RequiredToolCall(string type = null, string id = null)
+ {
+ return new UnknownRequiredToolCall(type, id, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The status for the error.
+ /// The human-readable text associated with the error.
+ /// A new instance for mocking.
+ public static RunError RunError(string code = null, string message = null)
+ {
+ return new RunError(code, message, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The reason why the run is incomplete. This indicates which specific token limit was reached during the run.
+ /// A new instance for mocking.
+ public static IncompleteRunDetails IncompleteRunDetails(IncompleteDetailsReason reason = default)
+ {
+ return new IncompleteRunDetails(reason, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Number of completion tokens used over the course of the run.
+ /// Number of prompt tokens used over the course of the run.
+ /// Total number of tokens used (prompt + completion).
+ /// A new instance for mocking.
+ public static RunCompletionUsage RunCompletionUsage(long completionTokens = default, long promptTokens = default, long totalTokens = default)
+ {
+ return new RunCompletionUsage(completionTokens, promptTokens, totalTokens, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The identifier, which can be referenced in API endpoints.
+ /// The object type, which is always 'thread.run.step'.
+ /// The type of run step, which can be either message_creation or tool_calls.
+ /// The ID of the agent associated with the run step.
+ /// The ID of the thread that was run.
+ /// The ID of the run that this run step is a part of.
+ /// The status of this run step.
+ ///
+ /// The 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 .
+ ///
+ /// If applicable, information about the last error encountered by this run step.
+ /// The Unix timestamp, in seconds, representing when this object was created.
+ /// The Unix timestamp, in seconds, representing when this item expired.
+ /// The Unix timestamp, in seconds, representing when this completed.
+ /// The Unix timestamp, in seconds, representing when this was cancelled.
+ /// The Unix timestamp, in seconds, representing when this failed.
+ /// Usage statistics related to the run step. This value will be `null` while the run step's status is `in_progress`.
+ /// 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.
+ /// A new instance for mocking.
+ public static RunStep RunStep(string id = null, RunStepObject @object = default, RunStepType type = default, string agentId = null, string threadId = null, string runId = null, RunStepStatus status = default, RunStepDetails stepDetails = null, RunStepError lastError = null, DateTimeOffset createdAt = default, DateTimeOffset? expiredAt = null, DateTimeOffset? completedAt = null, DateTimeOffset? cancelledAt = null, DateTimeOffset? failedAt = null, RunStepCompletionUsage usage = null, IReadOnlyDictionary metadata = null)
+ {
+ metadata ??= new Dictionary();
+
+ return new RunStep(
+ id,
+ @object,
+ type,
+ agentId,
+ threadId,
+ runId,
+ status,
+ stepDetails,
+ lastError,
+ createdAt,
+ expiredAt,
+ completedAt,
+ cancelledAt,
+ failedAt,
+ usage,
+ metadata,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Information about the message creation associated with this run step.
+ /// A new instance for mocking.
+ public static RunStepMessageCreationDetails RunStepMessageCreationDetails(RunStepMessageCreationReference messageCreation = null)
+ {
+ return new RunStepMessageCreationDetails(RunStepType.MessageCreation, serializedAdditionalRawData: null, messageCreation);
+ }
+
+ /// Initializes a new instance of .
+ /// The ID of the message created by this run step.
+ /// A new instance for mocking.
+ public static RunStepMessageCreationReference RunStepMessageCreationReference(string messageId = null)
+ {
+ return new RunStepMessageCreationReference(messageId, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ ///
+ /// 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 .
+ ///
+ /// A new instance for mocking.
+ public static RunStepToolCallDetails RunStepToolCallDetails(IEnumerable toolCalls = null)
+ {
+ toolCalls ??= new List();
+
+ return new RunStepToolCallDetails(RunStepType.ToolCalls, serializedAdditionalRawData: null, toolCalls?.ToList());
+ }
+
+ /// Initializes a new instance of .
+ /// The object type.
+ /// The ID of the tool call. This ID must be referenced when you submit tool outputs.
+ /// A new instance for mocking.
+ public static RunStepToolCall RunStepToolCall(string type = null, string id = null)
+ {
+ return new UnknownRunStepToolCall(type, id, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The ID of the tool call. This ID must be referenced when you submit tool outputs.
+ /// For now, this is always going to be an empty object.
+ /// A new instance for mocking.
+ public static RunStepFileSearchToolCall RunStepFileSearchToolCall(string id = null, RunStepFileSearchToolCallResults fileSearch = null)
+ {
+ return new RunStepFileSearchToolCall("file_search", id, serializedAdditionalRawData: null, fileSearch);
+ }
+
+ /// Initializes a new instance of .
+ /// Ranking options for file search.
+ /// The array of a file search results.
+ /// A new instance for mocking.
+ public static RunStepFileSearchToolCallResults RunStepFileSearchToolCallResults(FileSearchRankingOptions rankingOptions = null, IEnumerable results = null)
+ {
+ results ??= new List();
+
+ return new RunStepFileSearchToolCallResults(rankingOptions, results?.ToList(), serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The ID of the file that result was found in.
+ /// The name of the file that result was found in.
+ /// The score of the result. All values must be a floating point number between 0 and 1.
+ /// The content of the result that was found. The content is only included if requested via the include query parameter.
+ /// A new instance for mocking.
+ public static RunStepFileSearchToolCallResult RunStepFileSearchToolCallResult(string fileId = null, string fileName = null, float score = default, IEnumerable content = null)
+ {
+ content ??= new List();
+
+ return new RunStepFileSearchToolCallResult(fileId, fileName, score, content?.ToList(), serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The type of the content.
+ /// The text content of the file.
+ /// A new instance for mocking.
+ public static FileSearchToolCallContent FileSearchToolCallContent(FileSearchToolCallContentType type = default, string text = null)
+ {
+ return new FileSearchToolCallContent(type, text, serializedAdditionalRawData: null);
+ }
+
+ /// 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 RunStepBingGroundingToolCall RunStepBingGroundingToolCall(string id = null, IReadOnlyDictionary bingGrounding = null)
+ {
+ bingGrounding ??= new Dictionary();
+
+ return new RunStepBingGroundingToolCall("bing_grounding", id, serializedAdditionalRawData: null, bingGrounding);
+ }
+
+ /// 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 RunStepAzureAISearchToolCall RunStepAzureAISearchToolCall(string id = null, IReadOnlyDictionary azureAISearch = null)
+ {
+ azureAISearch ??= new Dictionary();
+
+ 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_aiskill", id, serializedAdditionalRawData: null, microsoftFabric);
+ }
+
+ /// Initializes a new instance of .
+ /// The error code for this error.
+ /// The human-readable text associated with this error.
+ /// A new instance for mocking.
+ public static RunStepError RunStepError(RunStepErrorCode code = default, string message = null)
+ {
+ return new RunStepError(code, message, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// Number of completion tokens used over the course of the run step.
+ /// Number of prompt tokens used over the course of the run step.
+ /// Total number of tokens used (prompt + completion).
+ /// A new instance for mocking.
+ public static RunStepCompletionUsage RunStepCompletionUsage(long completionTokens = default, long promptTokens = default, long totalTokens = default)
+ {
+ return new RunStepCompletionUsage(completionTokens, promptTokens, totalTokens, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The object type, which is always 'file'.
+ /// The identifier, which can be referenced in API endpoints.
+ /// The size of the file, in bytes.
+ /// The name of the file.
+ /// The Unix timestamp, in seconds, representing when this object was created.
+ /// The intended purpose of a file.
+ /// The state of the file. This field is available in Azure OpenAI only.
+ /// The error message with details in case processing of this file failed. This field is available in Azure OpenAI only.
+ /// A new instance for mocking.
+ public static OpenAIFile OpenAIFile(OpenAIFileObject @object = default, string id = null, int size = default, string filename = null, DateTimeOffset createdAt = default, OpenAIFilePurpose purpose = default, FileState? status = null, string statusDetails = null)
+ {
+ return new OpenAIFile(
+ @object,
+ id,
+ size,
+ filename,
+ createdAt,
+ purpose,
+ status,
+ statusDetails,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The object type, which is always list.
+ /// The requested list of items.
+ /// The first ID represented in this list.
+ /// The last ID represented in this list.
+ /// A value indicating whether there are additional values available not captured in this list.
+ /// A new instance for mocking.
+ public static OpenAIPageableListOfVectorStore OpenAIPageableListOfVectorStore(OpenAIPageableListOfVectorStoreObject @object = default, IEnumerable data = null, string firstId = null, string lastId = null, bool hasMore = default)
+ {
+ data ??= new List();
+
+ return new OpenAIPageableListOfVectorStore(
+ @object,
+ data?.ToList(),
+ firstId,
+ lastId,
+ hasMore,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The identifier, which can be referenced in API endpoints.
+ /// The object type, which is always `vector_store`.
+ /// The Unix timestamp (in seconds) for when the vector store was created.
+ /// The name of the vector store.
+ /// The total number of bytes used by the files in the vector store.
+ /// Files count grouped by status processed or being processed by this vector store.
+ /// The status of the vector store, which can be either `expired`, `in_progress`, or `completed`. A status of `completed` indicates that the vector store is ready for use.
+ /// Details on when this vector store expires.
+ /// The Unix timestamp (in seconds) for when the vector store will expire.
+ /// The Unix timestamp (in seconds) for when the vector store was last active.
+ /// 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.
+ /// A new instance for mocking.
+ public static VectorStore VectorStore(string id = null, VectorStoreObject @object = default, DateTimeOffset createdAt = default, string name = null, int usageBytes = default, VectorStoreFileCount fileCounts = null, VectorStoreStatus status = default, VectorStoreExpirationPolicy expiresAfter = null, DateTimeOffset? expiresAt = null, DateTimeOffset? lastActiveAt = null, IReadOnlyDictionary metadata = null)
+ {
+ metadata ??= new Dictionary();
+
+ return new VectorStore(
+ id,
+ @object,
+ createdAt,
+ name,
+ usageBytes,
+ fileCounts,
+ status,
+ expiresAfter,
+ expiresAt,
+ lastActiveAt,
+ metadata,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The number of files that are currently being processed.
+ /// The number of files that have been successfully processed.
+ /// The number of files that have failed to process.
+ /// The number of files that were cancelled.
+ /// The total number of files.
+ /// A new instance for mocking.
+ public static VectorStoreFileCount VectorStoreFileCount(int inProgress = default, int completed = default, int failed = default, int cancelled = default, int total = default)
+ {
+ return new VectorStoreFileCount(
+ inProgress,
+ completed,
+ failed,
+ cancelled,
+ total,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The options for the static chunking strategy.
+ /// A new instance for mocking.
+ public static VectorStoreStaticChunkingStrategyRequest VectorStoreStaticChunkingStrategyRequest(VectorStoreStaticChunkingStrategyOptions @static = null)
+ {
+ return new VectorStoreStaticChunkingStrategyRequest(VectorStoreChunkingStrategyRequestType.Static, serializedAdditionalRawData: null, @static);
+ }
+
+ /// Initializes a new instance of .
+ /// The ID of the resource specified for deletion.
+ /// A value indicating whether deletion was successful.
+ /// The object type, which is always 'vector_store.deleted'.
+ /// A new instance for mocking.
+ public static VectorStoreDeletionStatus VectorStoreDeletionStatus(string id = null, bool deleted = default, VectorStoreDeletionStatusObject @object = default)
+ {
+ return new VectorStoreDeletionStatus(id, deleted, @object, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The object type, which is always list.
+ /// The requested list of items.
+ /// The first ID represented in this list.
+ /// The last ID represented in this list.
+ /// A value indicating whether there are additional values available not captured in this list.
+ /// A new instance for mocking.
+ public static OpenAIPageableListOfVectorStoreFile OpenAIPageableListOfVectorStoreFile(OpenAIPageableListOfVectorStoreFileObject @object = default, IEnumerable data = null, string firstId = null, string lastId = null, bool hasMore = default)
+ {
+ data ??= new List();
+
+ return new OpenAIPageableListOfVectorStoreFile(
+ @object,
+ data?.ToList(),
+ firstId,
+ lastId,
+ hasMore,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The identifier, which can be referenced in API endpoints.
+ /// The object type, which is always `vector_store.file`.
+ ///
+ /// The total vector store usage in bytes. Note that this may be different from the original file
+ /// size.
+ ///
+ /// The Unix timestamp (in seconds) for when the vector store file was created.
+ /// The ID of the vector store that the file is attached to.
+ /// The status of the vector store file, which can be either `in_progress`, `completed`, `cancelled`, or `failed`. The status `completed` indicates that the vector store file is ready for use.
+ /// The last error associated with this vector store file. Will be `null` if there are no errors.
+ ///
+ /// The strategy used to chunk the file.
+ /// 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 .
+ ///
+ /// A new instance for mocking.
+ public static VectorStoreFile VectorStoreFile(string id = null, VectorStoreFileObject @object = default, int usageBytes = default, DateTimeOffset createdAt = default, string vectorStoreId = null, VectorStoreFileStatus status = default, VectorStoreFileError lastError = null, VectorStoreChunkingStrategyResponse chunkingStrategy = null)
+ {
+ return new VectorStoreFile(
+ id,
+ @object,
+ usageBytes,
+ createdAt,
+ vectorStoreId,
+ status,
+ lastError,
+ chunkingStrategy,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// One of `server_error` or `rate_limit_exceeded`.
+ /// A human-readable description of the error.
+ /// A new instance for mocking.
+ public static VectorStoreFileError VectorStoreFileError(VectorStoreFileErrorCode code = default, string message = null)
+ {
+ return new VectorStoreFileError(code, message, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The options for the static chunking strategy.
+ /// A new instance for mocking.
+ public static VectorStoreStaticChunkingStrategyResponse VectorStoreStaticChunkingStrategyResponse(VectorStoreStaticChunkingStrategyOptions @static = null)
+ {
+ return new VectorStoreStaticChunkingStrategyResponse(VectorStoreChunkingStrategyResponseType.Static, serializedAdditionalRawData: null, @static);
+ }
+
+ /// Initializes a new instance of .
+ /// The ID of the resource specified for deletion.
+ /// A value indicating whether deletion was successful.
+ /// The object type, which is always 'vector_store.deleted'.
+ /// A new instance for mocking.
+ public static VectorStoreFileDeletionStatus VectorStoreFileDeletionStatus(string id = null, bool deleted = default, VectorStoreFileDeletionStatusObject @object = default)
+ {
+ return new VectorStoreFileDeletionStatus(id, deleted, @object, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The identifier, which can be referenced in API endpoints.
+ /// The object type, which is always `vector_store.file_batch`.
+ /// The Unix timestamp (in seconds) for when the vector store files batch was created.
+ /// The ID of the vector store that the file is attached to.
+ /// The status of the vector store files batch, which can be either `in_progress`, `completed`, `cancelled` or `failed`.
+ /// Files count grouped by status processed or being processed by this vector store.
+ /// A new instance for mocking.
+ public static VectorStoreFileBatch VectorStoreFileBatch(string id = null, VectorStoreFileBatchObject @object = default, DateTimeOffset createdAt = default, string vectorStoreId = null, VectorStoreFileBatchStatus status = default, VectorStoreFileCount fileCounts = null)
+ {
+ return new VectorStoreFileBatch(
+ id,
+ @object,
+ createdAt,
+ vectorStoreId,
+ status,
+ fileCounts,
+ serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The identifier of the message, which can be referenced in API endpoints.
+ /// The object type, which is always `thread.message.delta`.
+ /// The delta containing the fields that have changed on the Message.
+ /// A new instance for mocking.
+ public static MessageDeltaChunk MessageDeltaChunk(string id = null, MessageDeltaChunkObject @object = default, MessageDelta delta = null)
+ {
+ return new MessageDeltaChunk(id, @object, delta, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The entity that produced the message.
+ ///
+ /// The content of the message as an array of text and/or images.
+ /// 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 .
+ ///
+ /// A new instance for mocking.
+ public static MessageDelta MessageDelta(MessageRole role = default, IEnumerable content = null)
+ {
+ content ??= new List();
+
+ return new MessageDelta(role, content?.ToList(), serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The index of the content part of the message.
+ /// The type of content for this content part.
+ /// A new instance for mocking.
+ public static MessageDeltaContent MessageDeltaContent(int index = default, string type = null)
+ {
+ return new UnknownMessageDeltaContent(index, type, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The index of the content part of the message.
+ /// The image_file data.
+ /// A new instance for mocking.
+ public static MessageDeltaImageFileContent MessageDeltaImageFileContent(int index = default, MessageDeltaImageFileContentObject imageFile = null)
+ {
+ return new MessageDeltaImageFileContent(index, "image_file", serializedAdditionalRawData: null, imageFile);
+ }
+
+ /// Initializes a new instance of .
+ /// The file ID of the image in the message content.
+ /// A new instance for mocking.
+ public static MessageDeltaImageFileContentObject MessageDeltaImageFileContentObject(string fileId = null)
+ {
+ return new MessageDeltaImageFileContentObject(fileId, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The index of the content part of the message.
+ /// The text content details.
+ /// A new instance for mocking.
+ public static MessageDeltaTextContent MessageDeltaTextContent(int index = default, MessageDeltaTextContentObject text = null)
+ {
+ return new MessageDeltaTextContent(index, "text", serializedAdditionalRawData: null, text);
+ }
+
+ /// Initializes a new instance of .
+ /// The data that makes up the text.
+ ///
+ /// Annotations for the text.
+ /// 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 .
+ ///
+ /// A new instance for mocking.
+ public static MessageDeltaTextContentObject MessageDeltaTextContentObject(string value = null, IEnumerable annotations = null)
+ {
+ annotations ??= new List();
+
+ return new MessageDeltaTextContentObject(value, annotations?.ToList(), serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The index of the annotation within a text content part.
+ /// The type of the text content annotation.
+ /// A new instance for mocking.
+ public static MessageDeltaTextAnnotation MessageDeltaTextAnnotation(int index = default, string type = null)
+ {
+ return new UnknownMessageDeltaTextAnnotation(index, type, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The index of the annotation within a text content part.
+ /// The details of the URL citation.
+ /// The first text index associated with this text annotation.
+ /// The last text index associated with this text annotation.
+ /// A new instance for mocking.
+ public static MessageDeltaTextUrlCitationAnnotation MessageDeltaTextUrlCitationAnnotation(int index = default, MessageDeltaTextUrlCitationDetails urlCitation = null, int? startIndex = null, int? endIndex = null)
+ {
+ return new MessageDeltaTextUrlCitationAnnotation(
+ index,
+ "url_citation",
+ serializedAdditionalRawData: null,
+ urlCitation,
+ startIndex,
+ endIndex);
+ }
+
+ /// Initializes a new instance of .
+ /// The URL associated with this citation.
+ /// The title of the URL.
+ /// A new instance for mocking.
+ public static MessageDeltaTextUrlCitationDetails MessageDeltaTextUrlCitationDetails(string url = null, string title = null)
+ {
+ return new MessageDeltaTextUrlCitationDetails(url, title, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The index of the annotation within a text content part.
+ /// The file citation information.
+ /// The text in the message content that needs to be replaced.
+ /// The start index of this annotation in the content text.
+ /// The end index of this annotation in the content text.
+ /// A new instance for mocking.
+ public static MessageDeltaTextFileCitationAnnotation MessageDeltaTextFileCitationAnnotation(int index = default, MessageDeltaTextFileCitationAnnotationObject fileCitation = null, string text = null, int? startIndex = null, int? endIndex = null)
+ {
+ return new MessageDeltaTextFileCitationAnnotation(
+ index,
+ "file_citation",
+ serializedAdditionalRawData: null,
+ fileCitation,
+ text,
+ startIndex,
+ endIndex);
+ }
+
+ /// Initializes a new instance of .
+ /// The ID of the specific file the citation is from.
+ /// The specific quote in the cited file.
+ /// A new instance for mocking.
+ public static MessageDeltaTextFileCitationAnnotationObject MessageDeltaTextFileCitationAnnotationObject(string fileId = null, string quote = null)
+ {
+ return new MessageDeltaTextFileCitationAnnotationObject(fileId, quote, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The index of the annotation within a text content part.
+ /// The file path information.
+ /// The start index of this annotation in the content text.
+ /// The end index of this annotation in the content text.
+ /// The text in the message content that needs to be replaced.
+ /// A new instance for mocking.
+ public static MessageDeltaTextFilePathAnnotation MessageDeltaTextFilePathAnnotation(int index = default, MessageDeltaTextFilePathAnnotationObject filePath = null, int? startIndex = null, int? endIndex = null, string text = null)
+ {
+ return new MessageDeltaTextFilePathAnnotation(
+ index,
+ "file_path",
+ serializedAdditionalRawData: null,
+ filePath,
+ startIndex,
+ endIndex,
+ text);
+ }
+
+ /// Initializes a new instance of .
+ /// The file ID for the annotation.
+ /// A new instance for mocking.
+ public static MessageDeltaTextFilePathAnnotationObject MessageDeltaTextFilePathAnnotationObject(string fileId = null)
+ {
+ return new MessageDeltaTextFilePathAnnotationObject(fileId, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The identifier of the run step, which can be referenced in API endpoints.
+ /// The object type, which is always `thread.run.step.delta`.
+ /// The delta containing the fields that have changed on the run step.
+ /// A new instance for mocking.
+ public static RunStepDeltaChunk RunStepDeltaChunk(string id = null, RunStepDeltaChunkObject @object = default, RunStepDelta delta = null)
+ {
+ return new RunStepDeltaChunk(id, @object, delta, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ ///
+ /// The details of the 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 .
+ ///
+ /// A new instance for mocking.
+ public static RunStepDelta RunStepDelta(RunStepDeltaDetail stepDetails = null)
+ {
+ return new RunStepDelta(stepDetails, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The message creation data.
+ /// A new instance for mocking.
+ public static RunStepDeltaMessageCreation RunStepDeltaMessageCreation(RunStepDeltaMessageCreationObject messageCreation = null)
+ {
+ return new RunStepDeltaMessageCreation("message_creation", serializedAdditionalRawData: null, messageCreation);
+ }
+
+ /// Initializes a new instance of .
+ /// The ID of the newly-created message.
+ /// A new instance for mocking.
+ public static RunStepDeltaMessageCreationObject RunStepDeltaMessageCreationObject(string messageId = null)
+ {
+ return new RunStepDeltaMessageCreationObject(messageId, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ ///
+ /// The collection of tool calls for the tool call detail item.
+ /// 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 .
+ ///
+ /// A new instance for mocking.
+ public static RunStepDeltaToolCallObject RunStepDeltaToolCallObject(IEnumerable toolCalls = null)
+ {
+ toolCalls ??= new List();
+
+ return new RunStepDeltaToolCallObject("tool_calls", serializedAdditionalRawData: null, toolCalls?.ToList());
+ }
+
+ /// Initializes a new instance of .
+ /// The index of the tool call detail in the run step's tool_calls array.
+ /// The ID of the tool call, used when submitting outputs to the run.
+ /// The type of the tool call detail item in a streaming run step's details.
+ /// A new instance for mocking.
+ public static RunStepDeltaToolCall RunStepDeltaToolCall(int index = default, string id = null, string type = null)
+ {
+ return new UnknownRunStepDeltaToolCall(index, id, type, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The index of the tool call detail in the run step's tool_calls array.
+ /// The ID of the tool call, used when submitting outputs to the run.
+ /// The function data for the tool call.
+ /// A new instance for mocking.
+ public static RunStepDeltaFunctionToolCall RunStepDeltaFunctionToolCall(int index = default, string id = null, RunStepDeltaFunction function = null)
+ {
+ return new RunStepDeltaFunctionToolCall(index, id, "function", serializedAdditionalRawData: null, function);
+ }
+
+ /// Initializes a new instance of .
+ /// The name of the function.
+ /// The arguments passed to the function as input.
+ /// The output of the function, null if outputs have not yet been submitted.
+ /// A new instance for mocking.
+ public static RunStepDeltaFunction RunStepDeltaFunction(string name = null, string arguments = null, string output = null)
+ {
+ return new RunStepDeltaFunction(name, arguments, output, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The index of the tool call detail in the run step's tool_calls array.
+ /// The ID of the tool call, used when submitting outputs to the run.
+ /// Reserved for future use.
+ /// A new instance for mocking.
+ public static RunStepDeltaFileSearchToolCall RunStepDeltaFileSearchToolCall(int index = default, string id = null, RunStepFileSearchToolCallResults fileSearch = null)
+ {
+ return new RunStepDeltaFileSearchToolCall(index, id, "file_search", serializedAdditionalRawData: null, fileSearch);
+ }
+
+ /// Initializes a new instance of .
+ /// The index of the tool call detail in the run step's tool_calls array.
+ /// The ID of the tool call, used when submitting outputs to the run.
+ /// The Code Interpreter data for the tool call.
+ /// A new instance for mocking.
+ public static RunStepDeltaCodeInterpreterToolCall RunStepDeltaCodeInterpreterToolCall(int index = default, string id = null, RunStepDeltaCodeInterpreterDetailItemObject codeInterpreter = null)
+ {
+ return new RunStepDeltaCodeInterpreterToolCall(index, id, "code_interpreter", serializedAdditionalRawData: null, codeInterpreter);
+ }
+
+ /// Initializes a new instance of .
+ /// The input into the Code Interpreter tool call.
+ ///
+ /// The outputs from the Code Interpreter tool call. Code Interpreter can output one or more
+ /// items, including text (`logs`) or images (`image`). Each of these are represented by a
+ /// different object type.
+ /// 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 .
+ ///
+ /// A new instance for mocking.
+ public static RunStepDeltaCodeInterpreterDetailItemObject RunStepDeltaCodeInterpreterDetailItemObject(string input = null, IEnumerable outputs = null)
+ {
+ outputs ??= new List();
+
+ return new RunStepDeltaCodeInterpreterDetailItemObject(input, outputs?.ToList(), serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The index of the output in the streaming run step tool call's Code Interpreter outputs array.
+ /// The type of the streaming run step tool call's Code Interpreter output.
+ /// A new instance for mocking.
+ public static RunStepDeltaCodeInterpreterOutput RunStepDeltaCodeInterpreterOutput(int index = default, string type = null)
+ {
+ return new UnknownRunStepDeltaCodeInterpreterOutput(index, type, serializedAdditionalRawData: null);
+ }
+
+ /// Initializes a new instance of .
+ /// The index of the output in the streaming run step tool call's Code Interpreter outputs array.
+ /// The text output from the Code Interpreter tool call.
+ /// A new instance for mocking.
+ public static RunStepDeltaCodeInterpreterLogOutput RunStepDeltaCodeInterpreterLogOutput(int index = default, string logs = null)
+ {
+ return new RunStepDeltaCodeInterpreterLogOutput(index, "logs", serializedAdditionalRawData: null, logs);
+ }
+
+ /// Initializes a new instance of .
+ /// The index of the output in the streaming run step tool call's Code Interpreter outputs array.
+ /// The image data for the Code Interpreter tool call output.
+ /// A new instance for mocking.
+ public static RunStepDeltaCodeInterpreterImageOutput RunStepDeltaCodeInterpreterImageOutput(int index = default, RunStepDeltaCodeInterpreterImageOutputObject image = null)
+ {
+ return new RunStepDeltaCodeInterpreterImageOutput(index, "image", serializedAdditionalRawData: null, image);
+ }
+
+ /// Initializes a new instance of .
+ /// The file ID for the image.
+ /// A new instance for mocking.
+ public static RunStepDeltaCodeInterpreterImageOutputObject RunStepDeltaCodeInterpreterImageOutputObject(string fileId = null)
+ {
+ return new RunStepDeltaCodeInterpreterImageOutputObject(fileId, serializedAdditionalRawData: null);
+ }
+ }
+}
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Agent.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/Agent.Serialization.cs
similarity index 98%
rename from sdk/ai/Azure.AI.Projects/src/Generated/Agent.Serialization.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/Agent.Serialization.cs
index 222f3d70f61e..7d04c6f30f2f 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/Agent.Serialization.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/Agent.Serialization.cs
@@ -11,7 +11,7 @@
using System.Text.Json;
using Azure.Core;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
public partial class Agent : IUtf8JsonSerializable, IJsonModel
{
@@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit
writer.WritePropertyName("id"u8);
writer.WriteStringValue(Id);
writer.WritePropertyName("object"u8);
- writer.WriteStringValue(Object);
+ writer.WriteStringValue(Object.ToString());
writer.WritePropertyName("created_at"u8);
writer.WriteNumberValue(CreatedAt, "U");
if (Name != null)
@@ -175,7 +175,7 @@ internal static Agent DeserializeAgent(JsonElement element, ModelReaderWriterOpt
return null;
}
string id = default;
- string @object = default;
+ AgentObject @object = default;
DateTimeOffset createdAt = default;
string name = default;
string description = default;
@@ -198,7 +198,7 @@ internal static Agent DeserializeAgent(JsonElement element, ModelReaderWriterOpt
}
if (property.NameEquals("object"u8))
{
- @object = property.Value.GetString();
+ @object = new AgentObject(property.Value.GetString());
continue;
}
if (property.NameEquals("created_at"u8))
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Agent.cs b/sdk/ai/Azure.AI.Agents/src/Generated/Agent.cs
similarity index 96%
rename from sdk/ai/Azure.AI.Projects/src/Generated/Agent.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/Agent.cs
index 8d1ff839899f..faa18b10044e 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/Agent.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/Agent.cs
@@ -9,7 +9,7 @@
using System.Collections.Generic;
using System.Linq;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
/// Represents an agent that can call the model and use tools.
public partial class Agent
@@ -123,7 +123,7 @@ internal Agent(string id, DateTimeOffset createdAt, string name, string descript
/// The response format of the tool calls used by this agent.
/// 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 Agent(string id, string @object, DateTimeOffset createdAt, string name, string description, string model, string instructions, IReadOnlyList tools, ToolResources toolResources, float? temperature, float? topP, BinaryData responseFormat, IReadOnlyDictionary metadata, IDictionary serializedAdditionalRawData)
+ internal Agent(string id, AgentObject @object, DateTimeOffset createdAt, string name, string description, string model, string instructions, IReadOnlyList tools, ToolResources toolResources, float? temperature, float? topP, BinaryData responseFormat, IReadOnlyDictionary metadata, IDictionary serializedAdditionalRawData)
{
Id = id;
Object = @object;
@@ -148,6 +148,8 @@ internal Agent()
/// The identifier, which can be referenced in API endpoints.
public string Id { get; }
+ /// The object type, which is always assistant.
+ public AgentObject Object { get; } = AgentObject.Assistant;
/// The Unix timestamp, in seconds, representing when this object was created.
public DateTimeOffset CreatedAt { get; }
diff --git a/sdk/ai/Azure.AI.Agents/src/Generated/AgentObject.cs b/sdk/ai/Azure.AI.Agents/src/Generated/AgentObject.cs
new file mode 100644
index 000000000000..846c2bb0ff6d
--- /dev/null
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/AgentObject.cs
@@ -0,0 +1,48 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ComponentModel;
+
+namespace Azure.AI.Agents
+{
+ /// The Agent_object.
+ public readonly partial struct AgentObject : IEquatable
+ {
+ private readonly string _value;
+
+ /// Initializes a new instance of .
+ /// is null.
+ public AgentObject(string value)
+ {
+ _value = value ?? throw new ArgumentNullException(nameof(value));
+ }
+
+ private const string AssistantValue = "assistant";
+
+ /// assistant.
+ public static AgentObject Assistant { get; } = new AgentObject(AssistantValue);
+ /// Determines if two values are the same.
+ public static bool operator ==(AgentObject left, AgentObject right) => left.Equals(right);
+ /// Determines if two values are not the same.
+ public static bool operator !=(AgentObject left, AgentObject right) => !left.Equals(right);
+ /// Converts a to a .
+ public static implicit operator AgentObject(string value) => new AgentObject(value);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override bool Equals(object obj) => obj is AgentObject other && Equals(other);
+ ///
+ public bool Equals(AgentObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0;
+ ///
+ public override string ToString() => _value;
+ }
+}
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AgentStreamEvent.cs b/sdk/ai/Azure.AI.Agents/src/Generated/AgentStreamEvent.cs
similarity index 99%
rename from sdk/ai/Azure.AI.Projects/src/Generated/AgentStreamEvent.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/AgentStreamEvent.cs
index 97c4efa2a29e..e87fb6d5c615 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/AgentStreamEvent.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/AgentStreamEvent.cs
@@ -8,7 +8,7 @@
using System;
using System.ComponentModel;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
///
/// Each event in a server-sent events stream has an `event` and `data` property:
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AgentThread.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/AgentThread.Serialization.cs
similarity index 97%
rename from sdk/ai/Azure.AI.Projects/src/Generated/AgentThread.Serialization.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/AgentThread.Serialization.cs
index a1c1a2f68206..c1d03ed54e7e 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/AgentThread.Serialization.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/AgentThread.Serialization.cs
@@ -11,7 +11,7 @@
using System.Text.Json;
using Azure.Core;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
public partial class AgentThread : IUtf8JsonSerializable, IJsonModel
{
@@ -37,7 +37,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit
writer.WritePropertyName("id"u8);
writer.WriteStringValue(Id);
writer.WritePropertyName("object"u8);
- writer.WriteStringValue(Object);
+ writer.WriteStringValue(Object.ToString());
writer.WritePropertyName("created_at"u8);
writer.WriteNumberValue(CreatedAt, "U");
if (ToolResources != null)
@@ -102,7 +102,7 @@ internal static AgentThread DeserializeAgentThread(JsonElement element, ModelRea
return null;
}
string id = default;
- string @object = default;
+ AgentThreadObject @object = default;
DateTimeOffset createdAt = default;
ToolResources toolResources = default;
IReadOnlyDictionary metadata = default;
@@ -117,7 +117,7 @@ internal static AgentThread DeserializeAgentThread(JsonElement element, ModelRea
}
if (property.NameEquals("object"u8))
{
- @object = property.Value.GetString();
+ @object = new AgentThreadObject(property.Value.GetString());
continue;
}
if (property.NameEquals("created_at"u8))
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AgentThread.cs b/sdk/ai/Azure.AI.Agents/src/Generated/AgentThread.cs
similarity index 93%
rename from sdk/ai/Azure.AI.Projects/src/Generated/AgentThread.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/AgentThread.cs
index 3d11c01c11fd..7aa8bfe05bc7 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/AgentThread.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/AgentThread.cs
@@ -8,7 +8,7 @@
using System;
using System.Collections.Generic;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
/// Information about a single thread associated with an agent.
public partial class AgentThread
@@ -76,7 +76,7 @@ internal AgentThread(string id, DateTimeOffset createdAt, ToolResources toolReso
///
/// 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 AgentThread(string id, string @object, DateTimeOffset createdAt, ToolResources toolResources, IReadOnlyDictionary metadata, IDictionary serializedAdditionalRawData)
+ internal AgentThread(string id, AgentThreadObject @object, DateTimeOffset createdAt, ToolResources toolResources, IReadOnlyDictionary metadata, IDictionary serializedAdditionalRawData)
{
Id = id;
Object = @object;
@@ -93,6 +93,8 @@ internal AgentThread()
/// The identifier, which can be referenced in API endpoints.
public string Id { get; }
+ /// The object type, which is always 'thread'.
+ public AgentThreadObject Object { get; } = AgentThreadObject.Thread;
/// The Unix timestamp, in seconds, representing when this object was created.
public DateTimeOffset CreatedAt { get; }
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AgentThreadCreationOptions.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/AgentThreadCreationOptions.Serialization.cs
similarity index 99%
rename from sdk/ai/Azure.AI.Projects/src/Generated/AgentThreadCreationOptions.Serialization.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/AgentThreadCreationOptions.Serialization.cs
index 54eb2a8cee49..874b03c46562 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/AgentThreadCreationOptions.Serialization.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/AgentThreadCreationOptions.Serialization.cs
@@ -11,7 +11,7 @@
using System.Text.Json;
using Azure.Core;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
public partial class AgentThreadCreationOptions : IUtf8JsonSerializable, IJsonModel
{
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AgentThreadCreationOptions.cs b/sdk/ai/Azure.AI.Agents/src/Generated/AgentThreadCreationOptions.cs
similarity index 99%
rename from sdk/ai/Azure.AI.Projects/src/Generated/AgentThreadCreationOptions.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/AgentThreadCreationOptions.cs
index 384b24441047..2587839ac4b0 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/AgentThreadCreationOptions.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/AgentThreadCreationOptions.cs
@@ -8,7 +8,7 @@
using System;
using System.Collections.Generic;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
/// The details used to create a new agent thread.
public partial class AgentThreadCreationOptions
diff --git a/sdk/ai/Azure.AI.Agents/src/Generated/AgentThreadObject.cs b/sdk/ai/Azure.AI.Agents/src/Generated/AgentThreadObject.cs
new file mode 100644
index 000000000000..1d4ab5bf287d
--- /dev/null
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/AgentThreadObject.cs
@@ -0,0 +1,48 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ComponentModel;
+
+namespace Azure.AI.Agents
+{
+ /// The AgentThread_object.
+ public readonly partial struct AgentThreadObject : IEquatable
+ {
+ private readonly string _value;
+
+ /// Initializes a new instance of .
+ /// is null.
+ public AgentThreadObject(string value)
+ {
+ _value = value ?? throw new ArgumentNullException(nameof(value));
+ }
+
+ private const string ThreadValue = "thread";
+
+ /// thread.
+ public static AgentThreadObject Thread { get; } = new AgentThreadObject(ThreadValue);
+ /// Determines if two values are the same.
+ public static bool operator ==(AgentThreadObject left, AgentThreadObject right) => left.Equals(right);
+ /// Determines if two values are not the same.
+ public static bool operator !=(AgentThreadObject left, AgentThreadObject right) => !left.Equals(right);
+ /// Converts a to a .
+ public static implicit operator AgentThreadObject(string value) => new AgentThreadObject(value);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override bool Equals(object obj) => obj is AgentThreadObject other && Equals(other);
+ ///
+ public bool Equals(AgentThreadObject other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override int GetHashCode() => _value != null ? StringComparer.InvariantCultureIgnoreCase.GetHashCode(_value) : 0;
+ ///
+ public override string ToString() => _value;
+ }
+}
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AgentsApiResponseFormat.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/AgentsApiResponseFormat.Serialization.cs
similarity index 99%
rename from sdk/ai/Azure.AI.Projects/src/Generated/AgentsApiResponseFormat.Serialization.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/AgentsApiResponseFormat.Serialization.cs
index dcf23c64e9f5..413ea488968a 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/AgentsApiResponseFormat.Serialization.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/AgentsApiResponseFormat.Serialization.cs
@@ -11,7 +11,7 @@
using System.Text.Json;
using Azure.Core;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
public partial class AgentsApiResponseFormat : IUtf8JsonSerializable, IJsonModel
{
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AgentsApiResponseFormat.cs b/sdk/ai/Azure.AI.Agents/src/Generated/AgentsApiResponseFormat.cs
similarity index 98%
rename from sdk/ai/Azure.AI.Projects/src/Generated/AgentsApiResponseFormat.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/AgentsApiResponseFormat.cs
index b481792951e0..cfe48a8edf37 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/AgentsApiResponseFormat.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/AgentsApiResponseFormat.cs
@@ -8,7 +8,7 @@
using System;
using System.Collections.Generic;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
///
/// An object describing the expected output of the model. If `json_object` only `function` type `tools` are allowed to be passed to the Run.
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AgentsApiResponseFormatMode.cs b/sdk/ai/Azure.AI.Agents/src/Generated/AgentsApiResponseFormatMode.cs
similarity index 98%
rename from sdk/ai/Azure.AI.Projects/src/Generated/AgentsApiResponseFormatMode.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/AgentsApiResponseFormatMode.cs
index 283e0295f37b..b53b9ea34482 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/AgentsApiResponseFormatMode.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/AgentsApiResponseFormatMode.cs
@@ -8,7 +8,7 @@
using System;
using System.ComponentModel;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
/// Represents the mode in which the model will handle the return format of a tool call.
public readonly partial struct AgentsApiResponseFormatMode : IEquatable
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AgentsApiToolChoiceOptionMode.cs b/sdk/ai/Azure.AI.Agents/src/Generated/AgentsApiToolChoiceOptionMode.cs
similarity index 98%
rename from sdk/ai/Azure.AI.Projects/src/Generated/AgentsApiToolChoiceOptionMode.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/AgentsApiToolChoiceOptionMode.cs
index 7f7f9ab114ea..fbf051fcb64a 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/AgentsApiToolChoiceOptionMode.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/AgentsApiToolChoiceOptionMode.cs
@@ -8,7 +8,7 @@
using System;
using System.ComponentModel;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
/// Specifies how the tool choice will be used.
public readonly partial struct AgentsApiToolChoiceOptionMode : IEquatable
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AgentsClient.cs b/sdk/ai/Azure.AI.Agents/src/Generated/AgentsClient.cs
similarity index 92%
rename from sdk/ai/Azure.AI.Projects/src/Generated/AgentsClient.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/AgentsClient.cs
index 56679b3d00d5..6e1196ecaecc 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/AgentsClient.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/AgentsClient.cs
@@ -14,10 +14,10 @@
using Azure.Core;
using Azure.Core.Pipeline;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
- // Data plane generated sub-client.
- /// The Agents sub-client.
+ // Data plane generated client.
+ /// The Agents service client.
public partial class AgentsClient
{
private static readonly string[] AuthorizationScopes = new string[] { "https://management.azure.com/.default" };
@@ -41,24 +41,43 @@ protected AgentsClient()
}
/// Initializes a new instance of AgentsClient.
- /// The handler for diagnostic messaging in the client.
- /// The HTTP pipeline for sending and receiving REST requests and responses.
- /// The token credential to copy.
/// The Azure AI Foundry project endpoint, in the form `https://<azure-region>.api.azureml.ms` or `https://<private-link-guid>.<azure-region>.api.azureml.ms`, where <azure-region> is the Azure region where the project is deployed (e.g. westus) and <private-link-guid> is the GUID of the Enterprise private link.
/// The Azure subscription ID.
/// The name of the Azure Resource Group.
/// The Azure AI Foundry project name.
- /// The API version to use for this operation.
- internal AgentsClient(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, TokenCredential tokenCredential, Uri endpoint, string subscriptionId, string resourceGroupName, string projectName, string apiVersion)
+ /// A credential used to authenticate to an Azure Service.
+ /// , , , or is null.
+ /// , or is an empty string, and was expected to be non-empty.
+ public AgentsClient(Uri endpoint, string subscriptionId, string resourceGroupName, string projectName, TokenCredential credential) : this(endpoint, subscriptionId, resourceGroupName, projectName, credential, new AgentsClientOptions())
{
- ClientDiagnostics = clientDiagnostics;
- _pipeline = pipeline;
- _tokenCredential = tokenCredential;
+ }
+
+ /// Initializes a new instance of AgentsClient.
+ /// The Azure AI Foundry project endpoint, in the form `https://<azure-region>.api.azureml.ms` or `https://<private-link-guid>.<azure-region>.api.azureml.ms`, where <azure-region> is the Azure region where the project is deployed (e.g. westus) and <private-link-guid> is the GUID of the Enterprise private link.
+ /// The Azure subscription ID.
+ /// The name of the Azure Resource Group.
+ /// The Azure AI Foundry project name.
+ /// A credential used to authenticate to an Azure Service.
+ /// The options for configuring the client.
+ /// , , , or is null.
+ /// , or is an empty string, and was expected to be non-empty.
+ public AgentsClient(Uri endpoint, string subscriptionId, string resourceGroupName, string projectName, TokenCredential credential, AgentsClientOptions options)
+ {
+ Argument.AssertNotNull(endpoint, nameof(endpoint));
+ Argument.AssertNotNullOrEmpty(subscriptionId, nameof(subscriptionId));
+ Argument.AssertNotNullOrEmpty(resourceGroupName, nameof(resourceGroupName));
+ Argument.AssertNotNullOrEmpty(projectName, nameof(projectName));
+ Argument.AssertNotNull(credential, nameof(credential));
+ options ??= new AgentsClientOptions();
+
+ ClientDiagnostics = new ClientDiagnostics(options, true);
+ _tokenCredential = credential;
+ _pipeline = HttpPipelineBuilder.Build(options, Array.Empty(), new HttpPipelinePolicy[] { new BearerTokenAuthenticationPolicy(_tokenCredential, AuthorizationScopes) }, new ResponseClassifier());
_endpoint = endpoint;
_subscriptionId = subscriptionId;
_resourceGroupName = resourceGroupName;
_projectName = projectName;
- _apiVersion = apiVersion;
+ _apiVersion = options.Version;
}
/// Creates a new agent.
@@ -233,11 +252,11 @@ public virtual Response CreateAgent(RequestContent content, RequestContext conte
/// A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.
/// A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.
/// The cancellation token to use.
- internal virtual async Task> InternalGetAgentsAsync(int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default)
+ internal virtual async Task> InternalGetAgentsAsync(int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default)
{
RequestContext context = FromCancellationToken(cancellationToken);
Response response = await InternalGetAgentsAsync(limit, order?.ToString(), after, before, context).ConfigureAwait(false);
- return Response.FromValue(InternalOpenAIPageableListOfAgent.FromResponse(response), response);
+ return Response.FromValue(OpenAIPageableListOfAgent.FromResponse(response), response);
}
/// Gets a list of agents that were previously created.
@@ -246,11 +265,11 @@ internal virtual async Task> Interna
/// A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.
/// A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.
/// The cancellation token to use.
- internal virtual Response InternalGetAgents(int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default)
+ internal virtual Response InternalGetAgents(int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default)
{
RequestContext context = FromCancellationToken(cancellationToken);
Response response = InternalGetAgents(limit, order?.ToString(), after, before, context);
- return Response.FromValue(InternalOpenAIPageableListOfAgent.FromResponse(response), response);
+ return Response.FromValue(OpenAIPageableListOfAgent.FromResponse(response), response);
}
///
@@ -330,30 +349,30 @@ internal virtual Response InternalGetAgents(int? limit, string order, string aft
}
/// Retrieves an existing agent.
- /// Identifier of the agent.
+ /// Identifier of the agent.
/// 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)
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ public virtual async Task> GetAgentAsync(string agentId, CancellationToken cancellationToken = default)
{
- Argument.AssertNotNullOrEmpty(assistantId, nameof(assistantId));
+ Argument.AssertNotNullOrEmpty(agentId, nameof(agentId));
RequestContext context = FromCancellationToken(cancellationToken);
- Response response = await GetAgentAsync(assistantId, context).ConfigureAwait(false);
+ Response response = await GetAgentAsync(agentId, context).ConfigureAwait(false);
return Response.FromValue(Agent.FromResponse(response), response);
}
/// Retrieves an existing agent.
- /// Identifier of the agent.
+ /// Identifier of the agent.
/// 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)
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ public virtual Response GetAgent(string agentId, CancellationToken cancellationToken = default)
{
- Argument.AssertNotNullOrEmpty(assistantId, nameof(assistantId));
+ Argument.AssertNotNullOrEmpty(agentId, nameof(agentId));
RequestContext context = FromCancellationToken(cancellationToken);
- Response response = GetAgent(assistantId, context);
+ Response response = GetAgent(agentId, context);
return Response.FromValue(Agent.FromResponse(response), response);
}
@@ -372,21 +391,21 @@ public virtual Response GetAgent(string assistantId, CancellationToken ca
///
///
///
- /// Identifier of the agent.
+ /// Identifier of the agent.
/// The request context, which can override default behaviors of the client pipeline on a per-call basis.
- /// is null.
- /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ /// 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 GetAgentAsync(string assistantId, RequestContext context)
+ public virtual async Task GetAgentAsync(string agentId, RequestContext context)
{
- Argument.AssertNotNullOrEmpty(assistantId, nameof(assistantId));
+ Argument.AssertNotNullOrEmpty(agentId, nameof(agentId));
using var scope = ClientDiagnostics.CreateScope("AgentsClient.GetAgent");
scope.Start();
try
{
- using HttpMessage message = CreateGetAgentRequest(assistantId, context);
+ using HttpMessage message = CreateGetAgentRequest(agentId, context);
return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false);
}
catch (Exception e)
@@ -411,21 +430,21 @@ public virtual async Task GetAgentAsync(string assistantId, RequestCon
///
///
///
- /// Identifier of the agent.
+ /// Identifier of the agent.
/// The request context, which can override default behaviors of the client pipeline on a per-call basis.
- /// is null.
- /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ /// 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 GetAgent(string assistantId, RequestContext context)
+ public virtual Response GetAgent(string agentId, RequestContext context)
{
- Argument.AssertNotNullOrEmpty(assistantId, nameof(assistantId));
+ Argument.AssertNotNullOrEmpty(agentId, nameof(agentId));
using var scope = ClientDiagnostics.CreateScope("AgentsClient.GetAgent");
scope.Start();
try
{
- using HttpMessage message = CreateGetAgentRequest(assistantId, context);
+ using HttpMessage message = CreateGetAgentRequest(agentId, context);
return _pipeline.ProcessMessage(message, context);
}
catch (Exception e)
@@ -436,7 +455,7 @@ public virtual Response GetAgent(string assistantId, RequestContext context)
}
/// Modifies an existing agent.
- /// The ID of the agent to modify.
+ /// The ID of the agent to modify.
/// The ID of the model to use.
/// The modified name for the agent to use.
/// The modified description for the agent to use.
@@ -459,11 +478,11 @@ public virtual Response GetAgent(string assistantId, RequestContext context)
/// The response format of the tool calls used by this agent.
/// 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.
- /// 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)
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ public virtual async Task> UpdateAgentAsync(string agentId, 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));
+ Argument.AssertNotNullOrEmpty(agentId, nameof(agentId));
UpdateAgentRequest updateAgentRequest = new UpdateAgentRequest(
model,
@@ -478,12 +497,12 @@ public virtual async Task> UpdateAgentAsync(string assistantId,
metadata ?? new ChangeTrackingDictionary(),
null);
RequestContext context = FromCancellationToken(cancellationToken);
- Response response = await UpdateAgentAsync(assistantId, updateAgentRequest.ToRequestContent(), context).ConfigureAwait(false);
+ Response response = await UpdateAgentAsync(agentId, updateAgentRequest.ToRequestContent(), context).ConfigureAwait(false);
return Response.FromValue(Agent.FromResponse(response), response);
}
/// Modifies an existing agent.
- /// The ID of the agent to modify.
+ /// The ID of the agent to modify.
/// The ID of the model to use.
/// The modified name for the agent to use.
/// The modified description for the agent to use.
@@ -506,11 +525,11 @@ public virtual async Task> UpdateAgentAsync(string assistantId,
/// The response format of the tool calls used by this agent.
/// 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.
- /// 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)
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ public virtual Response UpdateAgent(string agentId, 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));
+ Argument.AssertNotNullOrEmpty(agentId, nameof(agentId));
UpdateAgentRequest updateAgentRequest = new UpdateAgentRequest(
model,
@@ -525,7 +544,7 @@ public virtual Response UpdateAgent(string assistantId, string model = nu
metadata ?? new ChangeTrackingDictionary(),
null);
RequestContext context = FromCancellationToken(cancellationToken);
- Response response = UpdateAgent(assistantId, updateAgentRequest.ToRequestContent(), context);
+ Response response = UpdateAgent(agentId, updateAgentRequest.ToRequestContent(), context);
return Response.FromValue(Agent.FromResponse(response), response);
}
@@ -544,23 +563,23 @@ public virtual Response UpdateAgent(string assistantId, string model = nu
///
///
///
- /// The ID of the agent to modify.
+ /// The ID of the agent to modify.
/// The content to send as the body of the request.
/// The request context, which can override default behaviors of the client pipeline on a per-call basis.
- /// or is null.
- /// is an empty string, and was expected to be non-empty.
+ /// or is null.
+ /// 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)
+ public virtual async Task UpdateAgentAsync(string agentId, RequestContent content, RequestContext context = null)
{
- Argument.AssertNotNullOrEmpty(assistantId, nameof(assistantId));
+ Argument.AssertNotNullOrEmpty(agentId, nameof(agentId));
Argument.AssertNotNull(content, nameof(content));
using var scope = ClientDiagnostics.CreateScope("AgentsClient.UpdateAgent");
scope.Start();
try
{
- using HttpMessage message = CreateUpdateAgentRequest(assistantId, content, context);
+ using HttpMessage message = CreateUpdateAgentRequest(agentId, content, context);
return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false);
}
catch (Exception e)
@@ -585,23 +604,23 @@ public virtual async Task UpdateAgentAsync(string assistantId, Request
///
///
///
- /// The ID of the agent to modify.
+ /// The ID of the agent to modify.
/// The content to send as the body of the request.
/// The request context, which can override default behaviors of the client pipeline on a per-call basis.
- /// or is null.
- /// is an empty string, and was expected to be non-empty.
+ /// or is null.
+ /// 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)
+ public virtual Response UpdateAgent(string agentId, RequestContent content, RequestContext context = null)
{
- Argument.AssertNotNullOrEmpty(assistantId, nameof(assistantId));
+ Argument.AssertNotNullOrEmpty(agentId, nameof(agentId));
Argument.AssertNotNull(content, nameof(content));
using var scope = ClientDiagnostics.CreateScope("AgentsClient.UpdateAgent");
scope.Start();
try
{
- using HttpMessage message = CreateUpdateAgentRequest(assistantId, content, context);
+ using HttpMessage message = CreateUpdateAgentRequest(agentId, content, context);
return _pipeline.ProcessMessage(message, context);
}
catch (Exception e)
@@ -612,30 +631,30 @@ public virtual Response UpdateAgent(string assistantId, RequestContent content,
}
/// Deletes an agent.
- /// Identifier of the agent.
+ /// Identifier of the agent.
/// The cancellation token to use.
- /// is null.
- /// is an empty string, and was expected to be non-empty.
- internal virtual async Task> InternalDeleteAgentAsync(string assistantId, CancellationToken cancellationToken = default)
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ internal virtual async Task> InternalDeleteAgentAsync(string agentId, CancellationToken cancellationToken = default)
{
- Argument.AssertNotNullOrEmpty(assistantId, nameof(assistantId));
+ Argument.AssertNotNullOrEmpty(agentId, nameof(agentId));
RequestContext context = FromCancellationToken(cancellationToken);
- Response response = await InternalDeleteAgentAsync(assistantId, context).ConfigureAwait(false);
+ Response response = await InternalDeleteAgentAsync(agentId, context).ConfigureAwait(false);
return Response.FromValue(InternalAgentDeletionStatus.FromResponse(response), response);
}
/// Deletes an agent.
- /// Identifier of the agent.
+ /// Identifier of the agent.
/// The cancellation token to use.
- /// is null.
- /// is an empty string, and was expected to be non-empty.
- internal virtual Response InternalDeleteAgent(string assistantId, CancellationToken cancellationToken = default)
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
+ internal virtual Response InternalDeleteAgent(string agentId, CancellationToken cancellationToken = default)
{
- Argument.AssertNotNullOrEmpty(assistantId, nameof(assistantId));
+ Argument.AssertNotNullOrEmpty(agentId, nameof(agentId));
RequestContext context = FromCancellationToken(cancellationToken);
- Response response = InternalDeleteAgent(assistantId, context);
+ Response response = InternalDeleteAgent(agentId, context);
return Response.FromValue(InternalAgentDeletionStatus.FromResponse(response), response);
}
@@ -654,21 +673,21 @@ internal virtual Response InternalDeleteAgent(strin
///
///
///
- /// Identifier of the agent.
+ /// Identifier of the agent.
/// The request context, which can override default behaviors of the client pipeline on a per-call basis.
- /// is null.
- /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
/// Service returned a non-success status code.
/// The response returned from the service.
- internal virtual async Task InternalDeleteAgentAsync(string assistantId, RequestContext context)
+ internal virtual async Task InternalDeleteAgentAsync(string agentId, RequestContext context)
{
- Argument.AssertNotNullOrEmpty(assistantId, nameof(assistantId));
+ Argument.AssertNotNullOrEmpty(agentId, nameof(agentId));
using var scope = ClientDiagnostics.CreateScope("AgentsClient.InternalDeleteAgent");
scope.Start();
try
{
- using HttpMessage message = CreateInternalDeleteAgentRequest(assistantId, context);
+ using HttpMessage message = CreateInternalDeleteAgentRequest(agentId, context);
return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false);
}
catch (Exception e)
@@ -693,21 +712,21 @@ internal virtual async Task InternalDeleteAgentAsync(string assistantI
///
///
///
- /// Identifier of the agent.
+ /// Identifier of the agent.
/// The request context, which can override default behaviors of the client pipeline on a per-call basis.
- /// is null.
- /// is an empty string, and was expected to be non-empty.
+ /// is null.
+ /// is an empty string, and was expected to be non-empty.
/// Service returned a non-success status code.
/// The response returned from the service.
- internal virtual Response InternalDeleteAgent(string assistantId, RequestContext context)
+ internal virtual Response InternalDeleteAgent(string agentId, RequestContext context)
{
- Argument.AssertNotNullOrEmpty(assistantId, nameof(assistantId));
+ Argument.AssertNotNullOrEmpty(agentId, nameof(agentId));
using var scope = ClientDiagnostics.CreateScope("AgentsClient.InternalDeleteAgent");
scope.Start();
try
{
- using HttpMessage message = CreateInternalDeleteAgentRequest(assistantId, context);
+ using HttpMessage message = CreateInternalDeleteAgentRequest(agentId, context);
return _pipeline.ProcessMessage(message, context);
}
catch (Exception e)
@@ -1315,13 +1334,13 @@ public virtual Response CreateMessage(string threadId, RequestContent content, R
/// The cancellation token to use.
/// is null.
/// is an empty string, and was expected to be non-empty.
- internal virtual async Task> InternalGetMessagesAsync(string threadId, string runId = null, int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default)
+ internal virtual async Task> InternalGetMessagesAsync(string threadId, string runId = null, int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(threadId, nameof(threadId));
RequestContext context = FromCancellationToken(cancellationToken);
Response response = await InternalGetMessagesAsync(threadId, runId, limit, order?.ToString(), after, before, context).ConfigureAwait(false);
- return Response.FromValue(InternalOpenAIPageableListOfThreadMessage.FromResponse(response), response);
+ return Response.FromValue(OpenAIPageableListOfThreadMessage.FromResponse(response), response);
}
/// Gets a list of messages that exist on a thread.
@@ -1334,13 +1353,13 @@ internal virtual async Task>
/// The cancellation token to use.
/// is null.
/// is an empty string, and was expected to be non-empty.
- internal virtual Response InternalGetMessages(string threadId, string runId = null, int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default)
+ internal virtual Response InternalGetMessages(string threadId, string runId = null, int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(threadId, nameof(threadId));
RequestContext context = FromCancellationToken(cancellationToken);
Response response = InternalGetMessages(threadId, runId, limit, order?.ToString(), after, before, context);
- return Response.FromValue(InternalOpenAIPageableListOfThreadMessage.FromResponse(response), response);
+ return Response.FromValue(OpenAIPageableListOfThreadMessage.FromResponse(response), response);
}
///
@@ -1669,7 +1688,7 @@ public virtual Response UpdateMessage(string threadId, string messageId, Request
/// Creates a new run for an agent thread.
/// Identifier of the thread.
- /// The ID of the agent that should run the thread.
+ /// The ID of the agent that should run the thread.
/// The overridden model name that the agent should use to run the thread.
/// The overridden system instructions that the agent should use to run the thread.
///
@@ -1713,15 +1732,15 @@ public virtual Response UpdateMessage(string threadId, string messageId, Request
/// Currently the only supported value is `step_details.tool_calls[*].file_search.results[*].content` to fetch the file search result content.
///
/// The cancellation token to use.
- /// or is null.
+ /// 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, TruncationObject truncationStrategy = null, BinaryData toolChoice = null, BinaryData responseFormat = null, bool? parallelToolCalls = null, IReadOnlyDictionary metadata = null, IEnumerable include = null, CancellationToken cancellationToken = default)
+ public virtual async Task> CreateRunAsync(string threadId, string agentId, 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, TruncationObject 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));
- Argument.AssertNotNull(assistantId, nameof(assistantId));
+ Argument.AssertNotNull(agentId, nameof(agentId));
CreateRunRequest createRunRequest = new CreateRunRequest(
- assistantId,
+ agentId,
overrideModelName,
overrideInstructions,
additionalInstructions,
@@ -1745,7 +1764,7 @@ public virtual async Task> CreateRunAsync(string threadId, s
/// Creates a new run for an agent thread.
/// Identifier of the thread.
- /// The ID of the agent that should run the thread.
+ /// The ID of the agent that should run the thread.
/// The overridden model name that the agent should use to run the thread.
/// The overridden system instructions that the agent should use to run the thread.
///
@@ -1789,15 +1808,15 @@ public virtual async Task> CreateRunAsync(string threadId, s
/// Currently the only supported value is `step_details.tool_calls[*].file_search.results[*].content` to fetch the file search result content.
///
/// The cancellation token to use.
- /// or is null.
+ /// 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, TruncationObject truncationStrategy = null, BinaryData toolChoice = null, BinaryData responseFormat = null, bool? parallelToolCalls = null, IReadOnlyDictionary metadata = null, IEnumerable include = null, CancellationToken cancellationToken = default)
+ public virtual Response CreateRun(string threadId, string agentId, 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, TruncationObject 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));
- Argument.AssertNotNull(assistantId, nameof(assistantId));
+ Argument.AssertNotNull(agentId, nameof(agentId));
CreateRunRequest createRunRequest = new CreateRunRequest(
- assistantId,
+ agentId,
overrideModelName,
overrideInstructions,
additionalInstructions,
@@ -1918,13 +1937,13 @@ public virtual Response CreateRun(string threadId, RequestContent content, IEnum
/// The cancellation token to use.
/// is null.
/// is an empty string, and was expected to be non-empty.
- internal virtual async Task> InternalGetRunsAsync(string threadId, int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default)
+ internal virtual async Task> InternalGetRunsAsync(string threadId, int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(threadId, nameof(threadId));
RequestContext context = FromCancellationToken(cancellationToken);
Response response = await InternalGetRunsAsync(threadId, limit, order?.ToString(), after, before, context).ConfigureAwait(false);
- return Response.FromValue(InternalOpenAIPageableListOfThreadRun.FromResponse(response), response);
+ return Response.FromValue(OpenAIPageableListOfThreadRun.FromResponse(response), response);
}
/// Gets a list of runs for a specified thread.
@@ -1936,13 +1955,13 @@ internal virtual async Task> Int
/// The cancellation token to use.
/// is null.
/// is an empty string, and was expected to be non-empty.
- internal virtual Response InternalGetRuns(string threadId, int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default)
+ internal virtual Response InternalGetRuns(string threadId, int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(threadId, nameof(threadId));
RequestContext context = FromCancellationToken(cancellationToken);
Response response = InternalGetRuns(threadId, limit, order?.ToString(), after, before, context);
- return Response.FromValue(InternalOpenAIPageableListOfThreadRun.FromResponse(response), response);
+ return Response.FromValue(OpenAIPageableListOfThreadRun.FromResponse(response), response);
}
///
@@ -2267,6 +2286,132 @@ public virtual Response UpdateRun(string threadId, string runId, RequestContent
}
}
+ /// Submits outputs from tools as requested by tool calls in a run. Runs that need submitted tool outputs will have a status of 'requires_action' with a required_action.type of 'submit_tool_outputs'.
+ /// Identifier of the thread.
+ /// Identifier of the run.
+ /// A list of tools for which the outputs are being submitted.
+ /// If true, returns a stream of events that happen during the Run as server-sent events, terminating when the run enters a terminal state.
+ /// The cancellation token to use.
+ /// , or is null.
+ /// or is an empty string, and was expected to be non-empty.
+ public virtual async Task> SubmitToolOutputsToRunAsync(string threadId, string runId, IEnumerable toolOutputs, bool? stream = null, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(threadId, nameof(threadId));
+ Argument.AssertNotNullOrEmpty(runId, nameof(runId));
+ Argument.AssertNotNull(toolOutputs, nameof(toolOutputs));
+
+ SubmitToolOutputsToRunRequest submitToolOutputsToRunRequest = new SubmitToolOutputsToRunRequest(toolOutputs.ToList(), stream, null);
+ RequestContext context = FromCancellationToken(cancellationToken);
+ Response response = await SubmitToolOutputsToRunAsync(threadId, runId, submitToolOutputsToRunRequest.ToRequestContent(), context).ConfigureAwait(false);
+ return Response.FromValue(ThreadRun.FromResponse(response), response);
+ }
+
+ /// Submits outputs from tools as requested by tool calls in a run. Runs that need submitted tool outputs will have a status of 'requires_action' with a required_action.type of 'submit_tool_outputs'.
+ /// Identifier of the thread.
+ /// Identifier of the run.
+ /// A list of tools for which the outputs are being submitted.
+ /// If true, returns a stream of events that happen during the Run as server-sent events, terminating when the run enters a terminal state.
+ /// The cancellation token to use.
+ /// , or is null.
+ /// or is an empty string, and was expected to be non-empty.
+ public virtual Response SubmitToolOutputsToRun(string threadId, string runId, IEnumerable toolOutputs, bool? stream = null, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNullOrEmpty(threadId, nameof(threadId));
+ Argument.AssertNotNullOrEmpty(runId, nameof(runId));
+ Argument.AssertNotNull(toolOutputs, nameof(toolOutputs));
+
+ SubmitToolOutputsToRunRequest submitToolOutputsToRunRequest = new SubmitToolOutputsToRunRequest(toolOutputs.ToList(), stream, null);
+ RequestContext context = FromCancellationToken(cancellationToken);
+ Response response = SubmitToolOutputsToRun(threadId, runId, submitToolOutputsToRunRequest.ToRequestContent(), context);
+ return Response.FromValue(ThreadRun.FromResponse(response), response);
+ }
+
+ ///
+ /// [Protocol Method] Submits outputs from tools as requested by tool calls in a run. Runs that need submitted tool outputs will have a status of 'requires_action' with a required_action.type of 'submit_tool_outputs'.
+ ///
+ /// -
+ ///
+ /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
+ ///
+ ///
+ /// -
+ ///
+ /// Please try the simpler convenience overload with strongly typed models first.
+ ///
+ ///
+ ///
+ ///
+ /// Identifier of the thread.
+ /// Identifier of the run.
+ /// The content to send as the body of the request.
+ /// The request context, which can override default behaviors of the client pipeline on a per-call basis.
+ /// , or is null.
+ /// 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 SubmitToolOutputsToRunAsync(string threadId, string runId, RequestContent content, RequestContext context = null)
+ {
+ Argument.AssertNotNullOrEmpty(threadId, nameof(threadId));
+ Argument.AssertNotNullOrEmpty(runId, nameof(runId));
+ Argument.AssertNotNull(content, nameof(content));
+
+ using var scope = ClientDiagnostics.CreateScope("AgentsClient.SubmitToolOutputsToRun");
+ scope.Start();
+ try
+ {
+ using HttpMessage message = CreateSubmitToolOutputsToRunRequest(threadId, runId, content, context);
+ return await _pipeline.ProcessMessageAsync(message, context).ConfigureAwait(false);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ ///
+ /// [Protocol Method] Submits outputs from tools as requested by tool calls in a run. Runs that need submitted tool outputs will have a status of 'requires_action' with a required_action.type of 'submit_tool_outputs'.
+ ///
+ /// -
+ ///
+ /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios.
+ ///
+ ///
+ /// -
+ ///
+ /// Please try the simpler convenience overload with strongly typed models first.
+ ///
+ ///
+ ///
+ ///
+ /// Identifier of the thread.
+ /// Identifier of the run.
+ /// The content to send as the body of the request.
+ /// The request context, which can override default behaviors of the client pipeline on a per-call basis.
+ /// , or is null.
+ /// 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 SubmitToolOutputsToRun(string threadId, string runId, RequestContent content, RequestContext context = null)
+ {
+ Argument.AssertNotNullOrEmpty(threadId, nameof(threadId));
+ Argument.AssertNotNullOrEmpty(runId, nameof(runId));
+ Argument.AssertNotNull(content, nameof(content));
+
+ using var scope = ClientDiagnostics.CreateScope("AgentsClient.SubmitToolOutputsToRun");
+ scope.Start();
+ try
+ {
+ using HttpMessage message = CreateSubmitToolOutputsToRunRequest(threadId, runId, content, context);
+ return _pipeline.ProcessMessage(message, context);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
/// Cancels a run of an in progress thread.
/// Identifier of the thread.
/// Identifier of the run.
@@ -2382,7 +2527,7 @@ public virtual Response CancelRun(string threadId, string runId, RequestContext
}
/// Creates a new agent thread and immediately starts a run using that new thread.
- /// The ID of the agent for which the thread should be created.
+ /// The ID of the agent for which the thread should be created.
/// The details used to create the new thread. If no thread is provided, an empty one will be created.
/// The overridden model that the agent should use to run the thread.
/// The overridden system instructions the agent should use to run the thread.
@@ -2419,13 +2564,13 @@ public virtual Response CancelRun(string threadId, string runId, RequestContext
/// 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.
/// The cancellation token to use.
- /// is null.
- public virtual async Task> CreateThreadAndRunAsync(string assistantId, AgentThreadCreationOptions 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, TruncationObject truncationStrategy = null, BinaryData toolChoice = null, BinaryData responseFormat = null, bool? parallelToolCalls = null, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default)
+ /// is null.
+ public virtual async Task> CreateThreadAndRunAsync(string agentId, AgentThreadCreationOptions 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, TruncationObject truncationStrategy = null, BinaryData toolChoice = null, BinaryData responseFormat = null, bool? parallelToolCalls = null, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default)
{
- Argument.AssertNotNull(assistantId, nameof(assistantId));
+ Argument.AssertNotNull(agentId, nameof(agentId));
CreateThreadAndRunRequest createThreadAndRunRequest = new CreateThreadAndRunRequest(
- assistantId,
+ agentId,
thread,
overrideModelName,
overrideInstructions,
@@ -2448,7 +2593,7 @@ public virtual async Task> CreateThreadAndRunAsync(string as
}
/// Creates a new agent thread and immediately starts a run using that new thread.
- /// The ID of the agent for which the thread should be created.
+ /// The ID of the agent for which the thread should be created.
/// The details used to create the new thread. If no thread is provided, an empty one will be created.
/// The overridden model that the agent should use to run the thread.
/// The overridden system instructions the agent should use to run the thread.
@@ -2485,13 +2630,13 @@ public virtual async Task> CreateThreadAndRunAsync(string as
/// 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.
/// The cancellation token to use.
- /// is null.
- public virtual Response CreateThreadAndRun(string assistantId, AgentThreadCreationOptions 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, TruncationObject truncationStrategy = null, BinaryData toolChoice = null, BinaryData responseFormat = null, bool? parallelToolCalls = null, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default)
+ /// is null.
+ public virtual Response CreateThreadAndRun(string agentId, AgentThreadCreationOptions 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, TruncationObject truncationStrategy = null, BinaryData toolChoice = null, BinaryData responseFormat = null, bool? parallelToolCalls = null, IReadOnlyDictionary metadata = null, CancellationToken cancellationToken = default)
{
- Argument.AssertNotNull(assistantId, nameof(assistantId));
+ Argument.AssertNotNull(agentId, nameof(agentId));
CreateThreadAndRunRequest createThreadAndRunRequest = new CreateThreadAndRunRequest(
- assistantId,
+ agentId,
thread,
overrideModelName,
overrideInstructions,
@@ -2741,14 +2886,14 @@ public virtual Response GetRunStep(string threadId, string runId, string stepId,
/// The cancellation token to use.
/// or is null.
/// or is an empty string, and was expected to be non-empty.
- internal virtual async Task> InternalGetRunStepsAsync(string threadId, string runId, IEnumerable include = null, int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default)
+ internal virtual async Task> InternalGetRunStepsAsync(string threadId, string runId, IEnumerable include = null, int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(threadId, nameof(threadId));
Argument.AssertNotNullOrEmpty(runId, nameof(runId));
RequestContext context = FromCancellationToken(cancellationToken);
Response response = await InternalGetRunStepsAsync(threadId, runId, include, limit, order?.ToString(), after, before, context).ConfigureAwait(false);
- return Response.FromValue(InternalOpenAIPageableListOfRunStep.FromResponse(response), response);
+ return Response.FromValue(OpenAIPageableListOfRunStep.FromResponse(response), response);
}
/// Gets a list of run steps from a thread run.
@@ -2765,14 +2910,14 @@ internal virtual async Task> Inter
/// The cancellation token to use.
/// or is null.
/// or is an empty string, and was expected to be non-empty.
- internal virtual Response InternalGetRunSteps(string threadId, string runId, IEnumerable include = null, int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default)
+ internal virtual Response InternalGetRunSteps(string threadId, string runId, IEnumerable include = null, int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(threadId, nameof(threadId));
Argument.AssertNotNullOrEmpty(runId, nameof(runId));
RequestContext context = FromCancellationToken(cancellationToken);
Response response = InternalGetRunSteps(threadId, runId, include, limit, order?.ToString(), after, before, context);
- return Response.FromValue(InternalOpenAIPageableListOfRunStep.FromResponse(response), response);
+ return Response.FromValue(OpenAIPageableListOfRunStep.FromResponse(response), response);
}
///
@@ -2876,7 +3021,7 @@ internal virtual Response InternalGetRunSteps(string threadId, string runId, IEn
/// Gets a list of previously uploaded files.
/// The purpose of the file.
/// The cancellation token to use.
- internal virtual async Task> InternalListFilesAsync(AgentFilePurpose? purpose = null, CancellationToken cancellationToken = default)
+ internal virtual async Task> InternalListFilesAsync(OpenAIFilePurpose? purpose = null, CancellationToken cancellationToken = default)
{
RequestContext context = FromCancellationToken(cancellationToken);
Response response = await InternalListFilesAsync(purpose?.ToString(), context).ConfigureAwait(false);
@@ -2886,7 +3031,7 @@ internal virtual async Task> InternalListFile
/// Gets a list of previously uploaded files.
/// The purpose of the file.
/// The cancellation token to use.
- internal virtual Response InternalListFiles(AgentFilePurpose? purpose = null, CancellationToken cancellationToken = default)
+ internal virtual Response InternalListFiles(OpenAIFilePurpose? purpose = null, CancellationToken cancellationToken = default)
{
RequestContext context = FromCancellationToken(cancellationToken);
Response response = InternalListFiles(purpose?.ToString(), context);
@@ -2903,7 +3048,7 @@ internal virtual Response InternalListFiles(AgentFileP
///
/// -
///
- /// Please try the simpler convenience overload with strongly typed models first.
+ /// Please try the simpler convenience overload with strongly typed models first.
///
///
///
@@ -2938,7 +3083,7 @@ internal virtual async Task InternalListFilesAsync(string purpose, Req
///
/// -
///
- /// Please try the simpler convenience overload with strongly typed models first.
+ /// Please try the simpler convenience overload with strongly typed models first.
///
///
///
@@ -2963,6 +3108,40 @@ internal virtual Response InternalListFiles(string purpose, RequestContext conte
}
}
+ /// Uploads a file for use by other operations.
+ /// 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.
+ /// The name of the file.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual async Task> UploadFileAsync(Stream data, OpenAIFilePurpose purpose, string filename = null, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(data, nameof(data));
+
+ UploadFileRequest uploadFileRequest = new UploadFileRequest(data, purpose, filename, null);
+ using MultipartFormDataRequestContent content = uploadFileRequest.ToMultipartRequestContent();
+ RequestContext context = FromCancellationToken(cancellationToken);
+ Response response = await UploadFileAsync(content, content.ContentType, context).ConfigureAwait(false);
+ return Response.FromValue(OpenAIFile.FromResponse(response), response);
+ }
+
+ /// Uploads a file for use by other operations.
+ /// 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.
+ /// The name of the file.
+ /// The cancellation token to use.
+ /// is null.
+ public virtual Response UploadFile(Stream data, OpenAIFilePurpose purpose, string filename = null, CancellationToken cancellationToken = default)
+ {
+ Argument.AssertNotNull(data, nameof(data));
+
+ UploadFileRequest uploadFileRequest = new UploadFileRequest(data, purpose, filename, null);
+ using MultipartFormDataRequestContent content = uploadFileRequest.ToMultipartRequestContent();
+ RequestContext context = FromCancellationToken(cancellationToken);
+ Response response = UploadFile(content, content.ContentType, context);
+ return Response.FromValue(OpenAIFile.FromResponse(response), response);
+ }
+
///
/// [Protocol Method] Uploads a file for use by other operations.
///
@@ -2973,7 +3152,7 @@ internal virtual Response InternalListFiles(string purpose, RequestContext conte
///
/// -
///
- /// Please try the simpler convenience overload with strongly typed models first.
+ /// Please try the simpler convenience overload with strongly typed models first.
///
///
///
@@ -3012,7 +3191,7 @@ public virtual async Task UploadFileAsync(RequestContent content, stri
///
/// -
///
- /// Please try the simpler convenience overload with strongly typed models first.
+ /// Please try the simpler convenience overload with strongly typed models first.
///
///
///
@@ -3152,13 +3331,13 @@ 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)
+ public virtual async Task> GetFileAsync(string fileId, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(fileId, nameof(fileId));
RequestContext context = FromCancellationToken(cancellationToken);
Response response = await GetFileAsync(fileId, context).ConfigureAwait(false);
- return Response.FromValue(AgentFile.FromResponse(response), response);
+ return Response.FromValue(OpenAIFile.FromResponse(response), response);
}
/// Returns information about a specific file. Does not retrieve file content.
@@ -3166,13 +3345,13 @@ public virtual async Task> GetFileAsync(string fileId, Cance
/// 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)
+ public virtual Response GetFile(string fileId, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(fileId, nameof(fileId));
RequestContext context = FromCancellationToken(cancellationToken);
Response response = GetFile(fileId, context);
- return Response.FromValue(AgentFile.FromResponse(response), response);
+ return Response.FromValue(OpenAIFile.FromResponse(response), response);
}
///
@@ -3365,11 +3544,11 @@ public virtual Response GetFileContent(string fileId, RequestContext context)
/// A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.
/// A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.
/// The cancellation token to use.
- public virtual async Task> GetVectorStoresAsync(int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default)
+ public virtual async Task> GetVectorStoresAsync(int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default)
{
RequestContext context = FromCancellationToken(cancellationToken);
Response response = await GetVectorStoresAsync(limit, order?.ToString(), after, before, context).ConfigureAwait(false);
- return Response.FromValue(AgentPageableListOfVectorStore.FromResponse(response), response);
+ return Response.FromValue(OpenAIPageableListOfVectorStore.FromResponse(response), response);
}
/// Returns a list of vector stores.
@@ -3378,11 +3557,11 @@ public virtual async Task> GetVectorSto
/// A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.
/// A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.
/// The cancellation token to use.
- public virtual Response GetVectorStores(int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default)
+ public virtual Response GetVectorStores(int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default)
{
RequestContext context = FromCancellationToken(cancellationToken);
Response response = GetVectorStores(limit, order?.ToString(), after, before, context);
- return Response.FromValue(AgentPageableListOfVectorStore.FromResponse(response), response);
+ return Response.FromValue(OpenAIPageableListOfVectorStore.FromResponse(response), response);
}
///
@@ -3923,13 +4102,13 @@ public virtual Response DeleteVectorStore(string vectorStoreId, RequestContext c
/// The cancellation token to use.
/// is null.
/// is an empty string, and was expected to be non-empty.
- public virtual async Task> GetVectorStoreFilesAsync(string vectorStoreId, VectorStoreFileStatusFilter? filter = null, int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default)
+ public virtual async Task> GetVectorStoreFilesAsync(string vectorStoreId, VectorStoreFileStatusFilter? filter = null, int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId));
RequestContext context = FromCancellationToken(cancellationToken);
Response response = await GetVectorStoreFilesAsync(vectorStoreId, filter?.ToString(), limit, order?.ToString(), after, before, context).ConfigureAwait(false);
- return Response.FromValue(AgentPageableListOfVectorStoreFile.FromResponse(response), response);
+ return Response.FromValue(OpenAIPageableListOfVectorStoreFile.FromResponse(response), response);
}
/// Returns a list of vector store files.
@@ -3942,13 +4121,13 @@ public virtual async Task> GetVecto
/// The cancellation token to use.
/// is null.
/// is an empty string, and was expected to be non-empty.
- public virtual Response GetVectorStoreFiles(string vectorStoreId, VectorStoreFileStatusFilter? filter = null, int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default)
+ public virtual Response GetVectorStoreFiles(string vectorStoreId, VectorStoreFileStatusFilter? filter = null, int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId));
RequestContext context = FromCancellationToken(cancellationToken);
Response response = GetVectorStoreFiles(vectorStoreId, filter?.ToString(), limit, order?.ToString(), after, before, context);
- return Response.FromValue(AgentPageableListOfVectorStoreFile.FromResponse(response), response);
+ return Response.FromValue(OpenAIPageableListOfVectorStoreFile.FromResponse(response), response);
}
///
@@ -4750,14 +4929,14 @@ public virtual Response CancelVectorStoreFileBatch(string vectorStoreId, string
/// The cancellation token to use.
/// or is null.
/// or is an empty string, and was expected to be non-empty.
- public virtual async Task> GetVectorStoreFileBatchFilesAsync(string vectorStoreId, string batchId, VectorStoreFileStatusFilter? filter = null, int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default)
+ public virtual async Task> GetVectorStoreFileBatchFilesAsync(string vectorStoreId, string batchId, VectorStoreFileStatusFilter? filter = null, int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId));
Argument.AssertNotNullOrEmpty(batchId, nameof(batchId));
RequestContext context = FromCancellationToken(cancellationToken);
Response response = await GetVectorStoreFileBatchFilesAsync(vectorStoreId, batchId, filter?.ToString(), limit, order?.ToString(), after, before, context).ConfigureAwait(false);
- return Response.FromValue(AgentPageableListOfVectorStoreFile.FromResponse(response), response);
+ return Response.FromValue(OpenAIPageableListOfVectorStoreFile.FromResponse(response), response);
}
/// Returns a list of vector store files in a batch.
@@ -4771,14 +4950,14 @@ public virtual async Task> GetVecto
/// The cancellation token to use.
/// or is null.
/// or is an empty string, and was expected to be non-empty.
- public virtual Response GetVectorStoreFileBatchFiles(string vectorStoreId, string batchId, VectorStoreFileStatusFilter? filter = null, int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default)
+ public virtual Response GetVectorStoreFileBatchFiles(string vectorStoreId, string batchId, VectorStoreFileStatusFilter? filter = null, int? limit = null, ListSortOrder? order = null, string after = null, string before = null, CancellationToken cancellationToken = default)
{
Argument.AssertNotNullOrEmpty(vectorStoreId, nameof(vectorStoreId));
Argument.AssertNotNullOrEmpty(batchId, nameof(batchId));
RequestContext context = FromCancellationToken(cancellationToken);
Response response = GetVectorStoreFileBatchFiles(vectorStoreId, batchId, filter?.ToString(), limit, order?.ToString(), after, before, context);
- return Response.FromValue(AgentPageableListOfVectorStoreFile.FromResponse(response), response);
+ return Response.FromValue(OpenAIPageableListOfVectorStoreFile.FromResponse(response), response);
}
///
@@ -4931,7 +5110,7 @@ internal HttpMessage CreateInternalGetAgentsRequest(int? limit, string order, st
return message;
}
- internal HttpMessage CreateGetAgentRequest(string assistantId, RequestContext context)
+ internal HttpMessage CreateGetAgentRequest(string agentId, RequestContext context)
{
var message = _pipeline.CreateMessage(context, ResponseClassifier200);
var request = message.Request;
@@ -4945,14 +5124,14 @@ internal HttpMessage CreateGetAgentRequest(string assistantId, RequestContext co
uri.AppendRaw("/providers/Microsoft.MachineLearningServices/workspaces/", false);
uri.AppendRaw(_projectName, true);
uri.AppendPath("/assistants/", false);
- uri.AppendPath(assistantId, true);
+ uri.AppendPath(agentId, true);
uri.AppendQuery("api-version", _apiVersion, true);
request.Uri = uri;
request.Headers.Add("Accept", "application/json");
return message;
}
- internal HttpMessage CreateUpdateAgentRequest(string assistantId, RequestContent content, RequestContext context)
+ internal HttpMessage CreateUpdateAgentRequest(string agentId, RequestContent content, RequestContext context)
{
var message = _pipeline.CreateMessage(context, ResponseClassifier200);
var request = message.Request;
@@ -4966,7 +5145,7 @@ internal HttpMessage CreateUpdateAgentRequest(string assistantId, RequestContent
uri.AppendRaw("/providers/Microsoft.MachineLearningServices/workspaces/", false);
uri.AppendRaw(_projectName, true);
uri.AppendPath("/assistants/", false);
- uri.AppendPath(assistantId, true);
+ uri.AppendPath(agentId, true);
uri.AppendQuery("api-version", _apiVersion, true);
request.Uri = uri;
request.Headers.Add("Accept", "application/json");
@@ -4975,7 +5154,7 @@ internal HttpMessage CreateUpdateAgentRequest(string assistantId, RequestContent
return message;
}
- internal HttpMessage CreateInternalDeleteAgentRequest(string assistantId, RequestContext context)
+ internal HttpMessage CreateInternalDeleteAgentRequest(string agentId, RequestContext context)
{
var message = _pipeline.CreateMessage(context, ResponseClassifier200);
var request = message.Request;
@@ -4989,7 +5168,7 @@ internal HttpMessage CreateInternalDeleteAgentRequest(string assistantId, Reques
uri.AppendRaw("/providers/Microsoft.MachineLearningServices/workspaces/", false);
uri.AppendRaw(_projectName, true);
uri.AppendPath("/assistants/", false);
- uri.AppendPath(assistantId, true);
+ uri.AppendPath(agentId, true);
uri.AppendQuery("api-version", _apiVersion, true);
request.Uri = uri;
request.Headers.Add("Accept", "application/json");
diff --git a/sdk/ai/Azure.AI.Agents/src/Generated/AgentsClientOptions.cs b/sdk/ai/Azure.AI.Agents/src/Generated/AgentsClientOptions.cs
new file mode 100644
index 000000000000..7f8bc2d4fcc1
--- /dev/null
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/AgentsClientOptions.cs
@@ -0,0 +1,37 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using Azure.Core;
+
+namespace Azure.AI.Agents
+{
+ /// Client options for AgentsClient.
+ public partial class AgentsClientOptions : ClientOptions
+ {
+ private const ServiceVersion LatestVersion = ServiceVersion.V2024_07_01_Preview;
+
+ /// The version of the service to use.
+ public enum ServiceVersion
+ {
+ /// Service version "2024-07-01-preview".
+ V2024_07_01_Preview = 1,
+ }
+
+ internal string Version { get; }
+
+ /// Initializes new instance of AgentsClientOptions.
+ public AgentsClientOptions(ServiceVersion version = LatestVersion)
+ {
+ Version = version switch
+ {
+ ServiceVersion.V2024_07_01_Preview => "2024-07-01-preview",
+ _ => throw new NotSupportedException()
+ };
+ }
+ }
+}
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AgentsNamedToolChoice.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/AgentsNamedToolChoice.Serialization.cs
similarity index 99%
rename from sdk/ai/Azure.AI.Projects/src/Generated/AgentsNamedToolChoice.Serialization.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/AgentsNamedToolChoice.Serialization.cs
index eb2199b05975..6e6452c5c24c 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/AgentsNamedToolChoice.Serialization.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/AgentsNamedToolChoice.Serialization.cs
@@ -11,7 +11,7 @@
using System.Text.Json;
using Azure.Core;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
public partial class AgentsNamedToolChoice : IUtf8JsonSerializable, IJsonModel
{
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AgentsNamedToolChoice.cs b/sdk/ai/Azure.AI.Agents/src/Generated/AgentsNamedToolChoice.cs
similarity index 99%
rename from sdk/ai/Azure.AI.Projects/src/Generated/AgentsNamedToolChoice.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/AgentsNamedToolChoice.cs
index eb7476192154..7b5b26278848 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/AgentsNamedToolChoice.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/AgentsNamedToolChoice.cs
@@ -8,7 +8,7 @@
using System;
using System.Collections.Generic;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
/// Specifies a tool the model should use. Use to force the model to call a specific tool.
public partial class AgentsNamedToolChoice
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AgentsNamedToolChoiceType.cs b/sdk/ai/Azure.AI.Agents/src/Generated/AgentsNamedToolChoiceType.cs
similarity index 99%
rename from sdk/ai/Azure.AI.Projects/src/Generated/AgentsNamedToolChoiceType.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/AgentsNamedToolChoiceType.cs
index e9371e9da058..25709be98bee 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/AgentsNamedToolChoiceType.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/AgentsNamedToolChoiceType.cs
@@ -8,7 +8,7 @@
using System;
using System.ComponentModel;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
/// Available tool types for agents named tools.
public readonly partial struct AgentsNamedToolChoiceType : IEquatable
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AzureAISearchResource.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/AzureAISearchResource.Serialization.cs
similarity index 99%
rename from sdk/ai/Azure.AI.Projects/src/Generated/AzureAISearchResource.Serialization.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/AzureAISearchResource.Serialization.cs
index afce3c218073..cb9afc4a50af 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/AzureAISearchResource.Serialization.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/AzureAISearchResource.Serialization.cs
@@ -11,7 +11,7 @@
using System.Text.Json;
using Azure.Core;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
public partial class AzureAISearchResource : IUtf8JsonSerializable, IJsonModel
{
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AzureAISearchResource.cs b/sdk/ai/Azure.AI.Agents/src/Generated/AzureAISearchResource.cs
similarity index 99%
rename from sdk/ai/Azure.AI.Projects/src/Generated/AzureAISearchResource.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/AzureAISearchResource.cs
index 2aaaf6746d8b..d5b6d2c0d6c9 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/AzureAISearchResource.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/AzureAISearchResource.cs
@@ -8,7 +8,7 @@
using System;
using System.Collections.Generic;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
/// A set of index resources used by the `azure_ai_search` tool.
public partial class AzureAISearchResource
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AzureAISearchToolDefinition.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/AzureAISearchToolDefinition.Serialization.cs
similarity index 99%
rename from sdk/ai/Azure.AI.Projects/src/Generated/AzureAISearchToolDefinition.Serialization.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/AzureAISearchToolDefinition.Serialization.cs
index b2b505a64fe7..e30db4408312 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/AzureAISearchToolDefinition.Serialization.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/AzureAISearchToolDefinition.Serialization.cs
@@ -11,7 +11,7 @@
using System.Text.Json;
using Azure.Core;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
public partial class AzureAISearchToolDefinition : IUtf8JsonSerializable, IJsonModel
{
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AzureAISearchToolDefinition.cs b/sdk/ai/Azure.AI.Agents/src/Generated/AzureAISearchToolDefinition.cs
similarity index 97%
rename from sdk/ai/Azure.AI.Projects/src/Generated/AzureAISearchToolDefinition.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/AzureAISearchToolDefinition.cs
index b8e95d87f7ab..dbac18de08be 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/AzureAISearchToolDefinition.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/AzureAISearchToolDefinition.cs
@@ -8,7 +8,7 @@
using System;
using System.Collections.Generic;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
/// The input definition information for an Azure AI search tool as used to configure an agent.
public partial class AzureAISearchToolDefinition : ToolDefinition
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AzureFunctionBinding.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/AzureFunctionBinding.Serialization.cs
similarity index 99%
rename from sdk/ai/Azure.AI.Projects/src/Generated/AzureFunctionBinding.Serialization.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/AzureFunctionBinding.Serialization.cs
index a4debebae798..29e412693003 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/AzureFunctionBinding.Serialization.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/AzureFunctionBinding.Serialization.cs
@@ -11,7 +11,7 @@
using System.Text.Json;
using Azure.Core;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
public partial class AzureFunctionBinding : IUtf8JsonSerializable, IJsonModel
{
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AzureFunctionBinding.cs b/sdk/ai/Azure.AI.Agents/src/Generated/AzureFunctionBinding.cs
similarity index 99%
rename from sdk/ai/Azure.AI.Projects/src/Generated/AzureFunctionBinding.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/AzureFunctionBinding.cs
index 86898f39d812..a8d55f18b6f5 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/AzureFunctionBinding.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/AzureFunctionBinding.cs
@@ -8,7 +8,7 @@
using System;
using System.Collections.Generic;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
/// The structure for keeping storage queue name and URI.
public partial class AzureFunctionBinding
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AzureFunctionBindingType.cs b/sdk/ai/Azure.AI.Agents/src/Generated/AzureFunctionBindingType.cs
similarity index 98%
rename from sdk/ai/Azure.AI.Projects/src/Generated/AzureFunctionBindingType.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/AzureFunctionBindingType.cs
index d3ef7652d782..1370c801a02f 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/AzureFunctionBindingType.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/AzureFunctionBindingType.cs
@@ -8,7 +8,7 @@
using System;
using System.ComponentModel;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
/// The AzureFunctionBinding_type.
public readonly partial struct AzureFunctionBindingType : IEquatable
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AzureFunctionStorageQueue.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/AzureFunctionStorageQueue.Serialization.cs
similarity index 99%
rename from sdk/ai/Azure.AI.Projects/src/Generated/AzureFunctionStorageQueue.Serialization.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/AzureFunctionStorageQueue.Serialization.cs
index 1965136e4c3d..d917d4de463d 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/AzureFunctionStorageQueue.Serialization.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/AzureFunctionStorageQueue.Serialization.cs
@@ -11,7 +11,7 @@
using System.Text.Json;
using Azure.Core;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
public partial class AzureFunctionStorageQueue : IUtf8JsonSerializable, IJsonModel
{
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AzureFunctionStorageQueue.cs b/sdk/ai/Azure.AI.Agents/src/Generated/AzureFunctionStorageQueue.cs
similarity index 99%
rename from sdk/ai/Azure.AI.Projects/src/Generated/AzureFunctionStorageQueue.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/AzureFunctionStorageQueue.cs
index 1782ede5ac86..0a6ae379e832 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/AzureFunctionStorageQueue.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/AzureFunctionStorageQueue.cs
@@ -8,7 +8,7 @@
using System;
using System.Collections.Generic;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
/// The structure for keeping storage queue name and URI.
public partial class AzureFunctionStorageQueue
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AzureFunctionToolDefinition.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/AzureFunctionToolDefinition.Serialization.cs
similarity index 97%
rename from sdk/ai/Azure.AI.Projects/src/Generated/AzureFunctionToolDefinition.Serialization.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/AzureFunctionToolDefinition.Serialization.cs
index 2e12aa340633..3c380c9e3bf0 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/AzureFunctionToolDefinition.Serialization.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/AzureFunctionToolDefinition.Serialization.cs
@@ -11,7 +11,7 @@
using System.Text.Json;
using Azure.Core;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
public partial class AzureFunctionToolDefinition : IUtf8JsonSerializable, IJsonModel
{
@@ -36,7 +36,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri
base.JsonModelWriteCore(writer, options);
writer.WritePropertyName("azure_function"u8);
- writer.WriteObjectValue(InternalAzureFunction, options);
+ writer.WriteObjectValue(InternalAzureFunction, options);
}
AzureFunctionToolDefinition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AzureFunctionToolDefinition.cs b/sdk/ai/Azure.AI.Agents/src/Generated/AzureFunctionToolDefinition.cs
similarity index 59%
rename from sdk/ai/Azure.AI.Projects/src/Generated/AzureFunctionToolDefinition.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/AzureFunctionToolDefinition.cs
index 87032b76e501..2e42b31a73f6 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/AzureFunctionToolDefinition.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/AzureFunctionToolDefinition.cs
@@ -8,11 +8,22 @@
using System;
using System.Collections.Generic;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
/// The input definition information for a azure function tool as used to configure an agent.
public partial class AzureFunctionToolDefinition : ToolDefinition
{
+ /// Initializes a new instance of .
+ /// The definition of the concrete function that the function tool should call.
+ /// is null.
+ public AzureFunctionToolDefinition(InternalAzureFunctionDefinition internalAzureFunction)
+ {
+ Argument.AssertNotNull(internalAzureFunction, nameof(internalAzureFunction));
+
+ Type = "azure_function";
+ InternalAzureFunction = internalAzureFunction;
+ }
+
/// Initializes a new instance of .
/// The object type.
/// Keeps track of any properties unknown to the library.
@@ -26,5 +37,8 @@ internal AzureFunctionToolDefinition(string type, IDictionary The definition of the concrete function that the function tool should call.
+ public InternalAzureFunctionDefinition InternalAzureFunction { get; set; }
}
}
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/BingGroundingToolDefinition.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/BingGroundingToolDefinition.Serialization.cs
similarity index 99%
rename from sdk/ai/Azure.AI.Projects/src/Generated/BingGroundingToolDefinition.Serialization.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/BingGroundingToolDefinition.Serialization.cs
index d606a9591dd4..f96c5a442729 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/BingGroundingToolDefinition.Serialization.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/BingGroundingToolDefinition.Serialization.cs
@@ -11,7 +11,7 @@
using System.Text.Json;
using Azure.Core;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
public partial class BingGroundingToolDefinition : IUtf8JsonSerializable, IJsonModel
{
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/BingGroundingToolDefinition.cs b/sdk/ai/Azure.AI.Agents/src/Generated/BingGroundingToolDefinition.cs
similarity index 98%
rename from sdk/ai/Azure.AI.Projects/src/Generated/BingGroundingToolDefinition.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/BingGroundingToolDefinition.cs
index a43df24739de..c5be1cd1ee1d 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/BingGroundingToolDefinition.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/BingGroundingToolDefinition.cs
@@ -8,7 +8,7 @@
using System;
using System.Collections.Generic;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
/// The input definition information for a bing grounding search tool as used to configure an agent.
public partial class BingGroundingToolDefinition : ToolDefinition
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CodeInterpreterToolDefinition.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/CodeInterpreterToolDefinition.Serialization.cs
similarity index 99%
rename from sdk/ai/Azure.AI.Projects/src/Generated/CodeInterpreterToolDefinition.Serialization.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/CodeInterpreterToolDefinition.Serialization.cs
index 005189ea069f..9092f4a6841e 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/CodeInterpreterToolDefinition.Serialization.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/CodeInterpreterToolDefinition.Serialization.cs
@@ -11,7 +11,7 @@
using System.Text.Json;
using Azure.Core;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
public partial class CodeInterpreterToolDefinition : IUtf8JsonSerializable, IJsonModel
{
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CodeInterpreterToolDefinition.cs b/sdk/ai/Azure.AI.Agents/src/Generated/CodeInterpreterToolDefinition.cs
similarity index 97%
rename from sdk/ai/Azure.AI.Projects/src/Generated/CodeInterpreterToolDefinition.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/CodeInterpreterToolDefinition.cs
index fbcc0b2aa891..f920b6fea97e 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/CodeInterpreterToolDefinition.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/CodeInterpreterToolDefinition.cs
@@ -8,7 +8,7 @@
using System;
using System.Collections.Generic;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
/// The input definition information for a code interpreter tool as used to configure an agent.
public partial class CodeInterpreterToolDefinition : ToolDefinition
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CodeInterpreterToolResource.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/CodeInterpreterToolResource.Serialization.cs
similarity index 99%
rename from sdk/ai/Azure.AI.Projects/src/Generated/CodeInterpreterToolResource.Serialization.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/CodeInterpreterToolResource.Serialization.cs
index fe0ccc4770ad..5458cc1a03a7 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/CodeInterpreterToolResource.Serialization.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/CodeInterpreterToolResource.Serialization.cs
@@ -11,7 +11,7 @@
using System.Text.Json;
using Azure.Core;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
public partial class CodeInterpreterToolResource : IUtf8JsonSerializable, IJsonModel
{
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CodeInterpreterToolResource.cs b/sdk/ai/Azure.AI.Agents/src/Generated/CodeInterpreterToolResource.cs
similarity index 99%
rename from sdk/ai/Azure.AI.Projects/src/Generated/CodeInterpreterToolResource.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/CodeInterpreterToolResource.cs
index 5eebfab8f085..53cf33a337ff 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/CodeInterpreterToolResource.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/CodeInterpreterToolResource.cs
@@ -8,7 +8,7 @@
using System;
using System.Collections.Generic;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
/// A set of resources that are used by the `code_interpreter` tool.
public partial class CodeInterpreterToolResource
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CreateAgentRequest.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/CreateAgentRequest.Serialization.cs
similarity index 99%
rename from sdk/ai/Azure.AI.Projects/src/Generated/CreateAgentRequest.Serialization.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/CreateAgentRequest.Serialization.cs
index bd26d118a0d1..616e1cfbd3f0 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/CreateAgentRequest.Serialization.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/CreateAgentRequest.Serialization.cs
@@ -11,7 +11,7 @@
using System.Text.Json;
using Azure.Core;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
internal partial class CreateAgentRequest : IUtf8JsonSerializable, IJsonModel
{
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CreateAgentRequest.cs b/sdk/ai/Azure.AI.Agents/src/Generated/CreateAgentRequest.cs
similarity index 99%
rename from sdk/ai/Azure.AI.Projects/src/Generated/CreateAgentRequest.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/CreateAgentRequest.cs
index 9dda204238ad..75179a4c0f8a 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/CreateAgentRequest.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/CreateAgentRequest.cs
@@ -8,7 +8,7 @@
using System;
using System.Collections.Generic;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
/// The CreateAgentRequest.
internal partial class CreateAgentRequest
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CreateMessageRequest.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/CreateMessageRequest.Serialization.cs
similarity index 99%
rename from sdk/ai/Azure.AI.Projects/src/Generated/CreateMessageRequest.Serialization.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/CreateMessageRequest.Serialization.cs
index e7b65a214b4d..7b1b4054e06b 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/CreateMessageRequest.Serialization.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/CreateMessageRequest.Serialization.cs
@@ -11,7 +11,7 @@
using System.Text.Json;
using Azure.Core;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
internal partial class CreateMessageRequest : IUtf8JsonSerializable, IJsonModel
{
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CreateMessageRequest.cs b/sdk/ai/Azure.AI.Agents/src/Generated/CreateMessageRequest.cs
similarity index 99%
rename from sdk/ai/Azure.AI.Projects/src/Generated/CreateMessageRequest.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/CreateMessageRequest.cs
index 06f70fecdb8a..7f7a7722ec7a 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/CreateMessageRequest.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/CreateMessageRequest.cs
@@ -8,7 +8,7 @@
using System;
using System.Collections.Generic;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
/// The CreateMessageRequest.
internal partial class CreateMessageRequest
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CreateRunRequest.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/CreateRunRequest.Serialization.cs
similarity index 99%
rename from sdk/ai/Azure.AI.Projects/src/Generated/CreateRunRequest.Serialization.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/CreateRunRequest.Serialization.cs
index bde5271e3de4..7defc2e238be 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/CreateRunRequest.Serialization.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/CreateRunRequest.Serialization.cs
@@ -11,7 +11,7 @@
using System.Text.Json;
using Azure.Core;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
internal partial class CreateRunRequest : IUtf8JsonSerializable, IJsonModel
{
@@ -35,7 +35,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit
}
writer.WritePropertyName("assistant_id"u8);
- writer.WriteStringValue(AssistantId);
+ writer.WriteStringValue(AgentId);
if (Optional.IsDefined(OverrideModelName))
{
if (OverrideModelName != null)
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CreateRunRequest.cs b/sdk/ai/Azure.AI.Agents/src/Generated/CreateRunRequest.cs
similarity index 93%
rename from sdk/ai/Azure.AI.Projects/src/Generated/CreateRunRequest.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/CreateRunRequest.cs
index 9b9969dd27eb..1c9cc007fbf1 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/CreateRunRequest.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/CreateRunRequest.cs
@@ -8,7 +8,7 @@
using System;
using System.Collections.Generic;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
/// The CreateRunRequest.
internal partial class CreateRunRequest
@@ -46,20 +46,20 @@ internal partial class CreateRunRequest
private IDictionary _serializedAdditionalRawData;
/// Initializes a new instance of .
- /// The ID of the agent that should run the thread.
- /// is null.
- internal CreateRunRequest(string assistantId)
+ /// The ID of the agent that should run the thread.
+ /// is null.
+ internal CreateRunRequest(string agentId)
{
- Argument.AssertNotNull(assistantId, nameof(assistantId));
+ Argument.AssertNotNull(agentId, nameof(agentId));
- AssistantId = assistantId;
+ AgentId = agentId;
AdditionalMessages = new ChangeTrackingList();
OverrideTools = new ChangeTrackingList();
Metadata = new ChangeTrackingDictionary();
}
/// Initializes a new instance of .
- /// The ID of the agent that should run the thread.
+ /// The ID of the agent that should run the thread.
/// The overridden model name that the agent should use to run the thread.
/// The overridden system instructions that the agent should use to run the thread.
///
@@ -103,9 +103,9 @@ internal CreateRunRequest(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 CreateRunRequest(string assistantId, string overrideModelName, string overrideInstructions, string additionalInstructions, IReadOnlyList additionalMessages, IReadOnlyList overrideTools, bool? stream, float? temperature, float? topP, int? maxPromptTokens, int? maxCompletionTokens, TruncationObject truncationStrategy, BinaryData toolChoice, BinaryData responseFormat, bool? parallelToolCalls, IReadOnlyDictionary metadata, IDictionary serializedAdditionalRawData)
+ internal CreateRunRequest(string agentId, string overrideModelName, string overrideInstructions, string additionalInstructions, IReadOnlyList additionalMessages, IReadOnlyList overrideTools, bool? stream, float? temperature, float? topP, int? maxPromptTokens, int? maxCompletionTokens, TruncationObject truncationStrategy, BinaryData toolChoice, BinaryData responseFormat, bool? parallelToolCalls, IReadOnlyDictionary metadata, IDictionary serializedAdditionalRawData)
{
- AssistantId = assistantId;
+ AgentId = agentId;
OverrideModelName = overrideModelName;
OverrideInstructions = overrideInstructions;
AdditionalInstructions = additionalInstructions;
@@ -130,7 +130,7 @@ internal CreateRunRequest()
}
/// The ID of the agent that should run the thread.
- public string AssistantId { get; }
+ public string AgentId { get; }
/// The overridden model name that the agent should use to run the thread.
public string OverrideModelName { get; }
/// The overridden system instructions that the agent should use to run the thread.
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CreateThreadAndRunRequest.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/CreateThreadAndRunRequest.Serialization.cs
similarity index 99%
rename from sdk/ai/Azure.AI.Projects/src/Generated/CreateThreadAndRunRequest.Serialization.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/CreateThreadAndRunRequest.Serialization.cs
index 0af226f2493c..094386920567 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/CreateThreadAndRunRequest.Serialization.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/CreateThreadAndRunRequest.Serialization.cs
@@ -11,7 +11,7 @@
using System.Text.Json;
using Azure.Core;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
internal partial class CreateThreadAndRunRequest : IUtf8JsonSerializable, IJsonModel
{
@@ -35,7 +35,7 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit
}
writer.WritePropertyName("assistant_id"u8);
- writer.WriteStringValue(AssistantId);
+ writer.WriteStringValue(AgentId);
if (Optional.IsDefined(Thread))
{
writer.WritePropertyName("thread"u8);
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CreateThreadAndRunRequest.cs b/sdk/ai/Azure.AI.Agents/src/Generated/CreateThreadAndRunRequest.cs
similarity index 93%
rename from sdk/ai/Azure.AI.Projects/src/Generated/CreateThreadAndRunRequest.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/CreateThreadAndRunRequest.cs
index 58bc40b50d21..bb52a5aa8881 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/CreateThreadAndRunRequest.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/CreateThreadAndRunRequest.cs
@@ -8,7 +8,7 @@
using System;
using System.Collections.Generic;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
/// The CreateThreadAndRunRequest.
internal partial class CreateThreadAndRunRequest
@@ -46,19 +46,19 @@ internal partial class CreateThreadAndRunRequest
private IDictionary _serializedAdditionalRawData;
/// Initializes a new instance of .
- /// The ID of the agent for which the thread should be created.
- /// is null.
- internal CreateThreadAndRunRequest(string assistantId)
+ /// The ID of the agent for which the thread should be created.
+ /// is null.
+ internal CreateThreadAndRunRequest(string agentId)
{
- Argument.AssertNotNull(assistantId, nameof(assistantId));
+ Argument.AssertNotNull(agentId, nameof(agentId));
- AssistantId = assistantId;
+ AgentId = agentId;
OverrideTools = new ChangeTrackingList();
Metadata = new ChangeTrackingDictionary();
}
/// Initializes a new instance of .
- /// The ID of the agent for which the thread should be created.
+ /// The ID of the agent for which the thread should be created.
/// The details used to create the new thread. If no thread is provided, an empty one will be created.
/// The overridden model that the agent should use to run the thread.
/// The overridden system instructions the agent should use to run the thread.
@@ -99,9 +99,9 @@ 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, AgentThreadCreationOptions thread, string overrideModelName, string overrideInstructions, IReadOnlyList overrideTools, UpdateToolResourcesOptions toolResources, bool? stream, float? temperature, float? topP, int? maxPromptTokens, int? maxCompletionTokens, TruncationObject truncationStrategy, BinaryData toolChoice, BinaryData responseFormat, bool? parallelToolCalls, IReadOnlyDictionary metadata, IDictionary serializedAdditionalRawData)
+ internal CreateThreadAndRunRequest(string agentId, AgentThreadCreationOptions thread, string overrideModelName, string overrideInstructions, IReadOnlyList overrideTools, UpdateToolResourcesOptions toolResources, bool? stream, float? temperature, float? topP, int? maxPromptTokens, int? maxCompletionTokens, TruncationObject truncationStrategy, BinaryData toolChoice, BinaryData responseFormat, bool? parallelToolCalls, IReadOnlyDictionary metadata, IDictionary serializedAdditionalRawData)
{
- AssistantId = assistantId;
+ AgentId = agentId;
Thread = thread;
OverrideModelName = overrideModelName;
OverrideInstructions = overrideInstructions;
@@ -126,7 +126,7 @@ internal CreateThreadAndRunRequest()
}
/// The ID of the agent for which the thread should be created.
- public string AssistantId { get; }
+ public string AgentId { get; }
/// The details used to create the new thread. If no thread is provided, an empty one will be created.
public AgentThreadCreationOptions Thread { get; }
/// The overridden model that the agent should use to run the thread.
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CreateThreadRequest.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/CreateThreadRequest.Serialization.cs
similarity index 99%
rename from sdk/ai/Azure.AI.Projects/src/Generated/CreateThreadRequest.Serialization.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/CreateThreadRequest.Serialization.cs
index 4ff6f883a409..080727a4a5ab 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/CreateThreadRequest.Serialization.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/CreateThreadRequest.Serialization.cs
@@ -11,7 +11,7 @@
using System.Text.Json;
using Azure.Core;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
internal partial class CreateThreadRequest : IUtf8JsonSerializable, IJsonModel
{
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CreateThreadRequest.cs b/sdk/ai/Azure.AI.Agents/src/Generated/CreateThreadRequest.cs
similarity index 99%
rename from sdk/ai/Azure.AI.Projects/src/Generated/CreateThreadRequest.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/CreateThreadRequest.cs
index 786587e94f9b..7df0c883ffbc 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/CreateThreadRequest.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/CreateThreadRequest.cs
@@ -8,7 +8,7 @@
using System;
using System.Collections.Generic;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
/// The CreateThreadRequest.
internal partial class CreateThreadRequest
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CreateVectorStoreFileBatchRequest.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/CreateVectorStoreFileBatchRequest.Serialization.cs
similarity index 99%
rename from sdk/ai/Azure.AI.Projects/src/Generated/CreateVectorStoreFileBatchRequest.Serialization.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/CreateVectorStoreFileBatchRequest.Serialization.cs
index 5343cba7647e..10503c399688 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/CreateVectorStoreFileBatchRequest.Serialization.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/CreateVectorStoreFileBatchRequest.Serialization.cs
@@ -11,7 +11,7 @@
using System.Text.Json;
using Azure.Core;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
internal partial class CreateVectorStoreFileBatchRequest : IUtf8JsonSerializable, IJsonModel
{
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CreateVectorStoreFileBatchRequest.cs b/sdk/ai/Azure.AI.Agents/src/Generated/CreateVectorStoreFileBatchRequest.cs
similarity index 99%
rename from sdk/ai/Azure.AI.Projects/src/Generated/CreateVectorStoreFileBatchRequest.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/CreateVectorStoreFileBatchRequest.cs
index a206331985f4..599c2edae75b 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/CreateVectorStoreFileBatchRequest.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/CreateVectorStoreFileBatchRequest.cs
@@ -8,7 +8,7 @@
using System;
using System.Collections.Generic;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
/// The CreateVectorStoreFileBatchRequest.
internal partial class CreateVectorStoreFileBatchRequest
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CreateVectorStoreFileRequest.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/CreateVectorStoreFileRequest.Serialization.cs
similarity index 99%
rename from sdk/ai/Azure.AI.Projects/src/Generated/CreateVectorStoreFileRequest.Serialization.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/CreateVectorStoreFileRequest.Serialization.cs
index e71ec7ac03ba..ac2d25c30eff 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/CreateVectorStoreFileRequest.Serialization.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/CreateVectorStoreFileRequest.Serialization.cs
@@ -11,7 +11,7 @@
using System.Text.Json;
using Azure.Core;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
internal partial class CreateVectorStoreFileRequest : IUtf8JsonSerializable, IJsonModel
{
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CreateVectorStoreFileRequest.cs b/sdk/ai/Azure.AI.Agents/src/Generated/CreateVectorStoreFileRequest.cs
similarity index 99%
rename from sdk/ai/Azure.AI.Projects/src/Generated/CreateVectorStoreFileRequest.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/CreateVectorStoreFileRequest.cs
index fba9287eb54a..810613bcb000 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/CreateVectorStoreFileRequest.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/CreateVectorStoreFileRequest.cs
@@ -8,7 +8,7 @@
using System;
using System.Collections.Generic;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
/// The CreateVectorStoreFileRequest.
internal partial class CreateVectorStoreFileRequest
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CreateVectorStoreRequest.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/CreateVectorStoreRequest.Serialization.cs
similarity index 99%
rename from sdk/ai/Azure.AI.Projects/src/Generated/CreateVectorStoreRequest.Serialization.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/CreateVectorStoreRequest.Serialization.cs
index ba3301bad406..af489fc1f4d3 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/CreateVectorStoreRequest.Serialization.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/CreateVectorStoreRequest.Serialization.cs
@@ -11,7 +11,7 @@
using System.Text.Json;
using Azure.Core;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
internal partial class CreateVectorStoreRequest : IUtf8JsonSerializable, IJsonModel
{
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CreateVectorStoreRequest.cs b/sdk/ai/Azure.AI.Agents/src/Generated/CreateVectorStoreRequest.cs
similarity index 99%
rename from sdk/ai/Azure.AI.Projects/src/Generated/CreateVectorStoreRequest.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/CreateVectorStoreRequest.cs
index fe9accc379e2..90d7177c5fb2 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/CreateVectorStoreRequest.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/CreateVectorStoreRequest.cs
@@ -8,7 +8,7 @@
using System;
using System.Collections.Generic;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
/// The CreateVectorStoreRequest.
internal partial class CreateVectorStoreRequest
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/DoneEvent.cs b/sdk/ai/Azure.AI.Agents/src/Generated/DoneEvent.cs
similarity index 98%
rename from sdk/ai/Azure.AI.Projects/src/Generated/DoneEvent.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/DoneEvent.cs
index 9f658de4258c..057a3fc1c8fe 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/DoneEvent.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/DoneEvent.cs
@@ -8,7 +8,7 @@
using System;
using System.ComponentModel;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
/// Terminal event indicating the successful end of a stream.
public readonly partial struct DoneEvent : IEquatable
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ErrorEvent.cs b/sdk/ai/Azure.AI.Agents/src/Generated/ErrorEvent.cs
similarity index 98%
rename from sdk/ai/Azure.AI.Projects/src/Generated/ErrorEvent.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/ErrorEvent.cs
index ea570033f684..af54857da432 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/ErrorEvent.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/ErrorEvent.cs
@@ -8,7 +8,7 @@
using System;
using System.ComponentModel;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
/// Terminal event indicating a server side error while streaming.
public readonly partial struct ErrorEvent : IEquatable
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchRankingOptions.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/FileSearchRankingOptions.Serialization.cs
similarity index 99%
rename from sdk/ai/Azure.AI.Projects/src/Generated/FileSearchRankingOptions.Serialization.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/FileSearchRankingOptions.Serialization.cs
index c9a3042bc5de..fe1a0cd8846b 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchRankingOptions.Serialization.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/FileSearchRankingOptions.Serialization.cs
@@ -11,7 +11,7 @@
using System.Text.Json;
using Azure.Core;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
public partial class FileSearchRankingOptions : IUtf8JsonSerializable, IJsonModel
{
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchRankingOptions.cs b/sdk/ai/Azure.AI.Agents/src/Generated/FileSearchRankingOptions.cs
similarity index 99%
rename from sdk/ai/Azure.AI.Projects/src/Generated/FileSearchRankingOptions.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/FileSearchRankingOptions.cs
index ca7922f55151..0bee9dc17e60 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchRankingOptions.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/FileSearchRankingOptions.cs
@@ -8,7 +8,7 @@
using System;
using System.Collections.Generic;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
/// Ranking options for file search.
public partial class FileSearchRankingOptions
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolCallContent.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/FileSearchToolCallContent.Serialization.cs
similarity index 99%
rename from sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolCallContent.Serialization.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/FileSearchToolCallContent.Serialization.cs
index d4dd84071ff9..c77fd26e405f 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolCallContent.Serialization.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/FileSearchToolCallContent.Serialization.cs
@@ -11,7 +11,7 @@
using System.Text.Json;
using Azure.Core;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
public partial class FileSearchToolCallContent : IUtf8JsonSerializable, IJsonModel
{
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolCallContent.cs b/sdk/ai/Azure.AI.Agents/src/Generated/FileSearchToolCallContent.cs
similarity index 99%
rename from sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolCallContent.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/FileSearchToolCallContent.cs
index 657101f969fe..9ca683fbc059 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolCallContent.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/FileSearchToolCallContent.cs
@@ -8,7 +8,7 @@
using System;
using System.Collections.Generic;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
/// The file search result content object.
public partial class FileSearchToolCallContent
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolCallContentType.cs b/sdk/ai/Azure.AI.Agents/src/Generated/FileSearchToolCallContentType.cs
similarity index 98%
rename from sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolCallContentType.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/FileSearchToolCallContentType.cs
index 177f40ed440f..54926671afb2 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolCallContentType.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/FileSearchToolCallContentType.cs
@@ -8,7 +8,7 @@
using System;
using System.ComponentModel;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
/// The FileSearchToolCallContent_type.
public readonly partial struct FileSearchToolCallContentType : IEquatable
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolDefinition.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/FileSearchToolDefinition.Serialization.cs
similarity index 99%
rename from sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolDefinition.Serialization.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/FileSearchToolDefinition.Serialization.cs
index 951e0992afeb..404c63227b0c 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolDefinition.Serialization.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/FileSearchToolDefinition.Serialization.cs
@@ -11,7 +11,7 @@
using System.Text.Json;
using Azure.Core;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
public partial class FileSearchToolDefinition : IUtf8JsonSerializable, IJsonModel
{
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolDefinition.cs b/sdk/ai/Azure.AI.Agents/src/Generated/FileSearchToolDefinition.cs
similarity index 97%
rename from sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolDefinition.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/FileSearchToolDefinition.cs
index 1a1015fb4e16..e0ae175a2f52 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolDefinition.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/FileSearchToolDefinition.cs
@@ -8,7 +8,7 @@
using System;
using System.Collections.Generic;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
/// The input definition information for a file search tool as used to configure an agent.
public partial class FileSearchToolDefinition : ToolDefinition
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolDefinitionDetails.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/FileSearchToolDefinitionDetails.Serialization.cs
similarity index 99%
rename from sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolDefinitionDetails.Serialization.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/FileSearchToolDefinitionDetails.Serialization.cs
index 7aa0164df147..04e156beb5b4 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolDefinitionDetails.Serialization.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/FileSearchToolDefinitionDetails.Serialization.cs
@@ -11,7 +11,7 @@
using System.Text.Json;
using Azure.Core;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
public partial class FileSearchToolDefinitionDetails : IUtf8JsonSerializable, IJsonModel
{
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolDefinitionDetails.cs b/sdk/ai/Azure.AI.Agents/src/Generated/FileSearchToolDefinitionDetails.cs
similarity index 99%
rename from sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolDefinitionDetails.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/FileSearchToolDefinitionDetails.cs
index a2445583f91c..014d47631c51 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolDefinitionDetails.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/FileSearchToolDefinitionDetails.cs
@@ -8,7 +8,7 @@
using System;
using System.Collections.Generic;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
/// Options overrides for the file search tool.
public partial class FileSearchToolDefinitionDetails
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolResource.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/FileSearchToolResource.Serialization.cs
similarity index 99%
rename from sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolResource.Serialization.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/FileSearchToolResource.Serialization.cs
index 1a7908314e1e..cd0b47b04555 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolResource.Serialization.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/FileSearchToolResource.Serialization.cs
@@ -11,7 +11,7 @@
using System.Text.Json;
using Azure.Core;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
public partial class FileSearchToolResource : IUtf8JsonSerializable, IJsonModel
{
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolResource.cs b/sdk/ai/Azure.AI.Agents/src/Generated/FileSearchToolResource.cs
similarity index 99%
rename from sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolResource.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/FileSearchToolResource.cs
index 9dc2301d67ea..d1b9d2aebfbf 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/FileSearchToolResource.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/FileSearchToolResource.cs
@@ -8,7 +8,7 @@
using System;
using System.Collections.Generic;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
/// A set of resources that are used by the `file_search` tool.
public partial class FileSearchToolResource
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/FileState.cs b/sdk/ai/Azure.AI.Agents/src/Generated/FileState.cs
similarity index 99%
rename from sdk/ai/Azure.AI.Projects/src/Generated/FileState.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/FileState.cs
index 7b3b0dcba332..647af60ef1cf 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/FileState.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/FileState.cs
@@ -8,7 +8,7 @@
using System;
using System.ComponentModel;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
/// The state of the file.
public readonly partial struct FileState : IEquatable
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/FunctionName.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/FunctionName.Serialization.cs
similarity index 99%
rename from sdk/ai/Azure.AI.Projects/src/Generated/FunctionName.Serialization.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/FunctionName.Serialization.cs
index e45e5a20a55b..bfa830bb8142 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/FunctionName.Serialization.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/FunctionName.Serialization.cs
@@ -11,7 +11,7 @@
using System.Text.Json;
using Azure.Core;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
public partial class FunctionName : IUtf8JsonSerializable, IJsonModel
{
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/FunctionName.cs b/sdk/ai/Azure.AI.Agents/src/Generated/FunctionName.cs
similarity index 99%
rename from sdk/ai/Azure.AI.Projects/src/Generated/FunctionName.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/FunctionName.cs
index f0388befdeda..28f2ad2bae7c 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/FunctionName.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/FunctionName.cs
@@ -8,7 +8,7 @@
using System;
using System.Collections.Generic;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
/// The function name that will be used, if using the `function` tool.
public partial class FunctionName
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/FunctionToolDefinition.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/FunctionToolDefinition.Serialization.cs
similarity index 98%
rename from sdk/ai/Azure.AI.Projects/src/Generated/FunctionToolDefinition.Serialization.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/FunctionToolDefinition.Serialization.cs
index 8a248fb0cc81..6a913574090c 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/FunctionToolDefinition.Serialization.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/FunctionToolDefinition.Serialization.cs
@@ -11,7 +11,7 @@
using System.Text.Json;
using Azure.Core;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
public partial class FunctionToolDefinition : IUtf8JsonSerializable, IJsonModel
{
@@ -36,7 +36,7 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri
base.JsonModelWriteCore(writer, options);
writer.WritePropertyName("function"u8);
- writer.WriteObjectValue(InternalFunction, options);
+ writer.WriteObjectValue(InternalFunction, options);
}
FunctionToolDefinition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options)
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/FunctionToolDefinition.cs b/sdk/ai/Azure.AI.Agents/src/Generated/FunctionToolDefinition.cs
similarity index 60%
rename from sdk/ai/Azure.AI.Projects/src/Generated/FunctionToolDefinition.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/FunctionToolDefinition.cs
index f87f3594f991..7af78d0d14f9 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/FunctionToolDefinition.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/FunctionToolDefinition.cs
@@ -8,11 +8,22 @@
using System;
using System.Collections.Generic;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
/// The input definition information for a function tool as used to configure an agent.
public partial class FunctionToolDefinition : ToolDefinition
{
+ /// Initializes a new instance of .
+ /// The definition of the concrete function that the function tool should call.
+ /// is null.
+ public FunctionToolDefinition(InternalFunctionDefinition internalFunction)
+ {
+ Argument.AssertNotNull(internalFunction, nameof(internalFunction));
+
+ Type = "function";
+ InternalFunction = internalFunction;
+ }
+
/// Initializes a new instance of .
/// The object type.
/// Keeps track of any properties unknown to the library.
@@ -26,5 +37,8 @@ internal FunctionToolDefinition(string type, IDictionary ser
internal FunctionToolDefinition()
{
}
+
+ /// The definition of the concrete function that the function tool should call.
+ public InternalFunctionDefinition InternalFunction { get; set; }
}
}
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/IncompleteDetailsReason.cs b/sdk/ai/Azure.AI.Agents/src/Generated/IncompleteDetailsReason.cs
similarity index 98%
rename from sdk/ai/Azure.AI.Projects/src/Generated/IncompleteDetailsReason.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/IncompleteDetailsReason.cs
index 517961f355be..e5f444eddb73 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/IncompleteDetailsReason.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/IncompleteDetailsReason.cs
@@ -8,7 +8,7 @@
using System;
using System.ComponentModel;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
/// The reason why the run is incomplete. This will point to which specific token limit was reached over the course of the run.
public readonly partial struct IncompleteDetailsReason : IEquatable
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/IncompleteRunDetails.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/IncompleteRunDetails.Serialization.cs
similarity index 99%
rename from sdk/ai/Azure.AI.Projects/src/Generated/IncompleteRunDetails.Serialization.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/IncompleteRunDetails.Serialization.cs
index 6264642302cb..5c1f2fcd4447 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/IncompleteRunDetails.Serialization.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/IncompleteRunDetails.Serialization.cs
@@ -11,7 +11,7 @@
using System.Text.Json;
using Azure.Core;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
public partial class IncompleteRunDetails : IUtf8JsonSerializable, IJsonModel
{
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/IncompleteRunDetails.cs b/sdk/ai/Azure.AI.Agents/src/Generated/IncompleteRunDetails.cs
similarity index 99%
rename from sdk/ai/Azure.AI.Projects/src/Generated/IncompleteRunDetails.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/IncompleteRunDetails.cs
index 786489fd3369..d5d82bbd4c61 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/IncompleteRunDetails.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/IncompleteRunDetails.cs
@@ -8,7 +8,7 @@
using System;
using System.Collections.Generic;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
/// Details on why the run is incomplete. Will be `null` if the run is not incomplete.
public partial class IncompleteRunDetails
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/IndexResource.Serialization.cs b/sdk/ai/Azure.AI.Agents/src/Generated/IndexResource.Serialization.cs
similarity index 99%
rename from sdk/ai/Azure.AI.Projects/src/Generated/IndexResource.Serialization.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/IndexResource.Serialization.cs
index d2c044c32c0a..e48c64f625de 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/IndexResource.Serialization.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/IndexResource.Serialization.cs
@@ -11,7 +11,7 @@
using System.Text.Json;
using Azure.Core;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
public partial class IndexResource : IUtf8JsonSerializable, IJsonModel
{
diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/IndexResource.cs b/sdk/ai/Azure.AI.Agents/src/Generated/IndexResource.cs
similarity index 99%
rename from sdk/ai/Azure.AI.Projects/src/Generated/IndexResource.cs
rename to sdk/ai/Azure.AI.Agents/src/Generated/IndexResource.cs
index 40abed475999..a7f4aff47db6 100644
--- a/sdk/ai/Azure.AI.Projects/src/Generated/IndexResource.cs
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/IndexResource.cs
@@ -8,7 +8,7 @@
using System;
using System.Collections.Generic;
-namespace Azure.AI.Projects
+namespace Azure.AI.Agents
{
/// A Index resource.
public partial class IndexResource
diff --git a/sdk/ai/Azure.AI.Agents/src/Generated/Internal/Argument.cs b/sdk/ai/Azure.AI.Agents/src/Generated/Internal/Argument.cs
new file mode 100644
index 000000000000..14f0d5e2e13b
--- /dev/null
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/Internal/Argument.cs
@@ -0,0 +1,129 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+namespace Azure.AI.Agents
+{
+ internal static class Argument
+ {
+ public static void AssertNotNull(T value, string name)
+ {
+ if (value is null)
+ {
+ throw new ArgumentNullException(name);
+ }
+ }
+
+ public static void AssertNotNull(T? value, string name)
+ where T : struct
+ {
+ if (!value.HasValue)
+ {
+ throw new ArgumentNullException(name);
+ }
+ }
+
+ public static void AssertNotNullOrEmpty(IEnumerable value, string name)
+ {
+ if (value is null)
+ {
+ throw new ArgumentNullException(name);
+ }
+ if (value is ICollection collectionOfT && collectionOfT.Count == 0)
+ {
+ throw new ArgumentException("Value cannot be an empty collection.", name);
+ }
+ if (value is ICollection collection && collection.Count == 0)
+ {
+ throw new ArgumentException("Value cannot be an empty collection.", name);
+ }
+ using IEnumerator e = value.GetEnumerator();
+ if (!e.MoveNext())
+ {
+ throw new ArgumentException("Value cannot be an empty collection.", name);
+ }
+ }
+
+ public static void AssertNotNullOrEmpty(string value, string name)
+ {
+ if (value is null)
+ {
+ throw new ArgumentNullException(name);
+ }
+ if (value.Length == 0)
+ {
+ throw new ArgumentException("Value cannot be an empty string.", name);
+ }
+ }
+
+ public static void AssertNotNullOrWhiteSpace(string value, string name)
+ {
+ if (value is null)
+ {
+ throw new ArgumentNullException(name);
+ }
+ if (string.IsNullOrWhiteSpace(value))
+ {
+ throw new ArgumentException("Value cannot be empty or contain only white-space characters.", name);
+ }
+ }
+
+ public static void AssertNotDefault(ref T value, string name)
+ where T : struct, IEquatable
+ {
+ if (value.Equals(default))
+ {
+ throw new ArgumentException("Value cannot be empty.", name);
+ }
+ }
+
+ public static void AssertInRange(T value, T minimum, T maximum, string name)
+ where T : notnull, IComparable
+ {
+ if (minimum.CompareTo(value) > 0)
+ {
+ throw new ArgumentOutOfRangeException(name, "Value is less than the minimum allowed.");
+ }
+ if (maximum.CompareTo(value) < 0)
+ {
+ throw new ArgumentOutOfRangeException(name, "Value is greater than the maximum allowed.");
+ }
+ }
+
+ public static void AssertEnumDefined(Type enumType, object value, string name)
+ {
+ if (!Enum.IsDefined(enumType, value))
+ {
+ throw new ArgumentException($"Value not defined for {enumType.FullName}.", name);
+ }
+ }
+
+ public static T CheckNotNull(T value, string name)
+ where T : class
+ {
+ AssertNotNull(value, name);
+ return value;
+ }
+
+ public static string CheckNotNullOrEmpty(string value, string name)
+ {
+ AssertNotNullOrEmpty(value, name);
+ return value;
+ }
+
+ public static void AssertNull(T value, string name, string message = null)
+ {
+ if (value != null)
+ {
+ throw new ArgumentException(message ?? "Value must be null.", name);
+ }
+ }
+ }
+}
diff --git a/sdk/ai/Azure.AI.Agents/src/Generated/Internal/ChangeTrackingDictionary.cs b/sdk/ai/Azure.AI.Agents/src/Generated/Internal/ChangeTrackingDictionary.cs
new file mode 100644
index 000000000000..a75d617f1dcf
--- /dev/null
+++ b/sdk/ai/Azure.AI.Agents/src/Generated/Internal/ChangeTrackingDictionary.cs
@@ -0,0 +1,167 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+
+namespace Azure.AI.Agents
+{
+ internal class ChangeTrackingDictionary : IDictionary, IReadOnlyDictionary where TKey : notnull
+ {
+ private IDictionary _innerDictionary;
+
+ public ChangeTrackingDictionary()
+ {
+ }
+
+ public ChangeTrackingDictionary(IDictionary dictionary)
+ {
+ if (dictionary == null)
+ {
+ return;
+ }
+ _innerDictionary = new Dictionary(dictionary);
+ }
+
+ public ChangeTrackingDictionary(IReadOnlyDictionary dictionary)
+ {
+ if (dictionary == null)
+ {
+ return;
+ }
+ _innerDictionary = new Dictionary();
+ foreach (var pair in dictionary)
+ {
+ _innerDictionary.Add(pair);
+ }
+ }
+
+ public bool IsUndefined => _innerDictionary == null;
+
+ public int Count => IsUndefined ? 0 : EnsureDictionary().Count;
+
+ public bool IsReadOnly => IsUndefined ? false : EnsureDictionary().IsReadOnly;
+
+ public ICollection Keys => IsUndefined ? Array.Empty() : EnsureDictionary().Keys;
+
+ public ICollection Values => IsUndefined ? Array.Empty() : EnsureDictionary().Values;
+
+ public TValue this[TKey key]
+ {
+ get
+ {
+ if (IsUndefined)
+ {
+ throw new KeyNotFoundException(nameof(key));
+ }
+ return EnsureDictionary()[key];
+ }
+ set
+ {
+ EnsureDictionary()[key] = value;
+ }
+ }
+
+ IEnumerable IReadOnlyDictionary