diff --git a/eng/apicompatbaselines/Azure.AI.Extensions.OpenAI.txt b/eng/apicompatbaselines/Azure.AI.Extensions.OpenAI.txt new file mode 100644 index 000000000000..6df86983506a --- /dev/null +++ b/eng/apicompatbaselines/Azure.AI.Extensions.OpenAI.txt @@ -0,0 +1,7 @@ +# Memory Stores is an experimental feature. +# The classes, related to Memory store were introduced 2.0.0 formally resulting in data contract error. +TypesMustExist : Type 'Azure.AI.Extensions.OpenAI.MemoryToolSearchItem' does not exist in the implementation but it does exist in the contract. +TypesMustExist : Type 'Azure.AI.Extensions.OpenAI.MemorySearchToolCallResponseItem' does not exist in the implementation but it does exist in the contract. +TypesMustExist : Type 'Azure.AI.Extensions.OpenAI.MemorySearchToolCallStatus' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'public Azure.AI.Extensions.OpenAI.MemoryToolSearchItem Azure.AI.Extensions.OpenAI.ExtensionsOpenAIModelFactory.MemoryToolSearchItem(Azure.AI.Extensions.OpenAI.MemoryOutputItem)' does not exist in the implementation but it does exist in the contract. +MembersMustExist : Member 'public Azure.AI.Extensions.OpenAI.MemorySearchToolCallResponseItem Azure.AI.Extensions.OpenAI.ExtensionsOpenAIModelFactory.MemorySearchToolCallResponseItem(System.String, Azure.AI.Extensions.OpenAI.AgentReference, System.String, Azure.AI.Extensions.OpenAI.MemorySearchToolCallStatus, System.Collections.Generic.IEnumerable)' does not exist in the implementation but it does exist in the contract. diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/CHANGELOG.md b/sdk/ai/Azure.AI.Extensions.OpenAI/CHANGELOG.md index 6a5dd2772597..1f4212b390eb 100644 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/CHANGELOG.md +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/CHANGELOG.md @@ -18,6 +18,8 @@ - Added new method `GetProjectResponsesClientForAgentEndpoint` on the `ProjectOpenAIClient`. ### Breaking Changes +- **Breaking changes since version 2.0.0** `MemorySearchToolCallResponseItem` was replaced by `MemorySearchToolCall`, `MemoryCommandToolCall` and `MemoryCommandToolCallOutput`. +- **Breaking changes since version 2.0.0** `MemoryToolSearchItem` was removed, because it is not used anymore. - `ComputerScreenshotImage` property `ImageUrl` was renamed to `ImageUri`. - `ResponsesAutoCodeInterpreterToolParam` property `Type` was renamed to `Kind`. - `ResponsesAzureAISearchTool` property `AzureAiSearch` was renamed to `AzureAISearch`. diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/api/Azure.AI.Extensions.OpenAI.net10.0.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/api/Azure.AI.Extensions.OpenAI.net10.0.cs index f42a429ab94d..bb29b9b23e9d 100644 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/api/Azure.AI.Extensions.OpenAI.net10.0.cs +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/api/Azure.AI.Extensions.OpenAI.net10.0.cs @@ -110,6 +110,8 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static Azure.AI.Extensions.OpenAI.AgentResponseItemKind McpApprovalResponse { get { throw null; } } public static Azure.AI.Extensions.OpenAI.AgentResponseItemKind McpCall { get { throw null; } } public static Azure.AI.Extensions.OpenAI.AgentResponseItemKind McpListTools { get { throw null; } } + public static Azure.AI.Extensions.OpenAI.AgentResponseItemKind MemoryCommandPreviewCall { get { throw null; } } + public static Azure.AI.Extensions.OpenAI.AgentResponseItemKind MemoryCommandPreviewCallOutput { get { throw null; } } public static Azure.AI.Extensions.OpenAI.AgentResponseItemKind MemorySearchCall { get { throw null; } } public static Azure.AI.Extensions.OpenAI.AgentResponseItemKind Message { get { throw null; } } public static Azure.AI.Extensions.OpenAI.AgentResponseItemKind OauthConsentRequest { get { throw null; } } @@ -495,9 +497,10 @@ public static partial class ExtensionsOpenAIModelFactory public static Azure.AI.Extensions.OpenAI.FabricDataAgentToolCall FabricDataAgentToolCall(string id = null, Azure.AI.Extensions.OpenAI.AgentReference agentReference = null, string responseId = null, string callId = null, string arguments = null, Azure.AI.Extensions.OpenAI.ToolCallStatus status = Azure.AI.Extensions.OpenAI.ToolCallStatus.InProgress) { throw null; } public static Azure.AI.Extensions.OpenAI.FabricDataAgentToolCallOutput FabricDataAgentToolCallOutput(string id = null, Azure.AI.Extensions.OpenAI.AgentReference agentReference = null, string responseId = null, string callId = null, System.BinaryData output = null, Azure.AI.Extensions.OpenAI.ToolCallStatus status = Azure.AI.Extensions.OpenAI.ToolCallStatus.InProgress) { throw null; } public static Azure.AI.Extensions.OpenAI.LocalSkillParam LocalSkillParam(string name = null, string description = null, string path = null) { throw null; } + public static Azure.AI.Extensions.OpenAI.MemoryCommandToolCall MemoryCommandToolCall(string id = null, Azure.AI.Extensions.OpenAI.AgentReference agentReference = null, string responseId = null, string callId = null, string arguments = null, Azure.AI.Extensions.OpenAI.ToolCallStatus status = Azure.AI.Extensions.OpenAI.ToolCallStatus.InProgress) { throw null; } + public static Azure.AI.Extensions.OpenAI.MemoryCommandToolCallOutput MemoryCommandToolCallOutput(string id = null, Azure.AI.Extensions.OpenAI.AgentReference agentReference = null, string responseId = null, string callId = null, Azure.AI.Extensions.OpenAI.ToolCallStatus status = Azure.AI.Extensions.OpenAI.ToolCallStatus.InProgress) { throw null; } public static Azure.AI.Extensions.OpenAI.MemoryOutputItem MemoryOutputItem(string memoryId = null, System.DateTimeOffset updatedAt = default(System.DateTimeOffset), string scope = null, string content = null, string kind = null) { throw null; } - public static Azure.AI.Extensions.OpenAI.MemorySearchToolCallResponseItem MemorySearchToolCallResponseItem(string id = null, Azure.AI.Extensions.OpenAI.AgentReference agentReference = null, string responseId = null, Azure.AI.Extensions.OpenAI.MemorySearchToolCallStatus status = default(Azure.AI.Extensions.OpenAI.MemorySearchToolCallStatus), System.Collections.Generic.IEnumerable results = null) { throw null; } - public static Azure.AI.Extensions.OpenAI.MemoryToolSearchItem MemoryToolSearchItem(Azure.AI.Extensions.OpenAI.MemoryOutputItem memoryItem = null) { throw null; } + public static Azure.AI.Extensions.OpenAI.MemorySearchToolCall MemorySearchToolCall(string id = null, Azure.AI.Extensions.OpenAI.AgentReference agentReference = null, string responseId = null, Azure.AI.Extensions.OpenAI.ToolCallStatus status = Azure.AI.Extensions.OpenAI.ToolCallStatus.InProgress, System.Collections.Generic.IEnumerable memories = null) { throw null; } public static Azure.AI.Extensions.OpenAI.OAuthConsentRequestResponseItem OAuthConsentRequestResponseItem(string id = null, Azure.AI.Extensions.OpenAI.AgentReference agentReference = null, string responseId = null, string internalConsentLink = null, string serverLabel = null) { throw null; } public static Azure.AI.Extensions.OpenAI.OpenApiToolCall OpenApiToolCall(string id = null, Azure.AI.Extensions.OpenAI.AgentReference agentReference = null, string responseId = null, string callId = null, string name = null, string arguments = null, Azure.AI.Extensions.OpenAI.ToolCallStatus status = Azure.AI.Extensions.OpenAI.ToolCallStatus.InProgress) { throw null; } public static Azure.AI.Extensions.OpenAI.OpenApiToolCallOutput OpenApiToolCallOutput(string id = null, Azure.AI.Extensions.OpenAI.AgentReference agentReference = null, string responseId = null, string callId = null, string name = null, System.BinaryData output = null, Azure.AI.Extensions.OpenAI.ToolCallStatus status = Azure.AI.Extensions.OpenAI.ToolCallStatus.InProgress) { throw null; } @@ -508,27 +511,28 @@ public static partial class ExtensionsOpenAIModelFactory public static Azure.AI.Extensions.OpenAI.OutputItemMcpApprovalResponseResource OutputItemMcpApprovalResponseResource(string id = null, Azure.AI.Extensions.OpenAI.AgentReference agentReference = null, string responseId = null, string approvalRequestId = null, bool approve = false, string reason = null) { throw null; } public static Azure.AI.Extensions.OpenAI.OutputItemToolSearchCall OutputItemToolSearchCall(string id = null, Azure.AI.Extensions.OpenAI.AgentReference agentReference = null, string responseId = null, string callId = null, Azure.AI.Extensions.OpenAI.ResponsesToolSearchExecutionType execution = Azure.AI.Extensions.OpenAI.ResponsesToolSearchExecutionType.Server, System.BinaryData arguments = null, Azure.AI.Extensions.OpenAI.ResponsesFunctionCallStatus status = Azure.AI.Extensions.OpenAI.ResponsesFunctionCallStatus.InProgress, string createdBy = null) { throw null; } public static Azure.AI.Extensions.OpenAI.OutputItemToolSearchOutput OutputItemToolSearchOutput(string id = null, Azure.AI.Extensions.OpenAI.AgentReference agentReference = null, string responseId = null, string callId = null, Azure.AI.Extensions.OpenAI.ResponsesToolSearchExecutionType execution = Azure.AI.Extensions.OpenAI.ResponsesToolSearchExecutionType.Server, System.Collections.Generic.IEnumerable tools = null, Azure.AI.Extensions.OpenAI.ResponsesFunctionCallOutputStatus status = Azure.AI.Extensions.OpenAI.ResponsesFunctionCallOutputStatus.InProgress, string createdBy = null) { throw null; } + public static Azure.AI.Extensions.OpenAI.ProceduralMemoryItem ProceduralMemoryItem(string memoryId = null, System.DateTimeOffset updatedAt = default(System.DateTimeOffset), string scope = null, string content = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ProjectConversation ProjectConversation(string id = null, System.Collections.Generic.IDictionary metadata = null, System.DateTimeOffset createdAt = default(System.DateTimeOffset)) { throw null; } - public static Azure.AI.Extensions.OpenAI.ResponsesA2APreviewTool ResponsesA2APreviewTool(string name = null, string description = null, System.Uri baseUrl = null, string agentCardPath = null, string projectConnectionId = null) { throw null; } + public static Azure.AI.Extensions.OpenAI.ResponsesA2APreviewTool ResponsesA2APreviewTool(string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null, System.Uri baseUrl = null, string agentCardPath = null, string projectConnectionId = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesAISearchIndexResource ResponsesAISearchIndexResource(string projectConnectionId = null, string indexName = null, Azure.AI.Extensions.OpenAI.ResponsesAzureAISearchQueryType? queryType = default(Azure.AI.Extensions.OpenAI.ResponsesAzureAISearchQueryType?), int? topK = default(int?), string filter = null, string indexAssetId = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesAutoCodeInterpreterToolParam ResponsesAutoCodeInterpreterToolParam(System.Collections.Generic.IEnumerable fileIds = null, Azure.AI.Extensions.OpenAI.ResponsesContainerMemoryLimit? memoryLimit = default(Azure.AI.Extensions.OpenAI.ResponsesContainerMemoryLimit?), Azure.AI.Extensions.OpenAI.ResponsesContainerNetworkPolicyParam networkPolicy = null) { throw null; } - public static Azure.AI.Extensions.OpenAI.ResponsesAzureAISearchTool ResponsesAzureAISearchTool(string name = null, string description = null, Azure.AI.Extensions.OpenAI.ResponsesAzureAISearchToolResource azureAISearch = null) { throw null; } + public static Azure.AI.Extensions.OpenAI.ResponsesAzureAISearchTool ResponsesAzureAISearchTool(string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null, Azure.AI.Extensions.OpenAI.ResponsesAzureAISearchToolResource azureAISearch = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesAzureAISearchToolResource ResponsesAzureAISearchToolResource(System.Collections.Generic.IEnumerable indexes = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesAzureFunctionBinding ResponsesAzureFunctionBinding(Azure.AI.Extensions.OpenAI.ResponsesAzureFunctionStorageQueue storageQueue = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesAzureFunctionDefinition ResponsesAzureFunctionDefinition(Azure.AI.Extensions.OpenAI.ResponsesAzureFunctionDefinitionFunction function = null, Azure.AI.Extensions.OpenAI.ResponsesAzureFunctionBinding inputBinding = null, Azure.AI.Extensions.OpenAI.ResponsesAzureFunctionBinding outputBinding = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesAzureFunctionDefinitionFunction ResponsesAzureFunctionDefinitionFunction(string name = null, string description = null, System.Collections.Generic.IDictionary parameters = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesAzureFunctionStorageQueue ResponsesAzureFunctionStorageQueue(string queueServiceEndpoint = null, string queueName = null) { throw null; } - public static Azure.AI.Extensions.OpenAI.ResponsesAzureFunctionTool ResponsesAzureFunctionTool(Azure.AI.Extensions.OpenAI.ResponsesAzureFunctionDefinition azureFunction = null) { throw null; } + public static Azure.AI.Extensions.OpenAI.ResponsesAzureFunctionTool ResponsesAzureFunctionTool(Azure.AI.Extensions.OpenAI.ResponsesAzureFunctionDefinition azureFunction = null, System.Collections.Generic.IDictionary toolConfigs = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesBingCustomSearchConfiguration ResponsesBingCustomSearchConfiguration(string projectConnectionId = null, string instanceName = null, string market = null, string setLang = null, long? count = default(long?), string freshness = null) { throw null; } - public static Azure.AI.Extensions.OpenAI.ResponsesBingCustomSearchPreviewTool ResponsesBingCustomSearchPreviewTool(string name = null, string description = null, Azure.AI.Extensions.OpenAI.ResponsesBingCustomSearchToolParameters bingCustomSearchPreview = null) { throw null; } + public static Azure.AI.Extensions.OpenAI.ResponsesBingCustomSearchPreviewTool ResponsesBingCustomSearchPreviewTool(string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null, Azure.AI.Extensions.OpenAI.ResponsesBingCustomSearchToolParameters bingCustomSearchPreview = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesBingCustomSearchToolParameters ResponsesBingCustomSearchToolParameters(System.Collections.Generic.IEnumerable searchConfigurations = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesBingGroundingSearchConfiguration ResponsesBingGroundingSearchConfiguration(string projectConnectionId = null, string market = null, string language = null, long? count = default(long?), string freshness = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesBingGroundingSearchToolParameters ResponsesBingGroundingSearchToolParameters(System.Collections.Generic.IEnumerable searchConfigurations = null) { throw null; } - public static Azure.AI.Extensions.OpenAI.ResponsesBingGroundingTool ResponsesBingGroundingTool(string name = null, string description = null, Azure.AI.Extensions.OpenAI.ResponsesBingGroundingSearchToolParameters bingGrounding = null) { throw null; } - public static Azure.AI.Extensions.OpenAI.ResponsesBrowserAutomationPreviewTool ResponsesBrowserAutomationPreviewTool(string name = null, string description = null, Azure.AI.Extensions.OpenAI.ResponsesBrowserAutomationToolParameters browserAutomationPreview = null) { throw null; } + public static Azure.AI.Extensions.OpenAI.ResponsesBingGroundingTool ResponsesBingGroundingTool(string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null, Azure.AI.Extensions.OpenAI.ResponsesBingGroundingSearchToolParameters bingGrounding = null) { throw null; } + public static Azure.AI.Extensions.OpenAI.ResponsesBrowserAutomationPreviewTool ResponsesBrowserAutomationPreviewTool(string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null, Azure.AI.Extensions.OpenAI.ResponsesBrowserAutomationToolParameters browserAutomationPreview = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesBrowserAutomationToolConnectionParameters ResponsesBrowserAutomationToolConnectionParameters(string projectConnectionId = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesBrowserAutomationToolParameters ResponsesBrowserAutomationToolParameters(Azure.AI.Extensions.OpenAI.ResponsesBrowserAutomationToolConnectionParameters connection = null) { throw null; } - public static Azure.AI.Extensions.OpenAI.ResponsesCaptureStructuredOutputsTool ResponsesCaptureStructuredOutputsTool(string name = null, string description = null, Azure.AI.Extensions.OpenAI.ResponsesStructuredOutputDefinition outputs = null) { throw null; } + public static Azure.AI.Extensions.OpenAI.ResponsesCaptureStructuredOutputsTool ResponsesCaptureStructuredOutputsTool(string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null, Azure.AI.Extensions.OpenAI.ResponsesStructuredOutputDefinition outputs = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesComputerTool ResponsesComputerTool() { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesContainerAutoParam ResponsesContainerAutoParam(System.Collections.Generic.IEnumerable fileIds = null, Azure.AI.Extensions.OpenAI.ResponsesContainerMemoryLimit? memoryLimit = default(Azure.AI.Extensions.OpenAI.ResponsesContainerMemoryLimit?), System.Collections.Generic.IEnumerable skills = null, Azure.AI.Extensions.OpenAI.ResponsesContainerNetworkPolicyParam networkPolicy = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesContainerNetworkPolicyAllowlistParam ResponsesContainerNetworkPolicyAllowlistParam(System.Collections.Generic.IEnumerable allowedDomains = null, System.Collections.Generic.IEnumerable domainSecrets = null) { throw null; } @@ -540,20 +544,20 @@ public static partial class ExtensionsOpenAIModelFactory public static Azure.AI.Extensions.OpenAI.ResponsesCustomToolParamFormat ResponsesCustomToolParamFormat(string type = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesEmptyModelParam ResponsesEmptyModelParam() { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesFabricDataAgentToolOptions ResponsesFabricDataAgentToolOptions(System.Collections.Generic.IEnumerable projectConnections = null) { throw null; } - public static Azure.AI.Extensions.OpenAI.ResponsesFabricIQPreviewTool ResponsesFabricIQPreviewTool(string projectConnectionId = null, string serverLabel = null, System.Uri serverUrl = null, System.BinaryData requireApproval = null, string name = null, string description = null) { throw null; } - public static Azure.AI.Extensions.OpenAI.ResponsesFunctionShellToolParam ResponsesFunctionShellToolParam(Azure.AI.Extensions.OpenAI.ResponsesFunctionShellToolParamEnvironment environment = null, string name = null, string description = null) { throw null; } + public static Azure.AI.Extensions.OpenAI.ResponsesFabricIQPreviewTool ResponsesFabricIQPreviewTool(string projectConnectionId = null, string serverLabel = null, System.Uri serverUrl = null, System.BinaryData requireApproval = null, string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null) { throw null; } + public static Azure.AI.Extensions.OpenAI.ResponsesFunctionShellToolParam ResponsesFunctionShellToolParam(Azure.AI.Extensions.OpenAI.ResponsesFunctionShellToolParamEnvironment environment = null, string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesFunctionShellToolParamEnvironment ResponsesFunctionShellToolParamEnvironment(string type = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesFunctionShellToolParamEnvironmentContainerReferenceParam ResponsesFunctionShellToolParamEnvironmentContainerReferenceParam(string containerId = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesFunctionShellToolParamEnvironmentLocalEnvironmentParam ResponsesFunctionShellToolParamEnvironmentLocalEnvironmentParam(System.Collections.Generic.IEnumerable skills = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesFunctionToolParam ResponsesFunctionToolParam(string name = null, string description = null, Azure.AI.Extensions.OpenAI.ResponsesEmptyModelParam parameters = null, bool? isStrict = default(bool?), bool? shouldDeferLoading = default(bool?)) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesInlineSkillParam ResponsesInlineSkillParam(string name = null, string description = null, Azure.AI.Extensions.OpenAI.ResponsesInlineSkillSourceParam source = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesInlineSkillSourceParam ResponsesInlineSkillSourceParam(string data = null) { throw null; } - public static Azure.AI.Extensions.OpenAI.ResponsesLocalShellToolParam ResponsesLocalShellToolParam(string name = null, string description = null) { throw null; } + public static Azure.AI.Extensions.OpenAI.ResponsesLocalShellToolParam ResponsesLocalShellToolParam(string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesMCPToolFilter ResponsesMCPToolFilter(System.Collections.Generic.IEnumerable toolNames = null, bool? isReadOnly = default(bool?)) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesMCPToolRequireApproval ResponsesMCPToolRequireApproval(Azure.AI.Extensions.OpenAI.ResponsesMCPToolFilter always = null, Azure.AI.Extensions.OpenAI.ResponsesMCPToolFilter never = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesMemorySearchOptions ResponsesMemorySearchOptions(int? maxMemories = default(int?)) { throw null; } - public static Azure.AI.Extensions.OpenAI.ResponsesMemorySearchPreviewTool ResponsesMemorySearchPreviewTool(string name = null, string description = null, string memoryStoreName = null, string scope = null, Azure.AI.Extensions.OpenAI.ResponsesMemorySearchOptions searchOptions = null, int? updateDelayInSeconds = default(int?)) { throw null; } - public static Azure.AI.Extensions.OpenAI.ResponsesMicrosoftFabricPreviewTool ResponsesMicrosoftFabricPreviewTool(string name = null, string description = null, Azure.AI.Extensions.OpenAI.ResponsesFabricDataAgentToolOptions fabricDataagentPreview = null) { throw null; } + public static Azure.AI.Extensions.OpenAI.ResponsesMemorySearchPreviewTool ResponsesMemorySearchPreviewTool(string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null, string memoryStoreName = null, string scope = null, Azure.AI.Extensions.OpenAI.ResponsesMemorySearchOptions searchOptions = null, int? updateDelayInSeconds = default(int?)) { throw null; } + public static Azure.AI.Extensions.OpenAI.ResponsesMicrosoftFabricPreviewTool ResponsesMicrosoftFabricPreviewTool(string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null, Azure.AI.Extensions.OpenAI.ResponsesFabricDataAgentToolOptions fabricDataagentPreview = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesNamespaceToolParam ResponsesNamespaceToolParam(string name = null, string description = null, System.Collections.Generic.IEnumerable tools = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesOpenApiAnonymousAuthDetails ResponsesOpenApiAnonymousAuthDetails() { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesOpenApiAuthDetails ResponsesOpenApiAuthDetails(string type = null) { throw null; } @@ -563,21 +567,22 @@ public static partial class ExtensionsOpenAIModelFactory public static Azure.AI.Extensions.OpenAI.ResponsesOpenApiManagedSecurityScheme ResponsesOpenApiManagedSecurityScheme(string audience = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesOpenApiProjectConnectionAuthDetails ResponsesOpenApiProjectConnectionAuthDetails(Azure.AI.Extensions.OpenAI.ResponsesOpenApiProjectConnectionSecurityScheme securityScheme = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesOpenApiProjectConnectionSecurityScheme ResponsesOpenApiProjectConnectionSecurityScheme(string projectConnectionId = null) { throw null; } - public static Azure.AI.Extensions.OpenAI.ResponsesOpenApiTool ResponsesOpenApiTool(Azure.AI.Extensions.OpenAI.ResponsesOpenApiFunctionDefinition openApi = null) { throw null; } + public static Azure.AI.Extensions.OpenAI.ResponsesOpenApiTool ResponsesOpenApiTool(Azure.AI.Extensions.OpenAI.ResponsesOpenApiFunctionDefinition openApi = null, System.Collections.Generic.IDictionary toolConfigs = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesSharepointGroundingToolParameters ResponsesSharepointGroundingToolParameters(System.Collections.Generic.IEnumerable projectConnections = null) { throw null; } - public static Azure.AI.Extensions.OpenAI.ResponsesSharepointPreviewTool ResponsesSharepointPreviewTool(string name = null, string description = null, Azure.AI.Extensions.OpenAI.ResponsesSharepointGroundingToolParameters sharepointGroundingPreview = null) { throw null; } + public static Azure.AI.Extensions.OpenAI.ResponsesSharepointPreviewTool ResponsesSharepointPreviewTool(string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null, Azure.AI.Extensions.OpenAI.ResponsesSharepointGroundingToolParameters sharepointGroundingPreview = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesSkillReferenceParam ResponsesSkillReferenceParam(string skillId = null, string version = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesStructuredOutputDefinition ResponsesStructuredOutputDefinition(string name = null, string description = null, System.Collections.Generic.IDictionary schema = null, bool? isStrict = default(bool?)) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesTool ResponsesTool(string type = null) { throw null; } - public static Azure.AI.Extensions.OpenAI.ResponsesToolboxSearchPreviewTool ResponsesToolboxSearchPreviewTool(string name = null, string description = null) { throw null; } + public static Azure.AI.Extensions.OpenAI.ResponsesToolboxSearchPreviewTool ResponsesToolboxSearchPreviewTool(string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesToolProjectConnection ResponsesToolProjectConnection(string projectConnectionId = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesToolSearchToolParam ResponsesToolSearchToolParam(Azure.AI.Extensions.OpenAI.ResponsesToolSearchExecutionType? execution = default(Azure.AI.Extensions.OpenAI.ResponsesToolSearchExecutionType?), string description = null, Azure.AI.Extensions.OpenAI.ResponsesEmptyModelParam parameters = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesWebSearchApproximateLocation ResponsesWebSearchApproximateLocation(string country = null, string region = null, string city = null, string timezone = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesWebSearchConfiguration ResponsesWebSearchConfiguration(string projectConnectionId = null, string instanceName = null) { throw null; } - public static Azure.AI.Extensions.OpenAI.ResponsesWebSearchTool ResponsesWebSearchTool(Azure.AI.Extensions.OpenAI.WebSearchToolFilters filters = null, Azure.AI.Extensions.OpenAI.ResponsesWebSearchApproximateLocation userLocation = null, Azure.AI.Extensions.OpenAI.ResponsesWebSearchToolSearchContextSize? searchContextSize = default(Azure.AI.Extensions.OpenAI.ResponsesWebSearchToolSearchContextSize?), string name = null, string description = null, Azure.AI.Extensions.OpenAI.ResponsesWebSearchConfiguration customSearchConfiguration = null) { throw null; } - public static Azure.AI.Extensions.OpenAI.ResponsesWorkIQPreviewTool ResponsesWorkIQPreviewTool(string projectConnectionId = null, string name = null, string description = null) { throw null; } + public static Azure.AI.Extensions.OpenAI.ResponsesWebSearchTool ResponsesWebSearchTool(Azure.AI.Extensions.OpenAI.WebSearchToolFilters filters = null, Azure.AI.Extensions.OpenAI.ResponsesWebSearchApproximateLocation userLocation = null, Azure.AI.Extensions.OpenAI.ResponsesWebSearchToolSearchContextSize? searchContextSize = default(Azure.AI.Extensions.OpenAI.ResponsesWebSearchToolSearchContextSize?), string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null, Azure.AI.Extensions.OpenAI.ResponsesWebSearchConfiguration customSearchConfiguration = null) { throw null; } + public static Azure.AI.Extensions.OpenAI.ResponsesWorkIQPreviewTool ResponsesWorkIQPreviewTool(string projectConnectionId = null, string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null) { throw null; } public static Azure.AI.Extensions.OpenAI.SharepointGroundingToolCall SharepointGroundingToolCall(string id = null, Azure.AI.Extensions.OpenAI.AgentReference agentReference = null, string responseId = null, string callId = null, string arguments = null, Azure.AI.Extensions.OpenAI.ToolCallStatus status = Azure.AI.Extensions.OpenAI.ToolCallStatus.InProgress) { throw null; } public static Azure.AI.Extensions.OpenAI.SharepointGroundingToolCallOutput SharepointGroundingToolCallOutput(string id = null, Azure.AI.Extensions.OpenAI.AgentReference agentReference = null, string responseId = null, string callId = null, System.BinaryData output = null, Azure.AI.Extensions.OpenAI.ToolCallStatus status = Azure.AI.Extensions.OpenAI.ToolCallStatus.InProgress) { throw null; } + public static Azure.AI.Extensions.OpenAI.ToolConfig ToolConfig(bool? pin = default(bool?), string additionalSearchText = null) { throw null; } public static Azure.AI.Extensions.OpenAI.UserProfileMemoryItem UserProfileMemoryItem(string memoryId = null, System.DateTimeOffset updatedAt = default(System.DateTimeOffset), string scope = null, string content = null) { throw null; } public static Azure.AI.Extensions.OpenAI.WebSearchToolFilters WebSearchToolFilters(System.Collections.Generic.IEnumerable allowedDomains = null) { throw null; } } @@ -647,6 +652,37 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class MemoryCommandToolCall : Azure.AI.Extensions.OpenAI.AgentResponseItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public MemoryCommandToolCall(string callId, string arguments, Azure.AI.Extensions.OpenAI.ToolCallStatus status) { } + public string Arguments { get { throw null; } set { } } + public string CallId { get { throw null; } set { } } + public Azure.AI.Extensions.OpenAI.ToolCallStatus Status { get { throw null; } set { } } + protected override Azure.AI.Extensions.OpenAI.AgentResponseItem JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Extensions.OpenAI.AgentResponseItem PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Extensions.OpenAI.MemoryCommandToolCall System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Extensions.OpenAI.MemoryCommandToolCall System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class MemoryCommandToolCallOutput : Azure.AI.Extensions.OpenAI.AgentResponseItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public MemoryCommandToolCallOutput(string callId, Azure.AI.Extensions.OpenAI.ToolCallStatus status) { } + public string CallId { get { throw null; } set { } } + public Azure.AI.Extensions.OpenAI.ToolCallStatus Status { get { throw null; } set { } } + protected override Azure.AI.Extensions.OpenAI.AgentResponseItem JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Extensions.OpenAI.AgentResponseItem PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Extensions.OpenAI.MemoryCommandToolCallOutput System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Extensions.OpenAI.MemoryCommandToolCallOutput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public abstract partial class MemoryOutputItem : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal MemoryOutputItem() { } @@ -664,54 +700,20 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class MemorySearchToolCallResponseItem : Azure.AI.Extensions.OpenAI.AgentResponseItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class MemorySearchToolCall : Azure.AI.Extensions.OpenAI.AgentResponseItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public MemorySearchToolCallResponseItem(Azure.AI.Extensions.OpenAI.MemorySearchToolCallStatus status) { } - public System.Collections.Generic.IList Results { get { throw null; } set { } } - public Azure.AI.Extensions.OpenAI.MemorySearchToolCallStatus Status { get { throw null; } set { } } + public MemorySearchToolCall(Azure.AI.Extensions.OpenAI.ToolCallStatus status) { } + public System.Collections.Generic.IList Memories { get { throw null; } set { } } + public Azure.AI.Extensions.OpenAI.ToolCallStatus Status { get { throw null; } set { } } protected override Azure.AI.Extensions.OpenAI.AgentResponseItem JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Extensions.OpenAI.AgentResponseItem PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - Azure.AI.Extensions.OpenAI.MemorySearchToolCallResponseItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Extensions.OpenAI.MemorySearchToolCallResponseItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct MemorySearchToolCallStatus : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public MemorySearchToolCallStatus(string value) { throw null; } - public static Azure.AI.Extensions.OpenAI.MemorySearchToolCallStatus Completed { get { throw null; } } - public static Azure.AI.Extensions.OpenAI.MemorySearchToolCallStatus Failed { get { throw null; } } - public static Azure.AI.Extensions.OpenAI.MemorySearchToolCallStatus Incomplete { get { throw null; } } - public static Azure.AI.Extensions.OpenAI.MemorySearchToolCallStatus InProgress { get { throw null; } } - public static Azure.AI.Extensions.OpenAI.MemorySearchToolCallStatus Searching { get { throw null; } } - public bool Equals(Azure.AI.Extensions.OpenAI.MemorySearchToolCallStatus other) { throw null; } - public override bool Equals(object obj) { throw null; } - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.AI.Extensions.OpenAI.MemorySearchToolCallStatus left, Azure.AI.Extensions.OpenAI.MemorySearchToolCallStatus right) { throw null; } - public static implicit operator Azure.AI.Extensions.OpenAI.MemorySearchToolCallStatus (string value) { throw null; } - public static implicit operator Azure.AI.Extensions.OpenAI.MemorySearchToolCallStatus? (string value) { throw null; } - public static bool operator !=(Azure.AI.Extensions.OpenAI.MemorySearchToolCallStatus left, Azure.AI.Extensions.OpenAI.MemorySearchToolCallStatus right) { throw null; } - public override string ToString() { throw null; } - } - public partial class MemoryToolSearchItem : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public MemoryToolSearchItem(Azure.AI.Extensions.OpenAI.MemoryOutputItem memoryItem) { } - public Azure.AI.Extensions.OpenAI.MemoryOutputItem MemoryItem { get { throw null; } set { } } - protected virtual Azure.AI.Extensions.OpenAI.MemoryToolSearchItem JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - protected virtual Azure.AI.Extensions.OpenAI.MemoryToolSearchItem PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - Azure.AI.Extensions.OpenAI.MemoryToolSearchItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Extensions.OpenAI.MemoryToolSearchItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Extensions.OpenAI.MemorySearchToolCall System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Extensions.OpenAI.MemorySearchToolCall System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } public partial class OAuthConsentRequestResponseItem : Azure.AI.Extensions.OpenAI.AgentResponseItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { @@ -880,6 +882,19 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class ProceduralMemoryItem : Azure.AI.Extensions.OpenAI.MemoryOutputItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ProceduralMemoryItem(string memoryId, System.DateTimeOffset updatedAt, string scope, string content) { } + protected override Azure.AI.Extensions.OpenAI.MemoryOutputItem JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Extensions.OpenAI.MemoryOutputItem PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Extensions.OpenAI.ProceduralMemoryItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Extensions.OpenAI.ProceduralMemoryItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ProjectConversation : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ProjectConversation() { } @@ -1030,6 +1045,7 @@ public ResponsesA2APreviewTool() { } public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } public string ProjectConnectionId { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Extensions.OpenAI.ResponsesTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Extensions.OpenAI.ResponsesTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1102,6 +1118,7 @@ public ResponsesAzureAISearchTool(Azure.AI.Extensions.OpenAI.ResponsesAzureAISea public Azure.AI.Extensions.OpenAI.ResponsesAzureAISearchToolResource AzureAISearch { get { throw null; } set { } } public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Extensions.OpenAI.ResponsesTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Extensions.OpenAI.ResponsesTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1196,6 +1213,7 @@ public partial class ResponsesAzureFunctionTool : Azure.AI.Extensions.OpenAI.Res { public ResponsesAzureFunctionTool(Azure.AI.Extensions.OpenAI.ResponsesAzureFunctionDefinition azureFunction) { } public Azure.AI.Extensions.OpenAI.ResponsesAzureFunctionDefinition AzureFunction { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Extensions.OpenAI.ResponsesTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Extensions.OpenAI.ResponsesTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1231,6 +1249,7 @@ public ResponsesBingCustomSearchPreviewTool(Azure.AI.Extensions.OpenAI.Responses public Azure.AI.Extensions.OpenAI.ResponsesBingCustomSearchToolParameters BingCustomSearchPreview { get { throw null; } set { } } public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Extensions.OpenAI.ResponsesTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Extensions.OpenAI.ResponsesTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1293,6 +1312,7 @@ public ResponsesBingGroundingTool(Azure.AI.Extensions.OpenAI.ResponsesBingGround public Azure.AI.Extensions.OpenAI.ResponsesBingGroundingSearchToolParameters BingGrounding { get { throw null; } set { } } public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Extensions.OpenAI.ResponsesTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Extensions.OpenAI.ResponsesTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1309,6 +1329,7 @@ public ResponsesBrowserAutomationPreviewTool(Azure.AI.Extensions.OpenAI.Response public Azure.AI.Extensions.OpenAI.ResponsesBrowserAutomationToolParameters BrowserAutomationPreview { get { throw null; } set { } } public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Extensions.OpenAI.ResponsesTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Extensions.OpenAI.ResponsesTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1353,6 +1374,7 @@ public ResponsesCaptureStructuredOutputsTool(Azure.AI.Extensions.OpenAI.Response public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } public Azure.AI.Extensions.OpenAI.ResponsesStructuredOutputDefinition Outputs { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Extensions.OpenAI.ResponsesTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Extensions.OpenAI.ResponsesTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1536,6 +1558,7 @@ public ResponsesFabricIQPreviewTool(string projectConnectionId) { } public System.BinaryData RequireApproval { get { throw null; } set { } } public string ServerLabel { get { throw null; } set { } } public System.Uri ServerUrl { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Extensions.OpenAI.ResponsesTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Extensions.OpenAI.ResponsesTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1564,6 +1587,7 @@ public ResponsesFunctionShellToolParam() { } public string Description { get { throw null; } set { } } public Azure.AI.Extensions.OpenAI.ResponsesFunctionShellToolParamEnvironment Environment { get { throw null; } set { } } public string Name { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Extensions.OpenAI.ResponsesTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Extensions.OpenAI.ResponsesTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1676,6 +1700,7 @@ public partial class ResponsesLocalShellToolParam : Azure.AI.Extensions.OpenAI.R public ResponsesLocalShellToolParam() { } public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Extensions.OpenAI.ResponsesTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Extensions.OpenAI.ResponsesTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1738,6 +1763,7 @@ public ResponsesMemorySearchPreviewTool(string memoryStoreName, string scope) { public string Name { get { throw null; } set { } } public string Scope { get { throw null; } set { } } public Azure.AI.Extensions.OpenAI.ResponsesMemorySearchOptions SearchOptions { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } public int? UpdateDelayInSeconds { get { throw null; } set { } } protected override Azure.AI.Extensions.OpenAI.ResponsesTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1755,6 +1781,7 @@ public ResponsesMicrosoftFabricPreviewTool(Azure.AI.Extensions.OpenAI.ResponsesF public string Description { get { throw null; } set { } } public Azure.AI.Extensions.OpenAI.ResponsesFabricDataAgentToolOptions FabricDataagentPreview { get { throw null; } set { } } public string Name { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Extensions.OpenAI.ResponsesTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Extensions.OpenAI.ResponsesTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1902,6 +1929,7 @@ public partial class ResponsesOpenApiTool : Azure.AI.Extensions.OpenAI.Responses { public ResponsesOpenApiTool(Azure.AI.Extensions.OpenAI.ResponsesOpenApiFunctionDefinition openApi) { } public Azure.AI.Extensions.OpenAI.ResponsesOpenApiFunctionDefinition OpenApi { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Extensions.OpenAI.ResponsesTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Extensions.OpenAI.ResponsesTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1932,6 +1960,7 @@ public ResponsesSharepointPreviewTool(Azure.AI.Extensions.OpenAI.ResponsesSharep public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } public Azure.AI.Extensions.OpenAI.ResponsesSharepointGroundingToolParameters SharepointGroundingPreview { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Extensions.OpenAI.ResponsesTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Extensions.OpenAI.ResponsesTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1992,6 +2021,7 @@ public partial class ResponsesToolboxSearchPreviewTool : Azure.AI.Extensions.Ope public ResponsesToolboxSearchPreviewTool() { } public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Extensions.OpenAI.ResponsesTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Extensions.OpenAI.ResponsesTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2078,6 +2108,7 @@ public ResponsesWebSearchTool() { } public Azure.AI.Extensions.OpenAI.WebSearchToolFilters Filters { get { throw null; } set { } } public string Name { get { throw null; } set { } } public Azure.AI.Extensions.OpenAI.ResponsesWebSearchToolSearchContextSize? SearchContextSize { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } public Azure.AI.Extensions.OpenAI.ResponsesWebSearchApproximateLocation UserLocation { get { throw null; } set { } } protected override Azure.AI.Extensions.OpenAI.ResponsesTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -2101,6 +2132,7 @@ public ResponsesWorkIQPreviewTool(string projectConnectionId) { } public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } public string ProjectConnectionId { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Extensions.OpenAI.ResponsesTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Extensions.OpenAI.ResponsesTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2150,6 +2182,21 @@ public enum ToolCallStatus Incomplete = 2, Failed = 3, } + public partial class ToolConfig : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ToolConfig() { } + public string AdditionalSearchText { get { throw null; } set { } } + public bool? Pin { get { throw null; } set { } } + protected virtual Azure.AI.Extensions.OpenAI.ToolConfig JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Extensions.OpenAI.ToolConfig PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Extensions.OpenAI.ToolConfig System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Extensions.OpenAI.ToolConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class UserProfileMemoryItem : Azure.AI.Extensions.OpenAI.MemoryOutputItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public UserProfileMemoryItem(string memoryId, System.DateTimeOffset updatedAt, string scope, string content) { } diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/api/Azure.AI.Extensions.OpenAI.net8.0.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/api/Azure.AI.Extensions.OpenAI.net8.0.cs index 3eed162cecaf..4db4434ba1c3 100644 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/api/Azure.AI.Extensions.OpenAI.net8.0.cs +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/api/Azure.AI.Extensions.OpenAI.net8.0.cs @@ -110,6 +110,8 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static Azure.AI.Extensions.OpenAI.AgentResponseItemKind McpApprovalResponse { get { throw null; } } public static Azure.AI.Extensions.OpenAI.AgentResponseItemKind McpCall { get { throw null; } } public static Azure.AI.Extensions.OpenAI.AgentResponseItemKind McpListTools { get { throw null; } } + public static Azure.AI.Extensions.OpenAI.AgentResponseItemKind MemoryCommandPreviewCall { get { throw null; } } + public static Azure.AI.Extensions.OpenAI.AgentResponseItemKind MemoryCommandPreviewCallOutput { get { throw null; } } public static Azure.AI.Extensions.OpenAI.AgentResponseItemKind MemorySearchCall { get { throw null; } } public static Azure.AI.Extensions.OpenAI.AgentResponseItemKind Message { get { throw null; } } public static Azure.AI.Extensions.OpenAI.AgentResponseItemKind OauthConsentRequest { get { throw null; } } @@ -491,9 +493,10 @@ public static partial class ExtensionsOpenAIModelFactory public static Azure.AI.Extensions.OpenAI.FabricDataAgentToolCall FabricDataAgentToolCall(string id = null, Azure.AI.Extensions.OpenAI.AgentReference agentReference = null, string responseId = null, string callId = null, string arguments = null, Azure.AI.Extensions.OpenAI.ToolCallStatus status = Azure.AI.Extensions.OpenAI.ToolCallStatus.InProgress) { throw null; } public static Azure.AI.Extensions.OpenAI.FabricDataAgentToolCallOutput FabricDataAgentToolCallOutput(string id = null, Azure.AI.Extensions.OpenAI.AgentReference agentReference = null, string responseId = null, string callId = null, System.BinaryData output = null, Azure.AI.Extensions.OpenAI.ToolCallStatus status = Azure.AI.Extensions.OpenAI.ToolCallStatus.InProgress) { throw null; } public static Azure.AI.Extensions.OpenAI.LocalSkillParam LocalSkillParam(string name = null, string description = null, string path = null) { throw null; } + public static Azure.AI.Extensions.OpenAI.MemoryCommandToolCall MemoryCommandToolCall(string id = null, Azure.AI.Extensions.OpenAI.AgentReference agentReference = null, string responseId = null, string callId = null, string arguments = null, Azure.AI.Extensions.OpenAI.ToolCallStatus status = Azure.AI.Extensions.OpenAI.ToolCallStatus.InProgress) { throw null; } + public static Azure.AI.Extensions.OpenAI.MemoryCommandToolCallOutput MemoryCommandToolCallOutput(string id = null, Azure.AI.Extensions.OpenAI.AgentReference agentReference = null, string responseId = null, string callId = null, Azure.AI.Extensions.OpenAI.ToolCallStatus status = Azure.AI.Extensions.OpenAI.ToolCallStatus.InProgress) { throw null; } public static Azure.AI.Extensions.OpenAI.MemoryOutputItem MemoryOutputItem(string memoryId = null, System.DateTimeOffset updatedAt = default(System.DateTimeOffset), string scope = null, string content = null, string kind = null) { throw null; } - public static Azure.AI.Extensions.OpenAI.MemorySearchToolCallResponseItem MemorySearchToolCallResponseItem(string id = null, Azure.AI.Extensions.OpenAI.AgentReference agentReference = null, string responseId = null, Azure.AI.Extensions.OpenAI.MemorySearchToolCallStatus status = default(Azure.AI.Extensions.OpenAI.MemorySearchToolCallStatus), System.Collections.Generic.IEnumerable results = null) { throw null; } - public static Azure.AI.Extensions.OpenAI.MemoryToolSearchItem MemoryToolSearchItem(Azure.AI.Extensions.OpenAI.MemoryOutputItem memoryItem = null) { throw null; } + public static Azure.AI.Extensions.OpenAI.MemorySearchToolCall MemorySearchToolCall(string id = null, Azure.AI.Extensions.OpenAI.AgentReference agentReference = null, string responseId = null, Azure.AI.Extensions.OpenAI.ToolCallStatus status = Azure.AI.Extensions.OpenAI.ToolCallStatus.InProgress, System.Collections.Generic.IEnumerable memories = null) { throw null; } public static Azure.AI.Extensions.OpenAI.OAuthConsentRequestResponseItem OAuthConsentRequestResponseItem(string id = null, Azure.AI.Extensions.OpenAI.AgentReference agentReference = null, string responseId = null, string internalConsentLink = null, string serverLabel = null) { throw null; } public static Azure.AI.Extensions.OpenAI.OpenApiToolCall OpenApiToolCall(string id = null, Azure.AI.Extensions.OpenAI.AgentReference agentReference = null, string responseId = null, string callId = null, string name = null, string arguments = null, Azure.AI.Extensions.OpenAI.ToolCallStatus status = Azure.AI.Extensions.OpenAI.ToolCallStatus.InProgress) { throw null; } public static Azure.AI.Extensions.OpenAI.OpenApiToolCallOutput OpenApiToolCallOutput(string id = null, Azure.AI.Extensions.OpenAI.AgentReference agentReference = null, string responseId = null, string callId = null, string name = null, System.BinaryData output = null, Azure.AI.Extensions.OpenAI.ToolCallStatus status = Azure.AI.Extensions.OpenAI.ToolCallStatus.InProgress) { throw null; } @@ -504,27 +507,28 @@ public static partial class ExtensionsOpenAIModelFactory public static Azure.AI.Extensions.OpenAI.OutputItemMcpApprovalResponseResource OutputItemMcpApprovalResponseResource(string id = null, Azure.AI.Extensions.OpenAI.AgentReference agentReference = null, string responseId = null, string approvalRequestId = null, bool approve = false, string reason = null) { throw null; } public static Azure.AI.Extensions.OpenAI.OutputItemToolSearchCall OutputItemToolSearchCall(string id = null, Azure.AI.Extensions.OpenAI.AgentReference agentReference = null, string responseId = null, string callId = null, Azure.AI.Extensions.OpenAI.ResponsesToolSearchExecutionType execution = Azure.AI.Extensions.OpenAI.ResponsesToolSearchExecutionType.Server, System.BinaryData arguments = null, Azure.AI.Extensions.OpenAI.ResponsesFunctionCallStatus status = Azure.AI.Extensions.OpenAI.ResponsesFunctionCallStatus.InProgress, string createdBy = null) { throw null; } public static Azure.AI.Extensions.OpenAI.OutputItemToolSearchOutput OutputItemToolSearchOutput(string id = null, Azure.AI.Extensions.OpenAI.AgentReference agentReference = null, string responseId = null, string callId = null, Azure.AI.Extensions.OpenAI.ResponsesToolSearchExecutionType execution = Azure.AI.Extensions.OpenAI.ResponsesToolSearchExecutionType.Server, System.Collections.Generic.IEnumerable tools = null, Azure.AI.Extensions.OpenAI.ResponsesFunctionCallOutputStatus status = Azure.AI.Extensions.OpenAI.ResponsesFunctionCallOutputStatus.InProgress, string createdBy = null) { throw null; } + public static Azure.AI.Extensions.OpenAI.ProceduralMemoryItem ProceduralMemoryItem(string memoryId = null, System.DateTimeOffset updatedAt = default(System.DateTimeOffset), string scope = null, string content = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ProjectConversation ProjectConversation(string id = null, System.Collections.Generic.IDictionary metadata = null, System.DateTimeOffset createdAt = default(System.DateTimeOffset)) { throw null; } - public static Azure.AI.Extensions.OpenAI.ResponsesA2APreviewTool ResponsesA2APreviewTool(string name = null, string description = null, System.Uri baseUrl = null, string agentCardPath = null, string projectConnectionId = null) { throw null; } + public static Azure.AI.Extensions.OpenAI.ResponsesA2APreviewTool ResponsesA2APreviewTool(string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null, System.Uri baseUrl = null, string agentCardPath = null, string projectConnectionId = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesAISearchIndexResource ResponsesAISearchIndexResource(string projectConnectionId = null, string indexName = null, Azure.AI.Extensions.OpenAI.ResponsesAzureAISearchQueryType? queryType = default(Azure.AI.Extensions.OpenAI.ResponsesAzureAISearchQueryType?), int? topK = default(int?), string filter = null, string indexAssetId = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesAutoCodeInterpreterToolParam ResponsesAutoCodeInterpreterToolParam(System.Collections.Generic.IEnumerable fileIds = null, Azure.AI.Extensions.OpenAI.ResponsesContainerMemoryLimit? memoryLimit = default(Azure.AI.Extensions.OpenAI.ResponsesContainerMemoryLimit?), Azure.AI.Extensions.OpenAI.ResponsesContainerNetworkPolicyParam networkPolicy = null) { throw null; } - public static Azure.AI.Extensions.OpenAI.ResponsesAzureAISearchTool ResponsesAzureAISearchTool(string name = null, string description = null, Azure.AI.Extensions.OpenAI.ResponsesAzureAISearchToolResource azureAISearch = null) { throw null; } + public static Azure.AI.Extensions.OpenAI.ResponsesAzureAISearchTool ResponsesAzureAISearchTool(string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null, Azure.AI.Extensions.OpenAI.ResponsesAzureAISearchToolResource azureAISearch = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesAzureAISearchToolResource ResponsesAzureAISearchToolResource(System.Collections.Generic.IEnumerable indexes = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesAzureFunctionBinding ResponsesAzureFunctionBinding(Azure.AI.Extensions.OpenAI.ResponsesAzureFunctionStorageQueue storageQueue = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesAzureFunctionDefinition ResponsesAzureFunctionDefinition(Azure.AI.Extensions.OpenAI.ResponsesAzureFunctionDefinitionFunction function = null, Azure.AI.Extensions.OpenAI.ResponsesAzureFunctionBinding inputBinding = null, Azure.AI.Extensions.OpenAI.ResponsesAzureFunctionBinding outputBinding = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesAzureFunctionDefinitionFunction ResponsesAzureFunctionDefinitionFunction(string name = null, string description = null, System.Collections.Generic.IDictionary parameters = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesAzureFunctionStorageQueue ResponsesAzureFunctionStorageQueue(string queueServiceEndpoint = null, string queueName = null) { throw null; } - public static Azure.AI.Extensions.OpenAI.ResponsesAzureFunctionTool ResponsesAzureFunctionTool(Azure.AI.Extensions.OpenAI.ResponsesAzureFunctionDefinition azureFunction = null) { throw null; } + public static Azure.AI.Extensions.OpenAI.ResponsesAzureFunctionTool ResponsesAzureFunctionTool(Azure.AI.Extensions.OpenAI.ResponsesAzureFunctionDefinition azureFunction = null, System.Collections.Generic.IDictionary toolConfigs = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesBingCustomSearchConfiguration ResponsesBingCustomSearchConfiguration(string projectConnectionId = null, string instanceName = null, string market = null, string setLang = null, long? count = default(long?), string freshness = null) { throw null; } - public static Azure.AI.Extensions.OpenAI.ResponsesBingCustomSearchPreviewTool ResponsesBingCustomSearchPreviewTool(string name = null, string description = null, Azure.AI.Extensions.OpenAI.ResponsesBingCustomSearchToolParameters bingCustomSearchPreview = null) { throw null; } + public static Azure.AI.Extensions.OpenAI.ResponsesBingCustomSearchPreviewTool ResponsesBingCustomSearchPreviewTool(string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null, Azure.AI.Extensions.OpenAI.ResponsesBingCustomSearchToolParameters bingCustomSearchPreview = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesBingCustomSearchToolParameters ResponsesBingCustomSearchToolParameters(System.Collections.Generic.IEnumerable searchConfigurations = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesBingGroundingSearchConfiguration ResponsesBingGroundingSearchConfiguration(string projectConnectionId = null, string market = null, string language = null, long? count = default(long?), string freshness = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesBingGroundingSearchToolParameters ResponsesBingGroundingSearchToolParameters(System.Collections.Generic.IEnumerable searchConfigurations = null) { throw null; } - public static Azure.AI.Extensions.OpenAI.ResponsesBingGroundingTool ResponsesBingGroundingTool(string name = null, string description = null, Azure.AI.Extensions.OpenAI.ResponsesBingGroundingSearchToolParameters bingGrounding = null) { throw null; } - public static Azure.AI.Extensions.OpenAI.ResponsesBrowserAutomationPreviewTool ResponsesBrowserAutomationPreviewTool(string name = null, string description = null, Azure.AI.Extensions.OpenAI.ResponsesBrowserAutomationToolParameters browserAutomationPreview = null) { throw null; } + public static Azure.AI.Extensions.OpenAI.ResponsesBingGroundingTool ResponsesBingGroundingTool(string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null, Azure.AI.Extensions.OpenAI.ResponsesBingGroundingSearchToolParameters bingGrounding = null) { throw null; } + public static Azure.AI.Extensions.OpenAI.ResponsesBrowserAutomationPreviewTool ResponsesBrowserAutomationPreviewTool(string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null, Azure.AI.Extensions.OpenAI.ResponsesBrowserAutomationToolParameters browserAutomationPreview = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesBrowserAutomationToolConnectionParameters ResponsesBrowserAutomationToolConnectionParameters(string projectConnectionId = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesBrowserAutomationToolParameters ResponsesBrowserAutomationToolParameters(Azure.AI.Extensions.OpenAI.ResponsesBrowserAutomationToolConnectionParameters connection = null) { throw null; } - public static Azure.AI.Extensions.OpenAI.ResponsesCaptureStructuredOutputsTool ResponsesCaptureStructuredOutputsTool(string name = null, string description = null, Azure.AI.Extensions.OpenAI.ResponsesStructuredOutputDefinition outputs = null) { throw null; } + public static Azure.AI.Extensions.OpenAI.ResponsesCaptureStructuredOutputsTool ResponsesCaptureStructuredOutputsTool(string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null, Azure.AI.Extensions.OpenAI.ResponsesStructuredOutputDefinition outputs = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesComputerTool ResponsesComputerTool() { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesContainerAutoParam ResponsesContainerAutoParam(System.Collections.Generic.IEnumerable fileIds = null, Azure.AI.Extensions.OpenAI.ResponsesContainerMemoryLimit? memoryLimit = default(Azure.AI.Extensions.OpenAI.ResponsesContainerMemoryLimit?), System.Collections.Generic.IEnumerable skills = null, Azure.AI.Extensions.OpenAI.ResponsesContainerNetworkPolicyParam networkPolicy = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesContainerNetworkPolicyAllowlistParam ResponsesContainerNetworkPolicyAllowlistParam(System.Collections.Generic.IEnumerable allowedDomains = null, System.Collections.Generic.IEnumerable domainSecrets = null) { throw null; } @@ -536,20 +540,20 @@ public static partial class ExtensionsOpenAIModelFactory public static Azure.AI.Extensions.OpenAI.ResponsesCustomToolParamFormat ResponsesCustomToolParamFormat(string type = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesEmptyModelParam ResponsesEmptyModelParam() { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesFabricDataAgentToolOptions ResponsesFabricDataAgentToolOptions(System.Collections.Generic.IEnumerable projectConnections = null) { throw null; } - public static Azure.AI.Extensions.OpenAI.ResponsesFabricIQPreviewTool ResponsesFabricIQPreviewTool(string projectConnectionId = null, string serverLabel = null, System.Uri serverUrl = null, System.BinaryData requireApproval = null, string name = null, string description = null) { throw null; } - public static Azure.AI.Extensions.OpenAI.ResponsesFunctionShellToolParam ResponsesFunctionShellToolParam(Azure.AI.Extensions.OpenAI.ResponsesFunctionShellToolParamEnvironment environment = null, string name = null, string description = null) { throw null; } + public static Azure.AI.Extensions.OpenAI.ResponsesFabricIQPreviewTool ResponsesFabricIQPreviewTool(string projectConnectionId = null, string serverLabel = null, System.Uri serverUrl = null, System.BinaryData requireApproval = null, string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null) { throw null; } + public static Azure.AI.Extensions.OpenAI.ResponsesFunctionShellToolParam ResponsesFunctionShellToolParam(Azure.AI.Extensions.OpenAI.ResponsesFunctionShellToolParamEnvironment environment = null, string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesFunctionShellToolParamEnvironment ResponsesFunctionShellToolParamEnvironment(string type = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesFunctionShellToolParamEnvironmentContainerReferenceParam ResponsesFunctionShellToolParamEnvironmentContainerReferenceParam(string containerId = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesFunctionShellToolParamEnvironmentLocalEnvironmentParam ResponsesFunctionShellToolParamEnvironmentLocalEnvironmentParam(System.Collections.Generic.IEnumerable skills = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesFunctionToolParam ResponsesFunctionToolParam(string name = null, string description = null, Azure.AI.Extensions.OpenAI.ResponsesEmptyModelParam parameters = null, bool? isStrict = default(bool?), bool? shouldDeferLoading = default(bool?)) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesInlineSkillParam ResponsesInlineSkillParam(string name = null, string description = null, Azure.AI.Extensions.OpenAI.ResponsesInlineSkillSourceParam source = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesInlineSkillSourceParam ResponsesInlineSkillSourceParam(string data = null) { throw null; } - public static Azure.AI.Extensions.OpenAI.ResponsesLocalShellToolParam ResponsesLocalShellToolParam(string name = null, string description = null) { throw null; } + public static Azure.AI.Extensions.OpenAI.ResponsesLocalShellToolParam ResponsesLocalShellToolParam(string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesMCPToolFilter ResponsesMCPToolFilter(System.Collections.Generic.IEnumerable toolNames = null, bool? isReadOnly = default(bool?)) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesMCPToolRequireApproval ResponsesMCPToolRequireApproval(Azure.AI.Extensions.OpenAI.ResponsesMCPToolFilter always = null, Azure.AI.Extensions.OpenAI.ResponsesMCPToolFilter never = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesMemorySearchOptions ResponsesMemorySearchOptions(int? maxMemories = default(int?)) { throw null; } - public static Azure.AI.Extensions.OpenAI.ResponsesMemorySearchPreviewTool ResponsesMemorySearchPreviewTool(string name = null, string description = null, string memoryStoreName = null, string scope = null, Azure.AI.Extensions.OpenAI.ResponsesMemorySearchOptions searchOptions = null, int? updateDelayInSeconds = default(int?)) { throw null; } - public static Azure.AI.Extensions.OpenAI.ResponsesMicrosoftFabricPreviewTool ResponsesMicrosoftFabricPreviewTool(string name = null, string description = null, Azure.AI.Extensions.OpenAI.ResponsesFabricDataAgentToolOptions fabricDataagentPreview = null) { throw null; } + public static Azure.AI.Extensions.OpenAI.ResponsesMemorySearchPreviewTool ResponsesMemorySearchPreviewTool(string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null, string memoryStoreName = null, string scope = null, Azure.AI.Extensions.OpenAI.ResponsesMemorySearchOptions searchOptions = null, int? updateDelayInSeconds = default(int?)) { throw null; } + public static Azure.AI.Extensions.OpenAI.ResponsesMicrosoftFabricPreviewTool ResponsesMicrosoftFabricPreviewTool(string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null, Azure.AI.Extensions.OpenAI.ResponsesFabricDataAgentToolOptions fabricDataagentPreview = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesNamespaceToolParam ResponsesNamespaceToolParam(string name = null, string description = null, System.Collections.Generic.IEnumerable tools = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesOpenApiAnonymousAuthDetails ResponsesOpenApiAnonymousAuthDetails() { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesOpenApiAuthDetails ResponsesOpenApiAuthDetails(string type = null) { throw null; } @@ -559,21 +563,22 @@ public static partial class ExtensionsOpenAIModelFactory public static Azure.AI.Extensions.OpenAI.ResponsesOpenApiManagedSecurityScheme ResponsesOpenApiManagedSecurityScheme(string audience = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesOpenApiProjectConnectionAuthDetails ResponsesOpenApiProjectConnectionAuthDetails(Azure.AI.Extensions.OpenAI.ResponsesOpenApiProjectConnectionSecurityScheme securityScheme = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesOpenApiProjectConnectionSecurityScheme ResponsesOpenApiProjectConnectionSecurityScheme(string projectConnectionId = null) { throw null; } - public static Azure.AI.Extensions.OpenAI.ResponsesOpenApiTool ResponsesOpenApiTool(Azure.AI.Extensions.OpenAI.ResponsesOpenApiFunctionDefinition openApi = null) { throw null; } + public static Azure.AI.Extensions.OpenAI.ResponsesOpenApiTool ResponsesOpenApiTool(Azure.AI.Extensions.OpenAI.ResponsesOpenApiFunctionDefinition openApi = null, System.Collections.Generic.IDictionary toolConfigs = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesSharepointGroundingToolParameters ResponsesSharepointGroundingToolParameters(System.Collections.Generic.IEnumerable projectConnections = null) { throw null; } - public static Azure.AI.Extensions.OpenAI.ResponsesSharepointPreviewTool ResponsesSharepointPreviewTool(string name = null, string description = null, Azure.AI.Extensions.OpenAI.ResponsesSharepointGroundingToolParameters sharepointGroundingPreview = null) { throw null; } + public static Azure.AI.Extensions.OpenAI.ResponsesSharepointPreviewTool ResponsesSharepointPreviewTool(string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null, Azure.AI.Extensions.OpenAI.ResponsesSharepointGroundingToolParameters sharepointGroundingPreview = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesSkillReferenceParam ResponsesSkillReferenceParam(string skillId = null, string version = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesStructuredOutputDefinition ResponsesStructuredOutputDefinition(string name = null, string description = null, System.Collections.Generic.IDictionary schema = null, bool? isStrict = default(bool?)) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesTool ResponsesTool(string type = null) { throw null; } - public static Azure.AI.Extensions.OpenAI.ResponsesToolboxSearchPreviewTool ResponsesToolboxSearchPreviewTool(string name = null, string description = null) { throw null; } + public static Azure.AI.Extensions.OpenAI.ResponsesToolboxSearchPreviewTool ResponsesToolboxSearchPreviewTool(string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesToolProjectConnection ResponsesToolProjectConnection(string projectConnectionId = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesToolSearchToolParam ResponsesToolSearchToolParam(Azure.AI.Extensions.OpenAI.ResponsesToolSearchExecutionType? execution = default(Azure.AI.Extensions.OpenAI.ResponsesToolSearchExecutionType?), string description = null, Azure.AI.Extensions.OpenAI.ResponsesEmptyModelParam parameters = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesWebSearchApproximateLocation ResponsesWebSearchApproximateLocation(string country = null, string region = null, string city = null, string timezone = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesWebSearchConfiguration ResponsesWebSearchConfiguration(string projectConnectionId = null, string instanceName = null) { throw null; } - public static Azure.AI.Extensions.OpenAI.ResponsesWebSearchTool ResponsesWebSearchTool(Azure.AI.Extensions.OpenAI.WebSearchToolFilters filters = null, Azure.AI.Extensions.OpenAI.ResponsesWebSearchApproximateLocation userLocation = null, Azure.AI.Extensions.OpenAI.ResponsesWebSearchToolSearchContextSize? searchContextSize = default(Azure.AI.Extensions.OpenAI.ResponsesWebSearchToolSearchContextSize?), string name = null, string description = null, Azure.AI.Extensions.OpenAI.ResponsesWebSearchConfiguration customSearchConfiguration = null) { throw null; } - public static Azure.AI.Extensions.OpenAI.ResponsesWorkIQPreviewTool ResponsesWorkIQPreviewTool(string projectConnectionId = null, string name = null, string description = null) { throw null; } + public static Azure.AI.Extensions.OpenAI.ResponsesWebSearchTool ResponsesWebSearchTool(Azure.AI.Extensions.OpenAI.WebSearchToolFilters filters = null, Azure.AI.Extensions.OpenAI.ResponsesWebSearchApproximateLocation userLocation = null, Azure.AI.Extensions.OpenAI.ResponsesWebSearchToolSearchContextSize? searchContextSize = default(Azure.AI.Extensions.OpenAI.ResponsesWebSearchToolSearchContextSize?), string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null, Azure.AI.Extensions.OpenAI.ResponsesWebSearchConfiguration customSearchConfiguration = null) { throw null; } + public static Azure.AI.Extensions.OpenAI.ResponsesWorkIQPreviewTool ResponsesWorkIQPreviewTool(string projectConnectionId = null, string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null) { throw null; } public static Azure.AI.Extensions.OpenAI.SharepointGroundingToolCall SharepointGroundingToolCall(string id = null, Azure.AI.Extensions.OpenAI.AgentReference agentReference = null, string responseId = null, string callId = null, string arguments = null, Azure.AI.Extensions.OpenAI.ToolCallStatus status = Azure.AI.Extensions.OpenAI.ToolCallStatus.InProgress) { throw null; } public static Azure.AI.Extensions.OpenAI.SharepointGroundingToolCallOutput SharepointGroundingToolCallOutput(string id = null, Azure.AI.Extensions.OpenAI.AgentReference agentReference = null, string responseId = null, string callId = null, System.BinaryData output = null, Azure.AI.Extensions.OpenAI.ToolCallStatus status = Azure.AI.Extensions.OpenAI.ToolCallStatus.InProgress) { throw null; } + public static Azure.AI.Extensions.OpenAI.ToolConfig ToolConfig(bool? pin = default(bool?), string additionalSearchText = null) { throw null; } public static Azure.AI.Extensions.OpenAI.UserProfileMemoryItem UserProfileMemoryItem(string memoryId = null, System.DateTimeOffset updatedAt = default(System.DateTimeOffset), string scope = null, string content = null) { throw null; } public static Azure.AI.Extensions.OpenAI.WebSearchToolFilters WebSearchToolFilters(System.Collections.Generic.IEnumerable allowedDomains = null) { throw null; } } @@ -643,6 +648,37 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class MemoryCommandToolCall : Azure.AI.Extensions.OpenAI.AgentResponseItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public MemoryCommandToolCall(string callId, string arguments, Azure.AI.Extensions.OpenAI.ToolCallStatus status) { } + public string Arguments { get { throw null; } set { } } + public string CallId { get { throw null; } set { } } + public Azure.AI.Extensions.OpenAI.ToolCallStatus Status { get { throw null; } set { } } + protected override Azure.AI.Extensions.OpenAI.AgentResponseItem JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Extensions.OpenAI.AgentResponseItem PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Extensions.OpenAI.MemoryCommandToolCall System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Extensions.OpenAI.MemoryCommandToolCall System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class MemoryCommandToolCallOutput : Azure.AI.Extensions.OpenAI.AgentResponseItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public MemoryCommandToolCallOutput(string callId, Azure.AI.Extensions.OpenAI.ToolCallStatus status) { } + public string CallId { get { throw null; } set { } } + public Azure.AI.Extensions.OpenAI.ToolCallStatus Status { get { throw null; } set { } } + protected override Azure.AI.Extensions.OpenAI.AgentResponseItem JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Extensions.OpenAI.AgentResponseItem PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Extensions.OpenAI.MemoryCommandToolCallOutput System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Extensions.OpenAI.MemoryCommandToolCallOutput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public abstract partial class MemoryOutputItem : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal MemoryOutputItem() { } @@ -660,54 +696,20 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class MemorySearchToolCallResponseItem : Azure.AI.Extensions.OpenAI.AgentResponseItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class MemorySearchToolCall : Azure.AI.Extensions.OpenAI.AgentResponseItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public MemorySearchToolCallResponseItem(Azure.AI.Extensions.OpenAI.MemorySearchToolCallStatus status) { } - public System.Collections.Generic.IList Results { get { throw null; } set { } } - public Azure.AI.Extensions.OpenAI.MemorySearchToolCallStatus Status { get { throw null; } set { } } + public MemorySearchToolCall(Azure.AI.Extensions.OpenAI.ToolCallStatus status) { } + public System.Collections.Generic.IList Memories { get { throw null; } set { } } + public Azure.AI.Extensions.OpenAI.ToolCallStatus Status { get { throw null; } set { } } protected override Azure.AI.Extensions.OpenAI.AgentResponseItem JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Extensions.OpenAI.AgentResponseItem PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - Azure.AI.Extensions.OpenAI.MemorySearchToolCallResponseItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Extensions.OpenAI.MemorySearchToolCallResponseItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct MemorySearchToolCallStatus : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public MemorySearchToolCallStatus(string value) { throw null; } - public static Azure.AI.Extensions.OpenAI.MemorySearchToolCallStatus Completed { get { throw null; } } - public static Azure.AI.Extensions.OpenAI.MemorySearchToolCallStatus Failed { get { throw null; } } - public static Azure.AI.Extensions.OpenAI.MemorySearchToolCallStatus Incomplete { get { throw null; } } - public static Azure.AI.Extensions.OpenAI.MemorySearchToolCallStatus InProgress { get { throw null; } } - public static Azure.AI.Extensions.OpenAI.MemorySearchToolCallStatus Searching { get { throw null; } } - public bool Equals(Azure.AI.Extensions.OpenAI.MemorySearchToolCallStatus other) { throw null; } - public override bool Equals(object obj) { throw null; } - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.AI.Extensions.OpenAI.MemorySearchToolCallStatus left, Azure.AI.Extensions.OpenAI.MemorySearchToolCallStatus right) { throw null; } - public static implicit operator Azure.AI.Extensions.OpenAI.MemorySearchToolCallStatus (string value) { throw null; } - public static implicit operator Azure.AI.Extensions.OpenAI.MemorySearchToolCallStatus? (string value) { throw null; } - public static bool operator !=(Azure.AI.Extensions.OpenAI.MemorySearchToolCallStatus left, Azure.AI.Extensions.OpenAI.MemorySearchToolCallStatus right) { throw null; } - public override string ToString() { throw null; } - } - public partial class MemoryToolSearchItem : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public MemoryToolSearchItem(Azure.AI.Extensions.OpenAI.MemoryOutputItem memoryItem) { } - public Azure.AI.Extensions.OpenAI.MemoryOutputItem MemoryItem { get { throw null; } set { } } - protected virtual Azure.AI.Extensions.OpenAI.MemoryToolSearchItem JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - protected virtual Azure.AI.Extensions.OpenAI.MemoryToolSearchItem PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - Azure.AI.Extensions.OpenAI.MemoryToolSearchItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Extensions.OpenAI.MemoryToolSearchItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Extensions.OpenAI.MemorySearchToolCall System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Extensions.OpenAI.MemorySearchToolCall System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } public partial class OAuthConsentRequestResponseItem : Azure.AI.Extensions.OpenAI.AgentResponseItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { @@ -876,6 +878,19 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class ProceduralMemoryItem : Azure.AI.Extensions.OpenAI.MemoryOutputItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ProceduralMemoryItem(string memoryId, System.DateTimeOffset updatedAt, string scope, string content) { } + protected override Azure.AI.Extensions.OpenAI.MemoryOutputItem JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Extensions.OpenAI.MemoryOutputItem PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Extensions.OpenAI.ProceduralMemoryItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Extensions.OpenAI.ProceduralMemoryItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ProjectConversation : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ProjectConversation() { } @@ -1026,6 +1041,7 @@ public ResponsesA2APreviewTool() { } public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } public string ProjectConnectionId { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Extensions.OpenAI.ResponsesTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Extensions.OpenAI.ResponsesTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1098,6 +1114,7 @@ public ResponsesAzureAISearchTool(Azure.AI.Extensions.OpenAI.ResponsesAzureAISea public Azure.AI.Extensions.OpenAI.ResponsesAzureAISearchToolResource AzureAISearch { get { throw null; } set { } } public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Extensions.OpenAI.ResponsesTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Extensions.OpenAI.ResponsesTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1192,6 +1209,7 @@ public partial class ResponsesAzureFunctionTool : Azure.AI.Extensions.OpenAI.Res { public ResponsesAzureFunctionTool(Azure.AI.Extensions.OpenAI.ResponsesAzureFunctionDefinition azureFunction) { } public Azure.AI.Extensions.OpenAI.ResponsesAzureFunctionDefinition AzureFunction { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Extensions.OpenAI.ResponsesTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Extensions.OpenAI.ResponsesTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1227,6 +1245,7 @@ public ResponsesBingCustomSearchPreviewTool(Azure.AI.Extensions.OpenAI.Responses public Azure.AI.Extensions.OpenAI.ResponsesBingCustomSearchToolParameters BingCustomSearchPreview { get { throw null; } set { } } public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Extensions.OpenAI.ResponsesTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Extensions.OpenAI.ResponsesTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1289,6 +1308,7 @@ public ResponsesBingGroundingTool(Azure.AI.Extensions.OpenAI.ResponsesBingGround public Azure.AI.Extensions.OpenAI.ResponsesBingGroundingSearchToolParameters BingGrounding { get { throw null; } set { } } public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Extensions.OpenAI.ResponsesTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Extensions.OpenAI.ResponsesTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1305,6 +1325,7 @@ public ResponsesBrowserAutomationPreviewTool(Azure.AI.Extensions.OpenAI.Response public Azure.AI.Extensions.OpenAI.ResponsesBrowserAutomationToolParameters BrowserAutomationPreview { get { throw null; } set { } } public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Extensions.OpenAI.ResponsesTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Extensions.OpenAI.ResponsesTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1349,6 +1370,7 @@ public ResponsesCaptureStructuredOutputsTool(Azure.AI.Extensions.OpenAI.Response public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } public Azure.AI.Extensions.OpenAI.ResponsesStructuredOutputDefinition Outputs { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Extensions.OpenAI.ResponsesTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Extensions.OpenAI.ResponsesTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1532,6 +1554,7 @@ public ResponsesFabricIQPreviewTool(string projectConnectionId) { } public System.BinaryData RequireApproval { get { throw null; } set { } } public string ServerLabel { get { throw null; } set { } } public System.Uri ServerUrl { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Extensions.OpenAI.ResponsesTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Extensions.OpenAI.ResponsesTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1560,6 +1583,7 @@ public ResponsesFunctionShellToolParam() { } public string Description { get { throw null; } set { } } public Azure.AI.Extensions.OpenAI.ResponsesFunctionShellToolParamEnvironment Environment { get { throw null; } set { } } public string Name { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Extensions.OpenAI.ResponsesTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Extensions.OpenAI.ResponsesTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1672,6 +1696,7 @@ public partial class ResponsesLocalShellToolParam : Azure.AI.Extensions.OpenAI.R public ResponsesLocalShellToolParam() { } public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Extensions.OpenAI.ResponsesTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Extensions.OpenAI.ResponsesTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1734,6 +1759,7 @@ public ResponsesMemorySearchPreviewTool(string memoryStoreName, string scope) { public string Name { get { throw null; } set { } } public string Scope { get { throw null; } set { } } public Azure.AI.Extensions.OpenAI.ResponsesMemorySearchOptions SearchOptions { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } public int? UpdateDelayInSeconds { get { throw null; } set { } } protected override Azure.AI.Extensions.OpenAI.ResponsesTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1751,6 +1777,7 @@ public ResponsesMicrosoftFabricPreviewTool(Azure.AI.Extensions.OpenAI.ResponsesF public string Description { get { throw null; } set { } } public Azure.AI.Extensions.OpenAI.ResponsesFabricDataAgentToolOptions FabricDataagentPreview { get { throw null; } set { } } public string Name { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Extensions.OpenAI.ResponsesTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Extensions.OpenAI.ResponsesTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1898,6 +1925,7 @@ public partial class ResponsesOpenApiTool : Azure.AI.Extensions.OpenAI.Responses { public ResponsesOpenApiTool(Azure.AI.Extensions.OpenAI.ResponsesOpenApiFunctionDefinition openApi) { } public Azure.AI.Extensions.OpenAI.ResponsesOpenApiFunctionDefinition OpenApi { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Extensions.OpenAI.ResponsesTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Extensions.OpenAI.ResponsesTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1928,6 +1956,7 @@ public ResponsesSharepointPreviewTool(Azure.AI.Extensions.OpenAI.ResponsesSharep public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } public Azure.AI.Extensions.OpenAI.ResponsesSharepointGroundingToolParameters SharepointGroundingPreview { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Extensions.OpenAI.ResponsesTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Extensions.OpenAI.ResponsesTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1988,6 +2017,7 @@ public partial class ResponsesToolboxSearchPreviewTool : Azure.AI.Extensions.Ope public ResponsesToolboxSearchPreviewTool() { } public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Extensions.OpenAI.ResponsesTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Extensions.OpenAI.ResponsesTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2074,6 +2104,7 @@ public ResponsesWebSearchTool() { } public Azure.AI.Extensions.OpenAI.WebSearchToolFilters Filters { get { throw null; } set { } } public string Name { get { throw null; } set { } } public Azure.AI.Extensions.OpenAI.ResponsesWebSearchToolSearchContextSize? SearchContextSize { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } public Azure.AI.Extensions.OpenAI.ResponsesWebSearchApproximateLocation UserLocation { get { throw null; } set { } } protected override Azure.AI.Extensions.OpenAI.ResponsesTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -2097,6 +2128,7 @@ public ResponsesWorkIQPreviewTool(string projectConnectionId) { } public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } public string ProjectConnectionId { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Extensions.OpenAI.ResponsesTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Extensions.OpenAI.ResponsesTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2146,6 +2178,21 @@ public enum ToolCallStatus Incomplete = 2, Failed = 3, } + public partial class ToolConfig : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ToolConfig() { } + public string AdditionalSearchText { get { throw null; } set { } } + public bool? Pin { get { throw null; } set { } } + protected virtual Azure.AI.Extensions.OpenAI.ToolConfig JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Extensions.OpenAI.ToolConfig PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Extensions.OpenAI.ToolConfig System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Extensions.OpenAI.ToolConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class UserProfileMemoryItem : Azure.AI.Extensions.OpenAI.MemoryOutputItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public UserProfileMemoryItem(string memoryId, System.DateTimeOffset updatedAt, string scope, string content) { } diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/api/Azure.AI.Extensions.OpenAI.netstandard2.0.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/api/Azure.AI.Extensions.OpenAI.netstandard2.0.cs index e15a17e5cfb0..ba06f7a4b997 100644 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/api/Azure.AI.Extensions.OpenAI.netstandard2.0.cs +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/api/Azure.AI.Extensions.OpenAI.netstandard2.0.cs @@ -110,6 +110,8 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static Azure.AI.Extensions.OpenAI.AgentResponseItemKind McpApprovalResponse { get { throw null; } } public static Azure.AI.Extensions.OpenAI.AgentResponseItemKind McpCall { get { throw null; } } public static Azure.AI.Extensions.OpenAI.AgentResponseItemKind McpListTools { get { throw null; } } + public static Azure.AI.Extensions.OpenAI.AgentResponseItemKind MemoryCommandPreviewCall { get { throw null; } } + public static Azure.AI.Extensions.OpenAI.AgentResponseItemKind MemoryCommandPreviewCallOutput { get { throw null; } } public static Azure.AI.Extensions.OpenAI.AgentResponseItemKind MemorySearchCall { get { throw null; } } public static Azure.AI.Extensions.OpenAI.AgentResponseItemKind Message { get { throw null; } } public static Azure.AI.Extensions.OpenAI.AgentResponseItemKind OauthConsentRequest { get { throw null; } } @@ -491,9 +493,10 @@ public static partial class ExtensionsOpenAIModelFactory public static Azure.AI.Extensions.OpenAI.FabricDataAgentToolCall FabricDataAgentToolCall(string id = null, Azure.AI.Extensions.OpenAI.AgentReference agentReference = null, string responseId = null, string callId = null, string arguments = null, Azure.AI.Extensions.OpenAI.ToolCallStatus status = Azure.AI.Extensions.OpenAI.ToolCallStatus.InProgress) { throw null; } public static Azure.AI.Extensions.OpenAI.FabricDataAgentToolCallOutput FabricDataAgentToolCallOutput(string id = null, Azure.AI.Extensions.OpenAI.AgentReference agentReference = null, string responseId = null, string callId = null, System.BinaryData output = null, Azure.AI.Extensions.OpenAI.ToolCallStatus status = Azure.AI.Extensions.OpenAI.ToolCallStatus.InProgress) { throw null; } public static Azure.AI.Extensions.OpenAI.LocalSkillParam LocalSkillParam(string name = null, string description = null, string path = null) { throw null; } + public static Azure.AI.Extensions.OpenAI.MemoryCommandToolCall MemoryCommandToolCall(string id = null, Azure.AI.Extensions.OpenAI.AgentReference agentReference = null, string responseId = null, string callId = null, string arguments = null, Azure.AI.Extensions.OpenAI.ToolCallStatus status = Azure.AI.Extensions.OpenAI.ToolCallStatus.InProgress) { throw null; } + public static Azure.AI.Extensions.OpenAI.MemoryCommandToolCallOutput MemoryCommandToolCallOutput(string id = null, Azure.AI.Extensions.OpenAI.AgentReference agentReference = null, string responseId = null, string callId = null, Azure.AI.Extensions.OpenAI.ToolCallStatus status = Azure.AI.Extensions.OpenAI.ToolCallStatus.InProgress) { throw null; } public static Azure.AI.Extensions.OpenAI.MemoryOutputItem MemoryOutputItem(string memoryId = null, System.DateTimeOffset updatedAt = default(System.DateTimeOffset), string scope = null, string content = null, string kind = null) { throw null; } - public static Azure.AI.Extensions.OpenAI.MemorySearchToolCallResponseItem MemorySearchToolCallResponseItem(string id = null, Azure.AI.Extensions.OpenAI.AgentReference agentReference = null, string responseId = null, Azure.AI.Extensions.OpenAI.MemorySearchToolCallStatus status = default(Azure.AI.Extensions.OpenAI.MemorySearchToolCallStatus), System.Collections.Generic.IEnumerable results = null) { throw null; } - public static Azure.AI.Extensions.OpenAI.MemoryToolSearchItem MemoryToolSearchItem(Azure.AI.Extensions.OpenAI.MemoryOutputItem memoryItem = null) { throw null; } + public static Azure.AI.Extensions.OpenAI.MemorySearchToolCall MemorySearchToolCall(string id = null, Azure.AI.Extensions.OpenAI.AgentReference agentReference = null, string responseId = null, Azure.AI.Extensions.OpenAI.ToolCallStatus status = Azure.AI.Extensions.OpenAI.ToolCallStatus.InProgress, System.Collections.Generic.IEnumerable memories = null) { throw null; } public static Azure.AI.Extensions.OpenAI.OAuthConsentRequestResponseItem OAuthConsentRequestResponseItem(string id = null, Azure.AI.Extensions.OpenAI.AgentReference agentReference = null, string responseId = null, string internalConsentLink = null, string serverLabel = null) { throw null; } public static Azure.AI.Extensions.OpenAI.OpenApiToolCall OpenApiToolCall(string id = null, Azure.AI.Extensions.OpenAI.AgentReference agentReference = null, string responseId = null, string callId = null, string name = null, string arguments = null, Azure.AI.Extensions.OpenAI.ToolCallStatus status = Azure.AI.Extensions.OpenAI.ToolCallStatus.InProgress) { throw null; } public static Azure.AI.Extensions.OpenAI.OpenApiToolCallOutput OpenApiToolCallOutput(string id = null, Azure.AI.Extensions.OpenAI.AgentReference agentReference = null, string responseId = null, string callId = null, string name = null, System.BinaryData output = null, Azure.AI.Extensions.OpenAI.ToolCallStatus status = Azure.AI.Extensions.OpenAI.ToolCallStatus.InProgress) { throw null; } @@ -504,27 +507,28 @@ public static partial class ExtensionsOpenAIModelFactory public static Azure.AI.Extensions.OpenAI.OutputItemMcpApprovalResponseResource OutputItemMcpApprovalResponseResource(string id = null, Azure.AI.Extensions.OpenAI.AgentReference agentReference = null, string responseId = null, string approvalRequestId = null, bool approve = false, string reason = null) { throw null; } public static Azure.AI.Extensions.OpenAI.OutputItemToolSearchCall OutputItemToolSearchCall(string id = null, Azure.AI.Extensions.OpenAI.AgentReference agentReference = null, string responseId = null, string callId = null, Azure.AI.Extensions.OpenAI.ResponsesToolSearchExecutionType execution = Azure.AI.Extensions.OpenAI.ResponsesToolSearchExecutionType.Server, System.BinaryData arguments = null, Azure.AI.Extensions.OpenAI.ResponsesFunctionCallStatus status = Azure.AI.Extensions.OpenAI.ResponsesFunctionCallStatus.InProgress, string createdBy = null) { throw null; } public static Azure.AI.Extensions.OpenAI.OutputItemToolSearchOutput OutputItemToolSearchOutput(string id = null, Azure.AI.Extensions.OpenAI.AgentReference agentReference = null, string responseId = null, string callId = null, Azure.AI.Extensions.OpenAI.ResponsesToolSearchExecutionType execution = Azure.AI.Extensions.OpenAI.ResponsesToolSearchExecutionType.Server, System.Collections.Generic.IEnumerable tools = null, Azure.AI.Extensions.OpenAI.ResponsesFunctionCallOutputStatus status = Azure.AI.Extensions.OpenAI.ResponsesFunctionCallOutputStatus.InProgress, string createdBy = null) { throw null; } + public static Azure.AI.Extensions.OpenAI.ProceduralMemoryItem ProceduralMemoryItem(string memoryId = null, System.DateTimeOffset updatedAt = default(System.DateTimeOffset), string scope = null, string content = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ProjectConversation ProjectConversation(string id = null, System.Collections.Generic.IDictionary metadata = null, System.DateTimeOffset createdAt = default(System.DateTimeOffset)) { throw null; } - public static Azure.AI.Extensions.OpenAI.ResponsesA2APreviewTool ResponsesA2APreviewTool(string name = null, string description = null, System.Uri baseUrl = null, string agentCardPath = null, string projectConnectionId = null) { throw null; } + public static Azure.AI.Extensions.OpenAI.ResponsesA2APreviewTool ResponsesA2APreviewTool(string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null, System.Uri baseUrl = null, string agentCardPath = null, string projectConnectionId = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesAISearchIndexResource ResponsesAISearchIndexResource(string projectConnectionId = null, string indexName = null, Azure.AI.Extensions.OpenAI.ResponsesAzureAISearchQueryType? queryType = default(Azure.AI.Extensions.OpenAI.ResponsesAzureAISearchQueryType?), int? topK = default(int?), string filter = null, string indexAssetId = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesAutoCodeInterpreterToolParam ResponsesAutoCodeInterpreterToolParam(System.Collections.Generic.IEnumerable fileIds = null, Azure.AI.Extensions.OpenAI.ResponsesContainerMemoryLimit? memoryLimit = default(Azure.AI.Extensions.OpenAI.ResponsesContainerMemoryLimit?), Azure.AI.Extensions.OpenAI.ResponsesContainerNetworkPolicyParam networkPolicy = null) { throw null; } - public static Azure.AI.Extensions.OpenAI.ResponsesAzureAISearchTool ResponsesAzureAISearchTool(string name = null, string description = null, Azure.AI.Extensions.OpenAI.ResponsesAzureAISearchToolResource azureAISearch = null) { throw null; } + public static Azure.AI.Extensions.OpenAI.ResponsesAzureAISearchTool ResponsesAzureAISearchTool(string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null, Azure.AI.Extensions.OpenAI.ResponsesAzureAISearchToolResource azureAISearch = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesAzureAISearchToolResource ResponsesAzureAISearchToolResource(System.Collections.Generic.IEnumerable indexes = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesAzureFunctionBinding ResponsesAzureFunctionBinding(Azure.AI.Extensions.OpenAI.ResponsesAzureFunctionStorageQueue storageQueue = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesAzureFunctionDefinition ResponsesAzureFunctionDefinition(Azure.AI.Extensions.OpenAI.ResponsesAzureFunctionDefinitionFunction function = null, Azure.AI.Extensions.OpenAI.ResponsesAzureFunctionBinding inputBinding = null, Azure.AI.Extensions.OpenAI.ResponsesAzureFunctionBinding outputBinding = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesAzureFunctionDefinitionFunction ResponsesAzureFunctionDefinitionFunction(string name = null, string description = null, System.Collections.Generic.IDictionary parameters = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesAzureFunctionStorageQueue ResponsesAzureFunctionStorageQueue(string queueServiceEndpoint = null, string queueName = null) { throw null; } - public static Azure.AI.Extensions.OpenAI.ResponsesAzureFunctionTool ResponsesAzureFunctionTool(Azure.AI.Extensions.OpenAI.ResponsesAzureFunctionDefinition azureFunction = null) { throw null; } + public static Azure.AI.Extensions.OpenAI.ResponsesAzureFunctionTool ResponsesAzureFunctionTool(Azure.AI.Extensions.OpenAI.ResponsesAzureFunctionDefinition azureFunction = null, System.Collections.Generic.IDictionary toolConfigs = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesBingCustomSearchConfiguration ResponsesBingCustomSearchConfiguration(string projectConnectionId = null, string instanceName = null, string market = null, string setLang = null, long? count = default(long?), string freshness = null) { throw null; } - public static Azure.AI.Extensions.OpenAI.ResponsesBingCustomSearchPreviewTool ResponsesBingCustomSearchPreviewTool(string name = null, string description = null, Azure.AI.Extensions.OpenAI.ResponsesBingCustomSearchToolParameters bingCustomSearchPreview = null) { throw null; } + public static Azure.AI.Extensions.OpenAI.ResponsesBingCustomSearchPreviewTool ResponsesBingCustomSearchPreviewTool(string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null, Azure.AI.Extensions.OpenAI.ResponsesBingCustomSearchToolParameters bingCustomSearchPreview = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesBingCustomSearchToolParameters ResponsesBingCustomSearchToolParameters(System.Collections.Generic.IEnumerable searchConfigurations = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesBingGroundingSearchConfiguration ResponsesBingGroundingSearchConfiguration(string projectConnectionId = null, string market = null, string language = null, long? count = default(long?), string freshness = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesBingGroundingSearchToolParameters ResponsesBingGroundingSearchToolParameters(System.Collections.Generic.IEnumerable searchConfigurations = null) { throw null; } - public static Azure.AI.Extensions.OpenAI.ResponsesBingGroundingTool ResponsesBingGroundingTool(string name = null, string description = null, Azure.AI.Extensions.OpenAI.ResponsesBingGroundingSearchToolParameters bingGrounding = null) { throw null; } - public static Azure.AI.Extensions.OpenAI.ResponsesBrowserAutomationPreviewTool ResponsesBrowserAutomationPreviewTool(string name = null, string description = null, Azure.AI.Extensions.OpenAI.ResponsesBrowserAutomationToolParameters browserAutomationPreview = null) { throw null; } + public static Azure.AI.Extensions.OpenAI.ResponsesBingGroundingTool ResponsesBingGroundingTool(string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null, Azure.AI.Extensions.OpenAI.ResponsesBingGroundingSearchToolParameters bingGrounding = null) { throw null; } + public static Azure.AI.Extensions.OpenAI.ResponsesBrowserAutomationPreviewTool ResponsesBrowserAutomationPreviewTool(string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null, Azure.AI.Extensions.OpenAI.ResponsesBrowserAutomationToolParameters browserAutomationPreview = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesBrowserAutomationToolConnectionParameters ResponsesBrowserAutomationToolConnectionParameters(string projectConnectionId = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesBrowserAutomationToolParameters ResponsesBrowserAutomationToolParameters(Azure.AI.Extensions.OpenAI.ResponsesBrowserAutomationToolConnectionParameters connection = null) { throw null; } - public static Azure.AI.Extensions.OpenAI.ResponsesCaptureStructuredOutputsTool ResponsesCaptureStructuredOutputsTool(string name = null, string description = null, Azure.AI.Extensions.OpenAI.ResponsesStructuredOutputDefinition outputs = null) { throw null; } + public static Azure.AI.Extensions.OpenAI.ResponsesCaptureStructuredOutputsTool ResponsesCaptureStructuredOutputsTool(string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null, Azure.AI.Extensions.OpenAI.ResponsesStructuredOutputDefinition outputs = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesComputerTool ResponsesComputerTool() { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesContainerAutoParam ResponsesContainerAutoParam(System.Collections.Generic.IEnumerable fileIds = null, Azure.AI.Extensions.OpenAI.ResponsesContainerMemoryLimit? memoryLimit = default(Azure.AI.Extensions.OpenAI.ResponsesContainerMemoryLimit?), System.Collections.Generic.IEnumerable skills = null, Azure.AI.Extensions.OpenAI.ResponsesContainerNetworkPolicyParam networkPolicy = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesContainerNetworkPolicyAllowlistParam ResponsesContainerNetworkPolicyAllowlistParam(System.Collections.Generic.IEnumerable allowedDomains = null, System.Collections.Generic.IEnumerable domainSecrets = null) { throw null; } @@ -536,20 +540,20 @@ public static partial class ExtensionsOpenAIModelFactory public static Azure.AI.Extensions.OpenAI.ResponsesCustomToolParamFormat ResponsesCustomToolParamFormat(string type = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesEmptyModelParam ResponsesEmptyModelParam() { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesFabricDataAgentToolOptions ResponsesFabricDataAgentToolOptions(System.Collections.Generic.IEnumerable projectConnections = null) { throw null; } - public static Azure.AI.Extensions.OpenAI.ResponsesFabricIQPreviewTool ResponsesFabricIQPreviewTool(string projectConnectionId = null, string serverLabel = null, System.Uri serverUrl = null, System.BinaryData requireApproval = null, string name = null, string description = null) { throw null; } - public static Azure.AI.Extensions.OpenAI.ResponsesFunctionShellToolParam ResponsesFunctionShellToolParam(Azure.AI.Extensions.OpenAI.ResponsesFunctionShellToolParamEnvironment environment = null, string name = null, string description = null) { throw null; } + public static Azure.AI.Extensions.OpenAI.ResponsesFabricIQPreviewTool ResponsesFabricIQPreviewTool(string projectConnectionId = null, string serverLabel = null, System.Uri serverUrl = null, System.BinaryData requireApproval = null, string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null) { throw null; } + public static Azure.AI.Extensions.OpenAI.ResponsesFunctionShellToolParam ResponsesFunctionShellToolParam(Azure.AI.Extensions.OpenAI.ResponsesFunctionShellToolParamEnvironment environment = null, string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesFunctionShellToolParamEnvironment ResponsesFunctionShellToolParamEnvironment(string type = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesFunctionShellToolParamEnvironmentContainerReferenceParam ResponsesFunctionShellToolParamEnvironmentContainerReferenceParam(string containerId = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesFunctionShellToolParamEnvironmentLocalEnvironmentParam ResponsesFunctionShellToolParamEnvironmentLocalEnvironmentParam(System.Collections.Generic.IEnumerable skills = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesFunctionToolParam ResponsesFunctionToolParam(string name = null, string description = null, Azure.AI.Extensions.OpenAI.ResponsesEmptyModelParam parameters = null, bool? isStrict = default(bool?), bool? shouldDeferLoading = default(bool?)) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesInlineSkillParam ResponsesInlineSkillParam(string name = null, string description = null, Azure.AI.Extensions.OpenAI.ResponsesInlineSkillSourceParam source = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesInlineSkillSourceParam ResponsesInlineSkillSourceParam(string data = null) { throw null; } - public static Azure.AI.Extensions.OpenAI.ResponsesLocalShellToolParam ResponsesLocalShellToolParam(string name = null, string description = null) { throw null; } + public static Azure.AI.Extensions.OpenAI.ResponsesLocalShellToolParam ResponsesLocalShellToolParam(string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesMCPToolFilter ResponsesMCPToolFilter(System.Collections.Generic.IEnumerable toolNames = null, bool? isReadOnly = default(bool?)) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesMCPToolRequireApproval ResponsesMCPToolRequireApproval(Azure.AI.Extensions.OpenAI.ResponsesMCPToolFilter always = null, Azure.AI.Extensions.OpenAI.ResponsesMCPToolFilter never = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesMemorySearchOptions ResponsesMemorySearchOptions(int? maxMemories = default(int?)) { throw null; } - public static Azure.AI.Extensions.OpenAI.ResponsesMemorySearchPreviewTool ResponsesMemorySearchPreviewTool(string name = null, string description = null, string memoryStoreName = null, string scope = null, Azure.AI.Extensions.OpenAI.ResponsesMemorySearchOptions searchOptions = null, int? updateDelayInSeconds = default(int?)) { throw null; } - public static Azure.AI.Extensions.OpenAI.ResponsesMicrosoftFabricPreviewTool ResponsesMicrosoftFabricPreviewTool(string name = null, string description = null, Azure.AI.Extensions.OpenAI.ResponsesFabricDataAgentToolOptions fabricDataagentPreview = null) { throw null; } + public static Azure.AI.Extensions.OpenAI.ResponsesMemorySearchPreviewTool ResponsesMemorySearchPreviewTool(string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null, string memoryStoreName = null, string scope = null, Azure.AI.Extensions.OpenAI.ResponsesMemorySearchOptions searchOptions = null, int? updateDelayInSeconds = default(int?)) { throw null; } + public static Azure.AI.Extensions.OpenAI.ResponsesMicrosoftFabricPreviewTool ResponsesMicrosoftFabricPreviewTool(string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null, Azure.AI.Extensions.OpenAI.ResponsesFabricDataAgentToolOptions fabricDataagentPreview = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesNamespaceToolParam ResponsesNamespaceToolParam(string name = null, string description = null, System.Collections.Generic.IEnumerable tools = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesOpenApiAnonymousAuthDetails ResponsesOpenApiAnonymousAuthDetails() { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesOpenApiAuthDetails ResponsesOpenApiAuthDetails(string type = null) { throw null; } @@ -559,21 +563,22 @@ public static partial class ExtensionsOpenAIModelFactory public static Azure.AI.Extensions.OpenAI.ResponsesOpenApiManagedSecurityScheme ResponsesOpenApiManagedSecurityScheme(string audience = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesOpenApiProjectConnectionAuthDetails ResponsesOpenApiProjectConnectionAuthDetails(Azure.AI.Extensions.OpenAI.ResponsesOpenApiProjectConnectionSecurityScheme securityScheme = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesOpenApiProjectConnectionSecurityScheme ResponsesOpenApiProjectConnectionSecurityScheme(string projectConnectionId = null) { throw null; } - public static Azure.AI.Extensions.OpenAI.ResponsesOpenApiTool ResponsesOpenApiTool(Azure.AI.Extensions.OpenAI.ResponsesOpenApiFunctionDefinition openApi = null) { throw null; } + public static Azure.AI.Extensions.OpenAI.ResponsesOpenApiTool ResponsesOpenApiTool(Azure.AI.Extensions.OpenAI.ResponsesOpenApiFunctionDefinition openApi = null, System.Collections.Generic.IDictionary toolConfigs = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesSharepointGroundingToolParameters ResponsesSharepointGroundingToolParameters(System.Collections.Generic.IEnumerable projectConnections = null) { throw null; } - public static Azure.AI.Extensions.OpenAI.ResponsesSharepointPreviewTool ResponsesSharepointPreviewTool(string name = null, string description = null, Azure.AI.Extensions.OpenAI.ResponsesSharepointGroundingToolParameters sharepointGroundingPreview = null) { throw null; } + public static Azure.AI.Extensions.OpenAI.ResponsesSharepointPreviewTool ResponsesSharepointPreviewTool(string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null, Azure.AI.Extensions.OpenAI.ResponsesSharepointGroundingToolParameters sharepointGroundingPreview = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesSkillReferenceParam ResponsesSkillReferenceParam(string skillId = null, string version = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesStructuredOutputDefinition ResponsesStructuredOutputDefinition(string name = null, string description = null, System.Collections.Generic.IDictionary schema = null, bool? isStrict = default(bool?)) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesTool ResponsesTool(string type = null) { throw null; } - public static Azure.AI.Extensions.OpenAI.ResponsesToolboxSearchPreviewTool ResponsesToolboxSearchPreviewTool(string name = null, string description = null) { throw null; } + public static Azure.AI.Extensions.OpenAI.ResponsesToolboxSearchPreviewTool ResponsesToolboxSearchPreviewTool(string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesToolProjectConnection ResponsesToolProjectConnection(string projectConnectionId = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesToolSearchToolParam ResponsesToolSearchToolParam(Azure.AI.Extensions.OpenAI.ResponsesToolSearchExecutionType? execution = default(Azure.AI.Extensions.OpenAI.ResponsesToolSearchExecutionType?), string description = null, Azure.AI.Extensions.OpenAI.ResponsesEmptyModelParam parameters = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesWebSearchApproximateLocation ResponsesWebSearchApproximateLocation(string country = null, string region = null, string city = null, string timezone = null) { throw null; } public static Azure.AI.Extensions.OpenAI.ResponsesWebSearchConfiguration ResponsesWebSearchConfiguration(string projectConnectionId = null, string instanceName = null) { throw null; } - public static Azure.AI.Extensions.OpenAI.ResponsesWebSearchTool ResponsesWebSearchTool(Azure.AI.Extensions.OpenAI.WebSearchToolFilters filters = null, Azure.AI.Extensions.OpenAI.ResponsesWebSearchApproximateLocation userLocation = null, Azure.AI.Extensions.OpenAI.ResponsesWebSearchToolSearchContextSize? searchContextSize = default(Azure.AI.Extensions.OpenAI.ResponsesWebSearchToolSearchContextSize?), string name = null, string description = null, Azure.AI.Extensions.OpenAI.ResponsesWebSearchConfiguration customSearchConfiguration = null) { throw null; } - public static Azure.AI.Extensions.OpenAI.ResponsesWorkIQPreviewTool ResponsesWorkIQPreviewTool(string projectConnectionId = null, string name = null, string description = null) { throw null; } + public static Azure.AI.Extensions.OpenAI.ResponsesWebSearchTool ResponsesWebSearchTool(Azure.AI.Extensions.OpenAI.WebSearchToolFilters filters = null, Azure.AI.Extensions.OpenAI.ResponsesWebSearchApproximateLocation userLocation = null, Azure.AI.Extensions.OpenAI.ResponsesWebSearchToolSearchContextSize? searchContextSize = default(Azure.AI.Extensions.OpenAI.ResponsesWebSearchToolSearchContextSize?), string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null, Azure.AI.Extensions.OpenAI.ResponsesWebSearchConfiguration customSearchConfiguration = null) { throw null; } + public static Azure.AI.Extensions.OpenAI.ResponsesWorkIQPreviewTool ResponsesWorkIQPreviewTool(string projectConnectionId = null, string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null) { throw null; } public static Azure.AI.Extensions.OpenAI.SharepointGroundingToolCall SharepointGroundingToolCall(string id = null, Azure.AI.Extensions.OpenAI.AgentReference agentReference = null, string responseId = null, string callId = null, string arguments = null, Azure.AI.Extensions.OpenAI.ToolCallStatus status = Azure.AI.Extensions.OpenAI.ToolCallStatus.InProgress) { throw null; } public static Azure.AI.Extensions.OpenAI.SharepointGroundingToolCallOutput SharepointGroundingToolCallOutput(string id = null, Azure.AI.Extensions.OpenAI.AgentReference agentReference = null, string responseId = null, string callId = null, System.BinaryData output = null, Azure.AI.Extensions.OpenAI.ToolCallStatus status = Azure.AI.Extensions.OpenAI.ToolCallStatus.InProgress) { throw null; } + public static Azure.AI.Extensions.OpenAI.ToolConfig ToolConfig(bool? pin = default(bool?), string additionalSearchText = null) { throw null; } public static Azure.AI.Extensions.OpenAI.UserProfileMemoryItem UserProfileMemoryItem(string memoryId = null, System.DateTimeOffset updatedAt = default(System.DateTimeOffset), string scope = null, string content = null) { throw null; } public static Azure.AI.Extensions.OpenAI.WebSearchToolFilters WebSearchToolFilters(System.Collections.Generic.IEnumerable allowedDomains = null) { throw null; } } @@ -643,6 +648,37 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class MemoryCommandToolCall : Azure.AI.Extensions.OpenAI.AgentResponseItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public MemoryCommandToolCall(string callId, string arguments, Azure.AI.Extensions.OpenAI.ToolCallStatus status) { } + public string Arguments { get { throw null; } set { } } + public string CallId { get { throw null; } set { } } + public Azure.AI.Extensions.OpenAI.ToolCallStatus Status { get { throw null; } set { } } + protected override Azure.AI.Extensions.OpenAI.AgentResponseItem JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Extensions.OpenAI.AgentResponseItem PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Extensions.OpenAI.MemoryCommandToolCall System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Extensions.OpenAI.MemoryCommandToolCall System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class MemoryCommandToolCallOutput : Azure.AI.Extensions.OpenAI.AgentResponseItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public MemoryCommandToolCallOutput(string callId, Azure.AI.Extensions.OpenAI.ToolCallStatus status) { } + public string CallId { get { throw null; } set { } } + public Azure.AI.Extensions.OpenAI.ToolCallStatus Status { get { throw null; } set { } } + protected override Azure.AI.Extensions.OpenAI.AgentResponseItem JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Extensions.OpenAI.AgentResponseItem PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Extensions.OpenAI.MemoryCommandToolCallOutput System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Extensions.OpenAI.MemoryCommandToolCallOutput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public abstract partial class MemoryOutputItem : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal MemoryOutputItem() { } @@ -660,54 +696,20 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } - public partial class MemorySearchToolCallResponseItem : Azure.AI.Extensions.OpenAI.AgentResponseItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + public partial class MemorySearchToolCall : Azure.AI.Extensions.OpenAI.AgentResponseItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { - public MemorySearchToolCallResponseItem(Azure.AI.Extensions.OpenAI.MemorySearchToolCallStatus status) { } - public System.Collections.Generic.IList Results { get { throw null; } set { } } - public Azure.AI.Extensions.OpenAI.MemorySearchToolCallStatus Status { get { throw null; } set { } } + public MemorySearchToolCall(Azure.AI.Extensions.OpenAI.ToolCallStatus status) { } + public System.Collections.Generic.IList Memories { get { throw null; } set { } } + public Azure.AI.Extensions.OpenAI.ToolCallStatus Status { get { throw null; } set { } } protected override Azure.AI.Extensions.OpenAI.AgentResponseItem JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Extensions.OpenAI.AgentResponseItem PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - Azure.AI.Extensions.OpenAI.MemorySearchToolCallResponseItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Extensions.OpenAI.MemorySearchToolCallResponseItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - } - [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] - public readonly partial struct MemorySearchToolCallStatus : System.IEquatable - { - private readonly object _dummy; - private readonly int _dummyPrimitive; - public MemorySearchToolCallStatus(string value) { throw null; } - public static Azure.AI.Extensions.OpenAI.MemorySearchToolCallStatus Completed { get { throw null; } } - public static Azure.AI.Extensions.OpenAI.MemorySearchToolCallStatus Failed { get { throw null; } } - public static Azure.AI.Extensions.OpenAI.MemorySearchToolCallStatus Incomplete { get { throw null; } } - public static Azure.AI.Extensions.OpenAI.MemorySearchToolCallStatus InProgress { get { throw null; } } - public static Azure.AI.Extensions.OpenAI.MemorySearchToolCallStatus Searching { get { throw null; } } - public bool Equals(Azure.AI.Extensions.OpenAI.MemorySearchToolCallStatus other) { throw null; } - public override bool Equals(object obj) { throw null; } - public override int GetHashCode() { throw null; } - public static bool operator ==(Azure.AI.Extensions.OpenAI.MemorySearchToolCallStatus left, Azure.AI.Extensions.OpenAI.MemorySearchToolCallStatus right) { throw null; } - public static implicit operator Azure.AI.Extensions.OpenAI.MemorySearchToolCallStatus (string value) { throw null; } - public static implicit operator Azure.AI.Extensions.OpenAI.MemorySearchToolCallStatus? (string value) { throw null; } - public static bool operator !=(Azure.AI.Extensions.OpenAI.MemorySearchToolCallStatus left, Azure.AI.Extensions.OpenAI.MemorySearchToolCallStatus right) { throw null; } - public override string ToString() { throw null; } - } - public partial class MemoryToolSearchItem : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel - { - public MemoryToolSearchItem(Azure.AI.Extensions.OpenAI.MemoryOutputItem memoryItem) { } - public Azure.AI.Extensions.OpenAI.MemoryOutputItem MemoryItem { get { throw null; } set { } } - protected virtual Azure.AI.Extensions.OpenAI.MemoryToolSearchItem JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - protected virtual Azure.AI.Extensions.OpenAI.MemoryToolSearchItem PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - Azure.AI.Extensions.OpenAI.MemoryToolSearchItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } - Azure.AI.Extensions.OpenAI.MemoryToolSearchItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } - System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Extensions.OpenAI.MemorySearchToolCall System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Extensions.OpenAI.MemorySearchToolCall System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } public partial class OAuthConsentRequestResponseItem : Azure.AI.Extensions.OpenAI.AgentResponseItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { @@ -876,6 +878,19 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class ProceduralMemoryItem : Azure.AI.Extensions.OpenAI.MemoryOutputItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ProceduralMemoryItem(string memoryId, System.DateTimeOffset updatedAt, string scope, string content) { } + protected override Azure.AI.Extensions.OpenAI.MemoryOutputItem JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Extensions.OpenAI.MemoryOutputItem PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Extensions.OpenAI.ProceduralMemoryItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Extensions.OpenAI.ProceduralMemoryItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ProjectConversation : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ProjectConversation() { } @@ -1024,6 +1039,7 @@ public ResponsesA2APreviewTool() { } public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } public string ProjectConnectionId { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Extensions.OpenAI.ResponsesTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Extensions.OpenAI.ResponsesTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1096,6 +1112,7 @@ public ResponsesAzureAISearchTool(Azure.AI.Extensions.OpenAI.ResponsesAzureAISea public Azure.AI.Extensions.OpenAI.ResponsesAzureAISearchToolResource AzureAISearch { get { throw null; } set { } } public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Extensions.OpenAI.ResponsesTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Extensions.OpenAI.ResponsesTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1190,6 +1207,7 @@ public partial class ResponsesAzureFunctionTool : Azure.AI.Extensions.OpenAI.Res { public ResponsesAzureFunctionTool(Azure.AI.Extensions.OpenAI.ResponsesAzureFunctionDefinition azureFunction) { } public Azure.AI.Extensions.OpenAI.ResponsesAzureFunctionDefinition AzureFunction { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Extensions.OpenAI.ResponsesTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Extensions.OpenAI.ResponsesTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1225,6 +1243,7 @@ public ResponsesBingCustomSearchPreviewTool(Azure.AI.Extensions.OpenAI.Responses public Azure.AI.Extensions.OpenAI.ResponsesBingCustomSearchToolParameters BingCustomSearchPreview { get { throw null; } set { } } public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Extensions.OpenAI.ResponsesTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Extensions.OpenAI.ResponsesTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1287,6 +1306,7 @@ public ResponsesBingGroundingTool(Azure.AI.Extensions.OpenAI.ResponsesBingGround public Azure.AI.Extensions.OpenAI.ResponsesBingGroundingSearchToolParameters BingGrounding { get { throw null; } set { } } public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Extensions.OpenAI.ResponsesTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Extensions.OpenAI.ResponsesTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1303,6 +1323,7 @@ public ResponsesBrowserAutomationPreviewTool(Azure.AI.Extensions.OpenAI.Response public Azure.AI.Extensions.OpenAI.ResponsesBrowserAutomationToolParameters BrowserAutomationPreview { get { throw null; } set { } } public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Extensions.OpenAI.ResponsesTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Extensions.OpenAI.ResponsesTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1347,6 +1368,7 @@ public ResponsesCaptureStructuredOutputsTool(Azure.AI.Extensions.OpenAI.Response public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } public Azure.AI.Extensions.OpenAI.ResponsesStructuredOutputDefinition Outputs { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Extensions.OpenAI.ResponsesTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Extensions.OpenAI.ResponsesTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1530,6 +1552,7 @@ public ResponsesFabricIQPreviewTool(string projectConnectionId) { } public System.BinaryData RequireApproval { get { throw null; } set { } } public string ServerLabel { get { throw null; } set { } } public System.Uri ServerUrl { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Extensions.OpenAI.ResponsesTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Extensions.OpenAI.ResponsesTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1558,6 +1581,7 @@ public ResponsesFunctionShellToolParam() { } public string Description { get { throw null; } set { } } public Azure.AI.Extensions.OpenAI.ResponsesFunctionShellToolParamEnvironment Environment { get { throw null; } set { } } public string Name { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Extensions.OpenAI.ResponsesTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Extensions.OpenAI.ResponsesTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1670,6 +1694,7 @@ public partial class ResponsesLocalShellToolParam : Azure.AI.Extensions.OpenAI.R public ResponsesLocalShellToolParam() { } public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Extensions.OpenAI.ResponsesTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Extensions.OpenAI.ResponsesTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1732,6 +1757,7 @@ public ResponsesMemorySearchPreviewTool(string memoryStoreName, string scope) { public string Name { get { throw null; } set { } } public string Scope { get { throw null; } set { } } public Azure.AI.Extensions.OpenAI.ResponsesMemorySearchOptions SearchOptions { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } public int? UpdateDelayInSeconds { get { throw null; } set { } } protected override Azure.AI.Extensions.OpenAI.ResponsesTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1749,6 +1775,7 @@ public ResponsesMicrosoftFabricPreviewTool(Azure.AI.Extensions.OpenAI.ResponsesF public string Description { get { throw null; } set { } } public Azure.AI.Extensions.OpenAI.ResponsesFabricDataAgentToolOptions FabricDataagentPreview { get { throw null; } set { } } public string Name { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Extensions.OpenAI.ResponsesTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Extensions.OpenAI.ResponsesTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1896,6 +1923,7 @@ public partial class ResponsesOpenApiTool : Azure.AI.Extensions.OpenAI.Responses { public ResponsesOpenApiTool(Azure.AI.Extensions.OpenAI.ResponsesOpenApiFunctionDefinition openApi) { } public Azure.AI.Extensions.OpenAI.ResponsesOpenApiFunctionDefinition OpenApi { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Extensions.OpenAI.ResponsesTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Extensions.OpenAI.ResponsesTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1926,6 +1954,7 @@ public ResponsesSharepointPreviewTool(Azure.AI.Extensions.OpenAI.ResponsesSharep public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } public Azure.AI.Extensions.OpenAI.ResponsesSharepointGroundingToolParameters SharepointGroundingPreview { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Extensions.OpenAI.ResponsesTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Extensions.OpenAI.ResponsesTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1986,6 +2015,7 @@ public partial class ResponsesToolboxSearchPreviewTool : Azure.AI.Extensions.Ope public ResponsesToolboxSearchPreviewTool() { } public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Extensions.OpenAI.ResponsesTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Extensions.OpenAI.ResponsesTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2072,6 +2102,7 @@ public ResponsesWebSearchTool() { } public Azure.AI.Extensions.OpenAI.WebSearchToolFilters Filters { get { throw null; } set { } } public string Name { get { throw null; } set { } } public Azure.AI.Extensions.OpenAI.ResponsesWebSearchToolSearchContextSize? SearchContextSize { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } public Azure.AI.Extensions.OpenAI.ResponsesWebSearchApproximateLocation UserLocation { get { throw null; } set { } } protected override Azure.AI.Extensions.OpenAI.ResponsesTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -2095,6 +2126,7 @@ public ResponsesWorkIQPreviewTool(string projectConnectionId) { } public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } public string ProjectConnectionId { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Extensions.OpenAI.ResponsesTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Extensions.OpenAI.ResponsesTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -2144,6 +2176,21 @@ public enum ToolCallStatus Incomplete = 2, Failed = 3, } + public partial class ToolConfig : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ToolConfig() { } + public string AdditionalSearchText { get { throw null; } set { } } + public bool? Pin { get { throw null; } set { } } + protected virtual Azure.AI.Extensions.OpenAI.ToolConfig JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Extensions.OpenAI.ToolConfig PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Extensions.OpenAI.ToolConfig System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Extensions.OpenAI.ToolConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class UserProfileMemoryItem : Azure.AI.Extensions.OpenAI.MemoryOutputItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public UserProfileMemoryItem(string memoryId, System.DateTimeOffset updatedAt, string scope, string content) { } diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/assets.json b/sdk/ai/Azure.AI.Extensions.OpenAI/assets.json index ecfb08a4516d..d3fe48853f24 100644 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/assets.json +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/assets.json @@ -1,7 +1,7 @@ { "AssetsFileName": "assets.json", "AssetsRepo": "Azure/azure-sdk-assets", - "Tag": "net/ai/Azure.AI.Extensions.OpenAI_fd3d0ddf1b", + "Tag": "net/ai/Azure.AI.Extensions.OpenAI_ff45592121", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/ai/Azure.AI.Extensions.OpenAI" } diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Custom/CodeGenStubs.Projects.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Custom/CodeGenStubs.Projects.cs index 345358e7e933..0a10d3fee22c 100644 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Custom/CodeGenStubs.Projects.cs +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Custom/CodeGenStubs.Projects.cs @@ -19,4 +19,3 @@ internal partial class InternalProjectsClient [CodeGenType("InternalProjectsClientOptions")] internal partial class InternalProjectsClientOptions { } [CodeGenType("ConversationList")] internal partial class InternalConversationList { } -[CodeGenType("MemorySearchItem")] public partial class MemoryToolSearchItem { } diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Custom/CodeGenStubs.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Custom/CodeGenStubs.cs index ddd666afb790..cd42d48bfba7 100644 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Custom/CodeGenStubs.cs +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Custom/CodeGenStubs.cs @@ -6,6 +6,4 @@ namespace Azure.AI.Extensions.OpenAI; // Public type renames - -[CodeGenType("MemorySearchToolCallItemResourceStatus")] public readonly partial struct MemorySearchToolCallStatus { } [CodeGenType("WorkflowActionOutputItemStatus")] public readonly partial struct AgentWorkflowPreviewActionStatus { } diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ProjectConversationCreationOptions.Serialization.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Custom/OpenAI/ProjectConversationCreationOptionsWorkaround.cs similarity index 85% rename from sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ProjectConversationCreationOptions.Serialization.cs rename to sdk/ai/Azure.AI.Extensions.OpenAI/src/Custom/OpenAI/ProjectConversationCreationOptionsWorkaround.cs index 06a19872dbe8..be4d731933df 100644 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ProjectConversationCreationOptions.Serialization.cs +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Custom/OpenAI/ProjectConversationCreationOptionsWorkaround.cs @@ -1,7 +1,8 @@ -// - -#nullable disable +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// This file is a workaround for code generator issue https://github.com/Azure/typespec-azure/issues/4438 +// TODO: Remove this file once the issue is resolved and regenrate the code. using System; using System.ClientModel; using System.ClientModel.Primitives; @@ -125,5 +126,19 @@ internal static ProjectConversationCreationOptions DeserializeProjectConversatio } return new ProjectConversationCreationOptions(internalMetadata, items ?? new ChangeTrackingList(), additionalBinaryDataProperties); } + + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + /// + /// + /// Keeps track of any properties unknown to the library. + internal ProjectConversationCreationOptions(InternalMetadataContainer internalMetadata, IList items, IDictionary additionalBinaryDataProperties) + { + InternalMetadata = internalMetadata; + Items = items; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } } } diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Conversations.RestClient.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Conversations.RestClient.cs index 34f55ea20a92..8c8954b56c0f 100644 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Conversations.RestClient.cs +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Conversations.RestClient.cs @@ -13,13 +13,17 @@ internal partial class Conversations private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 ??= PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); - internal PipelineMessage CreateCreateConversationRequest(BinaryContent content, RequestOptions options) + internal PipelineMessage CreateCreateConversationRequest(BinaryContent content, string userIsolationKey, RequestOptions options) { ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/openai/v1/conversations", false); PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier200); PipelineRequest request = message.Request; + if (userIsolationKey != null) + { + request.Headers.Set("x-ms-user-isolation-key", userIsolationKey); + } request.Headers.Set("Content-Type", "application/json"); request.Headers.Set("Accept", "application/json"); request.Content = content; @@ -27,7 +31,7 @@ internal PipelineMessage CreateCreateConversationRequest(BinaryContent content, return message; } - internal PipelineMessage CreateUpdateConversationRequest(string conversationId, BinaryContent content, RequestOptions options) + internal PipelineMessage CreateUpdateConversationRequest(string conversationId, BinaryContent content, string userIsolationKey, RequestOptions options) { ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); @@ -35,6 +39,10 @@ internal PipelineMessage CreateUpdateConversationRequest(string conversationId, uri.AppendPath(conversationId, true); PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier200); PipelineRequest request = message.Request; + if (userIsolationKey != null) + { + request.Headers.Set("x-ms-user-isolation-key", userIsolationKey); + } request.Headers.Set("Content-Type", "application/json"); request.Headers.Set("Accept", "application/json"); request.Content = content; diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Conversations.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Conversations.cs index 18231271c110..16510d04ff10 100644 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Conversations.cs +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Conversations.cs @@ -5,6 +5,8 @@ using System; using System.ClientModel; using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Linq; using System.Threading; using System.Threading.Tasks; @@ -40,12 +42,13 @@ internal Conversations(ClientPipeline pipeline, Uri endpoint) /// /// /// The content to send as the body of the request. + /// Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user. /// The request options, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. - public virtual ClientResult CreateConversation(BinaryContent content, RequestOptions options = null) + public virtual ClientResult CreateConversation(BinaryContent content, string userIsolationKey = default, RequestOptions options = null) { - using PipelineMessage message = CreateCreateConversationRequest(content, options); + using PipelineMessage message = CreateCreateConversationRequest(content, userIsolationKey, options); return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } @@ -58,15 +61,42 @@ public virtual ClientResult CreateConversation(BinaryContent content, RequestOpt /// /// /// The content to send as the body of the request. + /// Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user. /// The request options, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. - public virtual async Task CreateConversationAsync(BinaryContent content, RequestOptions options = null) + public virtual async Task CreateConversationAsync(BinaryContent content, string userIsolationKey = default, RequestOptions options = null) { - using PipelineMessage message = CreateCreateConversationRequest(content, options); + using PipelineMessage message = CreateCreateConversationRequest(content, userIsolationKey, options); return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } + /// Create a conversation. + /// + /// + /// Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user. + /// The cancellation token that can be used to cancel the operation. + /// Service returned a non-success status code. + public virtual ClientResult CreateConversation(InternalMetadataContainer metadata = default, IEnumerable items = default, string userIsolationKey = default, CancellationToken cancellationToken = default) + { + CreateConversationRequest spreadModel = new CreateConversationRequest(metadata, items?.ToList() as IList ?? new ChangeTrackingList(), default); + ClientResult result = CreateConversation(spreadModel, userIsolationKey, cancellationToken.ToRequestOptions()); + return ClientResult.FromValue((ProjectConversation)result, result.GetRawResponse()); + } + + /// Create a conversation. + /// + /// + /// Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user. + /// The cancellation token that can be used to cancel the operation. + /// Service returned a non-success status code. + public virtual async Task> CreateConversationAsync(InternalMetadataContainer metadata = default, IEnumerable items = default, string userIsolationKey = default, CancellationToken cancellationToken = default) + { + CreateConversationRequest spreadModel = new CreateConversationRequest(metadata, items?.ToList() as IList ?? new ChangeTrackingList(), default); + ClientResult result = await CreateConversationAsync(spreadModel, userIsolationKey, cancellationToken.ToRequestOptions()).ConfigureAwait(false); + return ClientResult.FromValue((ProjectConversation)result, result.GetRawResponse()); + } + /// /// [Protocol Method] Update a conversation. /// @@ -77,12 +107,13 @@ public virtual async Task CreateConversationAsync(BinaryContent co /// /// The id of the conversation to update. /// The content to send as the body of the request. + /// Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user. /// The request options, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. - public virtual ClientResult UpdateConversation(string conversationId, BinaryContent content, RequestOptions options = null) + public virtual ClientResult UpdateConversation(string conversationId, BinaryContent content, string userIsolationKey = default, RequestOptions options = null) { - using PipelineMessage message = CreateUpdateConversationRequest(conversationId, content, options); + using PipelineMessage message = CreateUpdateConversationRequest(conversationId, content, userIsolationKey, options); return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } @@ -96,12 +127,13 @@ public virtual ClientResult UpdateConversation(string conversationId, BinaryCont /// /// The id of the conversation to update. /// The content to send as the body of the request. + /// Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user. /// The request options, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. - public virtual async Task UpdateConversationAsync(string conversationId, BinaryContent content, RequestOptions options = null) + public virtual async Task UpdateConversationAsync(string conversationId, BinaryContent content, string userIsolationKey = default, RequestOptions options = null) { - using PipelineMessage message = CreateUpdateConversationRequest(conversationId, content, options); + using PipelineMessage message = CreateUpdateConversationRequest(conversationId, content, userIsolationKey, options); return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } @@ -111,12 +143,13 @@ public virtual async Task UpdateConversationAsync(string conversat /// Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. /// Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters. /// + /// Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user. /// The cancellation token that can be used to cancel the operation. /// Service returned a non-success status code. - public virtual ClientResult UpdateConversation(string conversationId, InternalMetadataContainer metadata, CancellationToken cancellationToken = default) + public virtual ClientResult UpdateConversation(string conversationId, InternalMetadataContainer metadata, string userIsolationKey = default, CancellationToken cancellationToken = default) { UpdateConversationRequest spreadModel = new UpdateConversationRequest(metadata, default); - ClientResult result = UpdateConversation(conversationId, spreadModel, cancellationToken.ToRequestOptions()); + ClientResult result = UpdateConversation(conversationId, spreadModel, userIsolationKey, cancellationToken.ToRequestOptions()); return ClientResult.FromValue((ProjectConversation)result, result.GetRawResponse()); } @@ -126,12 +159,13 @@ public virtual ClientResult UpdateConversation(string conve /// Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. /// Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters. /// + /// Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user. /// The cancellation token that can be used to cancel the operation. /// Service returned a non-success status code. - public virtual async Task> UpdateConversationAsync(string conversationId, InternalMetadataContainer metadata, CancellationToken cancellationToken = default) + public virtual async Task> UpdateConversationAsync(string conversationId, InternalMetadataContainer metadata, string userIsolationKey = default, CancellationToken cancellationToken = default) { UpdateConversationRequest spreadModel = new UpdateConversationRequest(metadata, default); - ClientResult result = await UpdateConversationAsync(conversationId, spreadModel, cancellationToken.ToRequestOptions()).ConfigureAwait(false); + ClientResult result = await UpdateConversationAsync(conversationId, spreadModel, userIsolationKey, cancellationToken.ToRequestOptions()).ConfigureAwait(false); return ClientResult.FromValue((ProjectConversation)result, result.GetRawResponse()); } } diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/ExtensionsOpenAIModelFactory.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/ExtensionsOpenAIModelFactory.cs index bebffdd7d053..d3e6c4b238cc 100644 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/ExtensionsOpenAIModelFactory.cs +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/ExtensionsOpenAIModelFactory.cs @@ -52,11 +52,39 @@ public static ResponsesTool ResponsesTool(string @type = default) /// The input definition information for a bing grounding search tool as used to configure an agent. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// /// The bing grounding search tool parameters. /// A new instance for mocking. - public static ResponsesBingGroundingTool ResponsesBingGroundingTool(string name = default, string description = default, ResponsesBingGroundingSearchToolParameters bingGrounding = default) + public static ResponsesBingGroundingTool ResponsesBingGroundingTool(string name = default, string description = default, IDictionary toolConfigs = default, ResponsesBingGroundingSearchToolParameters bingGrounding = default) + { + toolConfigs ??= new ChangeTrackingDictionary(); + + return new ResponsesBingGroundingTool( + ToolType.BingGrounding, + additionalBinaryDataProperties: null, + name, + description, + toolConfigs, + bingGrounding); + } + + /// Per-tool configuration that controls tool visibility and search behavior. + /// + /// When true, the tool is always included in agent context and visible in `tools/list`. + /// When false (default), the tool is hidden from `tools/list` and only discoverable via `tool_search`. + /// + /// + /// Additional text indexed for tool_search. Supplements the native tool description + /// to improve discoverability. Does not alter `tools/list` output. + /// + /// A new instance for mocking. + public static ToolConfig ToolConfig(bool? pin = default, string additionalSearchText = default) { - return new ResponsesBingGroundingTool(ToolType.BingGrounding, additionalBinaryDataProperties: null, name, description, bingGrounding); + return new ToolConfig(pin, additionalSearchText, additionalBinaryDataProperties: null); } /// The bing grounding search tool parameters. @@ -93,11 +121,24 @@ public static ResponsesBingGroundingSearchConfiguration ResponsesBingGroundingSe /// The input definition information for a Microsoft Fabric tool as used to configure an agent. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// /// The fabric data agent tool parameters. /// A new instance for mocking. - public static ResponsesMicrosoftFabricPreviewTool ResponsesMicrosoftFabricPreviewTool(string name = default, string description = default, ResponsesFabricDataAgentToolOptions fabricDataagentPreview = default) + public static ResponsesMicrosoftFabricPreviewTool ResponsesMicrosoftFabricPreviewTool(string name = default, string description = default, IDictionary toolConfigs = default, ResponsesFabricDataAgentToolOptions fabricDataagentPreview = default) { - return new ResponsesMicrosoftFabricPreviewTool(ToolType.FabricDataagentPreview, additionalBinaryDataProperties: null, name, description, fabricDataagentPreview); + toolConfigs ??= new ChangeTrackingDictionary(); + + return new ResponsesMicrosoftFabricPreviewTool( + ToolType.FabricDataagentPreview, + additionalBinaryDataProperties: null, + name, + description, + toolConfigs, + fabricDataagentPreview); } /// The fabric data agent tool parameters. @@ -124,11 +165,24 @@ public static ResponsesToolProjectConnection ResponsesToolProjectConnection(stri /// The input definition information for a sharepoint tool as used to configure an agent. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// /// The sharepoint grounding tool parameters. /// A new instance for mocking. - public static ResponsesSharepointPreviewTool ResponsesSharepointPreviewTool(string name = default, string description = default, ResponsesSharepointGroundingToolParameters sharepointGroundingPreview = default) + public static ResponsesSharepointPreviewTool ResponsesSharepointPreviewTool(string name = default, string description = default, IDictionary toolConfigs = default, ResponsesSharepointGroundingToolParameters sharepointGroundingPreview = default) { - return new ResponsesSharepointPreviewTool(ToolType.SharepointGroundingPreview, additionalBinaryDataProperties: null, name, description, sharepointGroundingPreview); + toolConfigs ??= new ChangeTrackingDictionary(); + + return new ResponsesSharepointPreviewTool( + ToolType.SharepointGroundingPreview, + additionalBinaryDataProperties: null, + name, + description, + toolConfigs, + sharepointGroundingPreview); } /// The sharepoint grounding tool parameters. @@ -147,11 +201,24 @@ public static ResponsesSharepointGroundingToolParameters ResponsesSharepointGrou /// The input definition information for an Azure AI search tool as used to configure an agent. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// /// The azure ai search index resource. /// A new instance for mocking. - public static ResponsesAzureAISearchTool ResponsesAzureAISearchTool(string name = default, string description = default, ResponsesAzureAISearchToolResource azureAISearch = default) + public static ResponsesAzureAISearchTool ResponsesAzureAISearchTool(string name = default, string description = default, IDictionary toolConfigs = default, ResponsesAzureAISearchToolResource azureAISearch = default) { - return new ResponsesAzureAISearchTool(ToolType.AzureAiSearch, additionalBinaryDataProperties: null, name, description, azureAISearch); + toolConfigs ??= new ChangeTrackingDictionary(); + + return new ResponsesAzureAISearchTool( + ToolType.AzureAiSearch, + additionalBinaryDataProperties: null, + name, + description, + toolConfigs, + azureAISearch); } /// A set of index resources used by the `azure_ai_search` tool. @@ -189,10 +256,17 @@ public static ResponsesAISearchIndexResource ResponsesAISearchIndexResource(stri /// The input definition information for an OpenAPI tool as used to configure an agent. /// The openapi function definition. + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// /// A new instance for mocking. - public static ResponsesOpenApiTool ResponsesOpenApiTool(ResponsesOpenApiFunctionDefinition openApi = default) + public static ResponsesOpenApiTool ResponsesOpenApiTool(ResponsesOpenApiFunctionDefinition openApi = default, IDictionary toolConfigs = default) { - return new ResponsesOpenApiTool(ToolType.Openapi, additionalBinaryDataProperties: null, openApi); + toolConfigs ??= new ChangeTrackingDictionary(); + + return new ResponsesOpenApiTool(ToolType.Openapi, additionalBinaryDataProperties: null, openApi, toolConfigs); } /// The input definition information for an openapi function. @@ -284,11 +358,24 @@ public static ResponsesOpenApiFunctionDefinitionFunction ResponsesOpenApiFunctio /// The input definition information for a Bing custom search tool as used to configure an agent. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// /// The bing custom search tool parameters. /// A new instance for mocking. - public static ResponsesBingCustomSearchPreviewTool ResponsesBingCustomSearchPreviewTool(string name = default, string description = default, ResponsesBingCustomSearchToolParameters bingCustomSearchPreview = default) + public static ResponsesBingCustomSearchPreviewTool ResponsesBingCustomSearchPreviewTool(string name = default, string description = default, IDictionary toolConfigs = default, ResponsesBingCustomSearchToolParameters bingCustomSearchPreview = default) { - return new ResponsesBingCustomSearchPreviewTool(ToolType.BingCustomSearchPreview, additionalBinaryDataProperties: null, name, description, bingCustomSearchPreview); + toolConfigs ??= new ChangeTrackingDictionary(); + + return new ResponsesBingCustomSearchPreviewTool( + ToolType.BingCustomSearchPreview, + additionalBinaryDataProperties: null, + name, + description, + toolConfigs, + bingCustomSearchPreview); } /// The bing custom search tool parameters. @@ -327,11 +414,24 @@ public static ResponsesBingCustomSearchConfiguration ResponsesBingCustomSearchCo /// The input definition information for a Browser Automation Tool, as used to configure an Agent. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// /// The Browser Automation Tool parameters. /// A new instance for mocking. - public static ResponsesBrowserAutomationPreviewTool ResponsesBrowserAutomationPreviewTool(string name = default, string description = default, ResponsesBrowserAutomationToolParameters browserAutomationPreview = default) + public static ResponsesBrowserAutomationPreviewTool ResponsesBrowserAutomationPreviewTool(string name = default, string description = default, IDictionary toolConfigs = default, ResponsesBrowserAutomationToolParameters browserAutomationPreview = default) { - return new ResponsesBrowserAutomationPreviewTool(ToolType.BrowserAutomationPreview, additionalBinaryDataProperties: null, name, description, browserAutomationPreview); + toolConfigs ??= new ChangeTrackingDictionary(); + + return new ResponsesBrowserAutomationPreviewTool( + ToolType.BrowserAutomationPreview, + additionalBinaryDataProperties: null, + name, + description, + toolConfigs, + browserAutomationPreview); } /// Definition of input parameters for the Browser Automation Tool. @@ -352,10 +452,17 @@ public static ResponsesBrowserAutomationToolConnectionParameters ResponsesBrowse /// The input definition information for an Azure Function Tool, as used to configure an Agent. /// The Azure Function Tool definition. + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// /// A new instance for mocking. - public static ResponsesAzureFunctionTool ResponsesAzureFunctionTool(ResponsesAzureFunctionDefinition azureFunction = default) + public static ResponsesAzureFunctionTool ResponsesAzureFunctionTool(ResponsesAzureFunctionDefinition azureFunction = default, IDictionary toolConfigs = default) { - return new ResponsesAzureFunctionTool(ToolType.AzureFunction, additionalBinaryDataProperties: null, azureFunction); + toolConfigs ??= new ChangeTrackingDictionary(); + + return new ResponsesAzureFunctionTool(ToolType.AzureFunction, additionalBinaryDataProperties: null, azureFunction, toolConfigs); } /// The definition of Azure function. @@ -400,11 +507,24 @@ public static ResponsesAzureFunctionStorageQueue ResponsesAzureFunctionStorageQu /// A tool for capturing structured outputs. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// /// The structured outputs to capture from the model. /// A new instance for mocking. - public static ResponsesCaptureStructuredOutputsTool ResponsesCaptureStructuredOutputsTool(string name = default, string description = default, ResponsesStructuredOutputDefinition outputs = default) + public static ResponsesCaptureStructuredOutputsTool ResponsesCaptureStructuredOutputsTool(string name = default, string description = default, IDictionary toolConfigs = default, ResponsesStructuredOutputDefinition outputs = default) { - return new ResponsesCaptureStructuredOutputsTool(ToolType.CaptureStructuredOutputs, additionalBinaryDataProperties: null, name, description, outputs); + toolConfigs ??= new ChangeTrackingDictionary(); + + return new ResponsesCaptureStructuredOutputsTool( + ToolType.CaptureStructuredOutputs, + additionalBinaryDataProperties: null, + name, + description, + toolConfigs, + outputs); } /// A structured output that can be produced by the agent. @@ -423,6 +543,11 @@ public static ResponsesStructuredOutputDefinition ResponsesStructuredOutputDefin /// An agent implementing the A2A protocol. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// /// Base URL of the agent. /// /// The path to the agent card relative to the `base_url`. @@ -433,13 +558,16 @@ public static ResponsesStructuredOutputDefinition ResponsesStructuredOutputDefin /// The connection stores authentication and other connection details needed to connect to the A2A server. /// /// A new instance for mocking. - public static ResponsesA2APreviewTool ResponsesA2APreviewTool(string name = default, string description = default, Uri baseUrl = default, string agentCardPath = default, string projectConnectionId = default) + public static ResponsesA2APreviewTool ResponsesA2APreviewTool(string name = default, string description = default, IDictionary toolConfigs = default, Uri baseUrl = default, string agentCardPath = default, string projectConnectionId = default) { + toolConfigs ??= new ChangeTrackingDictionary(); + return new ResponsesA2APreviewTool( ToolType.A2aPreview, additionalBinaryDataProperties: null, name, description, + toolConfigs, baseUrl, agentCardPath, projectConnectionId); @@ -449,10 +577,23 @@ public static ResponsesA2APreviewTool ResponsesA2APreviewTool(string name = defa /// The ID of the WorkIQ project connection. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// /// A new instance for mocking. - public static ResponsesWorkIQPreviewTool ResponsesWorkIQPreviewTool(string projectConnectionId = default, string name = default, string description = default) + public static ResponsesWorkIQPreviewTool ResponsesWorkIQPreviewTool(string projectConnectionId = default, string name = default, string description = default, IDictionary toolConfigs = default) { - return new ResponsesWorkIQPreviewTool(ToolType.WorkIqPreview, additionalBinaryDataProperties: null, projectConnectionId, name, description); + toolConfigs ??= new ChangeTrackingDictionary(); + + return new ResponsesWorkIQPreviewTool( + ToolType.WorkIqPreview, + additionalBinaryDataProperties: null, + projectConnectionId, + name, + description, + toolConfigs); } /// A FabricIQ server-side tool. @@ -462,9 +603,16 @@ public static ResponsesWorkIQPreviewTool ResponsesWorkIQPreviewTool(string proje /// (Optional) Whether the agent requires approval before executing actions. Default is always. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// /// A new instance for mocking. - public static ResponsesFabricIQPreviewTool ResponsesFabricIQPreviewTool(string projectConnectionId = default, string serverLabel = default, Uri serverUrl = default, BinaryData requireApproval = default, string name = default, string description = default) + public static ResponsesFabricIQPreviewTool ResponsesFabricIQPreviewTool(string projectConnectionId = default, string serverLabel = default, Uri serverUrl = default, BinaryData requireApproval = default, string name = default, string description = default, IDictionary toolConfigs = default) { + toolConfigs ??= new ChangeTrackingDictionary(); + return new ResponsesFabricIQPreviewTool( ToolType.FabricIqPreview, additionalBinaryDataProperties: null, @@ -473,7 +621,8 @@ public static ResponsesFabricIQPreviewTool ResponsesFabricIQPreviewTool(string p serverUrl, requireApproval, name, - description); + description, + toolConfigs); } /// The ResponsesMCPToolRequireApproval. @@ -503,6 +652,11 @@ public static ResponsesMCPToolFilter ResponsesMCPToolFilter(IEnumerable /// A tool for integrating memories into the agent. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// /// The name of the memory store to use. /// /// The namespace used to group and isolate memories, such as a user ID. @@ -512,13 +666,16 @@ public static ResponsesMCPToolFilter ResponsesMCPToolFilter(IEnumerable /// Options for searching the memory store. /// Time to wait before updating memories after inactivity (seconds). Default 300. /// A new instance for mocking. - public static ResponsesMemorySearchPreviewTool ResponsesMemorySearchPreviewTool(string name = default, string description = default, string memoryStoreName = default, string scope = default, ResponsesMemorySearchOptions searchOptions = default, int? updateDelayInSeconds = default) + public static ResponsesMemorySearchPreviewTool ResponsesMemorySearchPreviewTool(string name = default, string description = default, IDictionary toolConfigs = default, string memoryStoreName = default, string scope = default, ResponsesMemorySearchOptions searchOptions = default, int? updateDelayInSeconds = default) { + toolConfigs ??= new ChangeTrackingDictionary(); + return new ResponsesMemorySearchPreviewTool( ToolType.MemorySearchPreview, additionalBinaryDataProperties: null, name, description, + toolConfigs, memoryStoreName, scope, searchOptions, @@ -540,10 +697,17 @@ public static ResponsesMemorySearchOptions ResponsesMemorySearchOptions(int? max /// /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// /// A new instance for mocking. - public static ResponsesToolboxSearchPreviewTool ResponsesToolboxSearchPreviewTool(string name = default, string description = default) + public static ResponsesToolboxSearchPreviewTool ResponsesToolboxSearchPreviewTool(string name = default, string description = default, IDictionary toolConfigs = default) { - return new ResponsesToolboxSearchPreviewTool(ToolType.ToolboxSearchPreview, additionalBinaryDataProperties: null, name, description); + toolConfigs ??= new ChangeTrackingDictionary(); + + return new ResponsesToolboxSearchPreviewTool(ToolType.ToolboxSearchPreview, additionalBinaryDataProperties: null, name, description, toolConfigs); } /// Automatic Code Interpreter Tool Parameters. @@ -604,13 +768,20 @@ public static ResponsesContainerNetworkPolicyDomainSecretParam ResponsesContaine /// High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// /// /// The project connections attached to this tool. There can be a maximum of 1 connection /// resource attached to the tool. /// /// A new instance for mocking. - public static ResponsesWebSearchTool ResponsesWebSearchTool(WebSearchToolFilters filters = default, ResponsesWebSearchApproximateLocation userLocation = default, ResponsesWebSearchToolSearchContextSize? searchContextSize = default, string name = default, string description = default, ResponsesWebSearchConfiguration customSearchConfiguration = default) + public static ResponsesWebSearchTool ResponsesWebSearchTool(WebSearchToolFilters filters = default, ResponsesWebSearchApproximateLocation userLocation = default, ResponsesWebSearchToolSearchContextSize? searchContextSize = default, string name = default, string description = default, IDictionary toolConfigs = default, ResponsesWebSearchConfiguration customSearchConfiguration = default) { + toolConfigs ??= new ChangeTrackingDictionary(); + return new ResponsesWebSearchTool( ToolType.WebSearch, additionalBinaryDataProperties: null, @@ -619,6 +790,7 @@ public static ResponsesWebSearchTool ResponsesWebSearchTool(WebSearchToolFilters searchContextSize, name, description, + toolConfigs, customSearchConfiguration); } @@ -661,20 +833,40 @@ public static ResponsesWebSearchConfiguration ResponsesWebSearchConfiguration(st /// Local shell tool. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// /// A new instance for mocking. - public static ResponsesLocalShellToolParam ResponsesLocalShellToolParam(string name = default, string description = default) + public static ResponsesLocalShellToolParam ResponsesLocalShellToolParam(string name = default, string description = default, IDictionary toolConfigs = default) { - return new ResponsesLocalShellToolParam(ToolType.LocalShell, additionalBinaryDataProperties: null, name, description); + toolConfigs ??= new ChangeTrackingDictionary(); + + return new ResponsesLocalShellToolParam(ToolType.LocalShell, additionalBinaryDataProperties: null, name, description, toolConfigs); } /// Shell tool. /// /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// /// A new instance for mocking. - public static ResponsesFunctionShellToolParam ResponsesFunctionShellToolParam(ResponsesFunctionShellToolParamEnvironment environment = default, string name = default, string description = default) + public static ResponsesFunctionShellToolParam ResponsesFunctionShellToolParam(ResponsesFunctionShellToolParamEnvironment environment = default, string name = default, string description = default, IDictionary toolConfigs = default) { - return new ResponsesFunctionShellToolParam(ToolType.Shell, additionalBinaryDataProperties: null, environment, name, description); + toolConfigs ??= new ChangeTrackingDictionary(); + + return new ResponsesFunctionShellToolParam( + ToolType.Shell, + additionalBinaryDataProperties: null, + environment, + name, + description, + toolConfigs); } /// @@ -909,7 +1101,7 @@ public static AgentStructuredOutputsResponseItem AgentStructuredOutputsResponseI /// /// The AgentResponseItem. - /// Please note this is the abstract base class. The derived classes available for instantiation are: , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . + /// Please note this is the abstract base class. The derived classes available for instantiation are: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . /// /// /// @@ -965,93 +1157,6 @@ public static OAuthConsentRequestResponseItem OAuthConsentRequestResponseItem(st serverLabel); } - /// The MemorySearchToolCallResponseItem. - /// - /// The agent that created the item. - /// The response on which the item is created. - /// - /// The status of the memory search tool call. One of `in_progress`, - /// `searching`, `completed`, `incomplete` or `failed`, - /// - /// The results returned from the memory search. - /// A new instance for mocking. - public static MemorySearchToolCallResponseItem MemorySearchToolCallResponseItem(string id = default, AgentReference agentReference = default, string responseId = default, MemorySearchToolCallStatus status = default, IEnumerable results = default) - { - results ??= new ChangeTrackingList(); - - return new MemorySearchToolCallResponseItem( - AgentResponseItemKind.MemorySearchCall, - id, - agentReference, - responseId, - additionalBinaryDataProperties: null, - status, - results.ToList()); - } - - /// A retrieved memory item from memory search. - /// Retrieved memory item. - /// A new instance for mocking. - public static MemoryToolSearchItem MemoryToolSearchItem(MemoryOutputItem memoryItem = default) - { - return new MemoryToolSearchItem(memoryItem, additionalBinaryDataProperties: null); - } - - /// - /// A single memory item stored in the memory store, containing content and metadata. - /// Please note this is the abstract base class. The derived classes available for instantiation are: and . - /// - /// The unique ID of the memory item. - /// The last update time of the memory item. - /// The namespace that logically groups and isolates memories, such as a user ID. - /// The content of the memory. - /// The kind of the memory item. - /// A new instance for mocking. - public static MemoryOutputItem MemoryOutputItem(string memoryId = default, DateTimeOffset updatedAt = default, string scope = default, string content = default, string kind = default) - { - return new UnknownMemoryOutputItem( - memoryId, - updatedAt, - scope, - content, - new MemoryItemKind(kind), - additionalBinaryDataProperties: null); - } - - /// A memory item specifically containing user profile information extracted from conversations, such as preferences, interests, and personal details. - /// The unique ID of the memory item. - /// The last update time of the memory item. - /// The namespace that logically groups and isolates memories, such as a user ID. - /// The content of the memory. - /// A new instance for mocking. - public static UserProfileMemoryItem UserProfileMemoryItem(string memoryId = default, DateTimeOffset updatedAt = default, string scope = default, string content = default) - { - return new UserProfileMemoryItem( - memoryId, - updatedAt, - scope, - content, - MemoryItemKind.UserProfile, - additionalBinaryDataProperties: null); - } - - /// A memory item containing a summary extracted from conversations. - /// The unique ID of the memory item. - /// The last update time of the memory item. - /// The namespace that logically groups and isolates memories, such as a user ID. - /// The content of the memory. - /// A new instance for mocking. - public static ChatSummaryMemoryItem ChatSummaryMemoryItem(string memoryId = default, DateTimeOffset updatedAt = default, string scope = default, string content = default) - { - return new ChatSummaryMemoryItem( - memoryId, - updatedAt, - scope, - content, - MemoryItemKind.ChatSummary, - additionalBinaryDataProperties: null); - } - /// A Bing grounding tool call. /// /// The agent that created the item. @@ -1442,6 +1547,139 @@ public static A2AToolCallOutput A2AToolCallOutput(string id = default, AgentRefe status); } + /// A memory search tool call. + /// + /// The agent that created the item. + /// The response on which the item is created. + /// The status of the tool call. + /// The results returned from the memory search. + /// A new instance for mocking. + public static MemorySearchToolCall MemorySearchToolCall(string id = default, AgentReference agentReference = default, string responseId = default, ToolCallStatus status = default, IEnumerable memories = default) + { + memories ??= new ChangeTrackingList(); + + return new MemorySearchToolCall( + AgentResponseItemKind.MemorySearchCall, + id, + agentReference, + responseId, + additionalBinaryDataProperties: null, + status, + memories.ToList()); + } + + /// + /// A single memory item stored in the memory store, containing content and metadata. + /// Please note this is the abstract base class. The derived classes available for instantiation are: , , and . + /// + /// The unique ID of the memory item. + /// The last update time of the memory item. + /// The namespace that logically groups and isolates memories, such as a user ID. + /// The content of the memory. + /// The kind of the memory item. + /// A new instance for mocking. + public static MemoryOutputItem MemoryOutputItem(string memoryId = default, DateTimeOffset updatedAt = default, string scope = default, string content = default, string kind = default) + { + return new UnknownMemoryOutputItem( + memoryId, + updatedAt, + scope, + content, + new MemoryItemKind(kind), + additionalBinaryDataProperties: null); + } + + /// A memory item specifically containing user profile information extracted from conversations, such as preferences, interests, and personal details. + /// The unique ID of the memory item. + /// The last update time of the memory item. + /// The namespace that logically groups and isolates memories, such as a user ID. + /// The content of the memory. + /// A new instance for mocking. + public static UserProfileMemoryItem UserProfileMemoryItem(string memoryId = default, DateTimeOffset updatedAt = default, string scope = default, string content = default) + { + return new UserProfileMemoryItem( + memoryId, + updatedAt, + scope, + content, + MemoryItemKind.UserProfile, + additionalBinaryDataProperties: null); + } + + /// A memory item containing a summary extracted from conversations. + /// The unique ID of the memory item. + /// The last update time of the memory item. + /// The namespace that logically groups and isolates memories, such as a user ID. + /// The content of the memory. + /// A new instance for mocking. + public static ChatSummaryMemoryItem ChatSummaryMemoryItem(string memoryId = default, DateTimeOffset updatedAt = default, string scope = default, string content = default) + { + return new ChatSummaryMemoryItem( + memoryId, + updatedAt, + scope, + content, + MemoryItemKind.ChatSummary, + additionalBinaryDataProperties: null); + } + + /// A memory item containing a procedure extracted from conversations. + /// The unique ID of the memory item. + /// The last update time of the memory item. + /// The namespace that logically groups and isolates memories, such as a user ID. + /// The content of the memory. + /// A new instance for mocking. + public static ProceduralMemoryItem ProceduralMemoryItem(string memoryId = default, DateTimeOffset updatedAt = default, string scope = default, string content = default) + { + return new ProceduralMemoryItem( + memoryId, + updatedAt, + scope, + content, + MemoryItemKind.Procedural, + additionalBinaryDataProperties: null); + } + + /// A memory command tool call. + /// + /// The agent that created the item. + /// The response on which the item is created. + /// The unique ID of the tool call generated by the model. + /// A JSON string of the arguments to pass to the tool, including `action` (`remember` or `forget`) and `content`. + /// The status of the tool call. + /// A new instance for mocking. + public static MemoryCommandToolCall MemoryCommandToolCall(string id = default, AgentReference agentReference = default, string responseId = default, string callId = default, string arguments = default, ToolCallStatus status = default) + { + return new MemoryCommandToolCall( + AgentResponseItemKind.MemoryCommandPreviewCall, + id, + agentReference, + responseId, + additionalBinaryDataProperties: null, + callId, + arguments, + status); + } + + /// The output of a memory command tool call. + /// + /// The agent that created the item. + /// The response on which the item is created. + /// The unique ID of the tool call generated by the model. + /// The status of the tool call. + /// A new instance for mocking. + public static MemoryCommandToolCallOutput MemoryCommandToolCallOutput(string id = default, AgentReference agentReference = default, string responseId = default, string callId = default, ToolCallStatus status = default) + { + return new MemoryCommandToolCallOutput( + AgentResponseItemKind.MemoryCommandPreviewCallOutput, + id, + agentReference, + responseId, + additionalBinaryDataProperties: null, + callId, + status); + } + /// Function tool call output. /// /// The agent that created the item. diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/AgentResponseItem.Serialization.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/AgentResponseItem.Serialization.cs index 4242bd4be270..f9794ef79a55 100644 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/AgentResponseItem.Serialization.cs +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/AgentResponseItem.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.AI.Extensions.OpenAI { /// /// The AgentResponseItem. - /// Please note this is the abstract base class. The derived classes available for instantiation are: , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . + /// Please note this is the abstract base class. The derived classes available for instantiation are: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . /// [PersistableModelProxy(typeof(UnknownAgentResponseItem))] public abstract partial class AgentResponseItem : IJsonModel @@ -147,8 +147,6 @@ internal static AgentResponseItem DeserializeAgentResponseItem(JsonElement eleme return AgentWorkflowPreviewActionResponseItem.DeserializeAgentWorkflowPreviewActionResponseItem(element, options); case "oauth_consent_request": return OAuthConsentRequestResponseItem.DeserializeOAuthConsentRequestResponseItem(element, options); - case "memory_search_call": - return MemorySearchToolCallResponseItem.DeserializeMemorySearchToolCallResponseItem(element, options); case "bing_grounding_call": return BingGroundingToolCall.DeserializeBingGroundingToolCall(element, options); case "bing_grounding_call_output": @@ -185,6 +183,12 @@ internal static AgentResponseItem DeserializeAgentResponseItem(JsonElement eleme return A2AToolCall.DeserializeA2AToolCall(element, options); case "a2a_preview_call_output": return A2AToolCallOutput.DeserializeA2AToolCallOutput(element, options); + case "memory_search_call": + return MemorySearchToolCall.DeserializeMemorySearchToolCall(element, options); + case "memory_command_preview_call": + return MemoryCommandToolCall.DeserializeMemoryCommandToolCall(element, options); + case "memory_command_preview_call_output": + return MemoryCommandToolCallOutput.DeserializeMemoryCommandToolCallOutput(element, options); case "output_message": return InternalOutputItemOutputMessage.DeserializeInternalOutputItemOutputMessage(element, options); case "file_search_call": diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/AgentResponseItem.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/AgentResponseItem.cs index 7272b521c106..36829e01b9d2 100644 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/AgentResponseItem.cs +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/AgentResponseItem.cs @@ -9,7 +9,7 @@ namespace Azure.AI.Extensions.OpenAI { /// /// The AgentResponseItem. - /// Please note this is the abstract base class. The derived classes available for instantiation are: , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . + /// Please note this is the abstract base class. The derived classes available for instantiation are: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and . /// public abstract partial class AgentResponseItem { diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/AgentResponseItemKind.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/AgentResponseItemKind.cs index c538dc47e752..f1fdeea114b0 100644 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/AgentResponseItemKind.cs +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/AgentResponseItemKind.cs @@ -39,6 +39,8 @@ namespace Azure.AI.Extensions.OpenAI private const string StructuredOutputsValue = "structured_outputs"; private const string OauthConsentRequestValue = "oauth_consent_request"; private const string MemorySearchCallValue = "memory_search_call"; + private const string MemoryCommandPreviewCallValue = "memory_command_preview_call"; + private const string MemoryCommandPreviewCallOutputValue = "memory_command_preview_call_output"; private const string WorkflowActionValue = "workflow_action"; private const string A2APreviewCallValue = "a2a_preview_call"; private const string A2APreviewCallOutputValue = "a2a_preview_call_output"; @@ -153,6 +155,12 @@ public AgentResponseItemKind(string value) /// Gets the MemorySearchCall. public static AgentResponseItemKind MemorySearchCall { get; } = new AgentResponseItemKind(MemorySearchCallValue); + /// Gets the MemoryCommandPreviewCall. + public static AgentResponseItemKind MemoryCommandPreviewCall { get; } = new AgentResponseItemKind(MemoryCommandPreviewCallValue); + + /// Gets the MemoryCommandPreviewCallOutput. + public static AgentResponseItemKind MemoryCommandPreviewCallOutput { get; } = new AgentResponseItemKind(MemoryCommandPreviewCallOutputValue); + /// Gets the WorkflowAction. public static AgentResponseItemKind WorkflowAction { get; } = new AgentResponseItemKind(WorkflowActionValue); diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/AzureAIExtensionsOpenAIContext.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/AzureAIExtensionsOpenAIContext.cs index 3a4b62f14c22..2f94fa8682d7 100644 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/AzureAIExtensionsOpenAIContext.cs +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/AzureAIExtensionsOpenAIContext.cs @@ -44,6 +44,7 @@ namespace Azure.AI.Extensions.OpenAI [ModelReaderWriterBuildable(typeof(ContainerReferenceResource))] [ModelReaderWriterBuildable(typeof(ContainerSkill))] [ModelReaderWriterBuildable(typeof(CoordParam))] + [ModelReaderWriterBuildable(typeof(CreateConversationRequest))] [ModelReaderWriterBuildable(typeof(CustomGrammarFormatParam))] [ModelReaderWriterBuildable(typeof(DoubleClickAction))] [ModelReaderWriterBuildable(typeof(DragParam))] @@ -188,9 +189,10 @@ namespace Azure.AI.Extensions.OpenAI [ModelReaderWriterBuildable(typeof(LocalSkillParam))] [ModelReaderWriterBuildable(typeof(MCPListToolsToolAnnotations))] [ModelReaderWriterBuildable(typeof(MCPListToolsToolInputSchema))] + [ModelReaderWriterBuildable(typeof(MemoryCommandToolCall))] + [ModelReaderWriterBuildable(typeof(MemoryCommandToolCallOutput))] [ModelReaderWriterBuildable(typeof(MemoryOutputItem))] - [ModelReaderWriterBuildable(typeof(MemorySearchToolCallResponseItem))] - [ModelReaderWriterBuildable(typeof(MemoryToolSearchItem))] + [ModelReaderWriterBuildable(typeof(MemorySearchToolCall))] [ModelReaderWriterBuildable(typeof(MessageContentInputFileContent))] [ModelReaderWriterBuildable(typeof(MessageContentInputImageContent))] [ModelReaderWriterBuildable(typeof(MessageContentInputTextContent))] @@ -209,8 +211,8 @@ namespace Azure.AI.Extensions.OpenAI [ModelReaderWriterBuildable(typeof(OutputItemToolSearchCall))] [ModelReaderWriterBuildable(typeof(OutputItemToolSearchOutput))] [ModelReaderWriterBuildable(typeof(OutputMessageContentRefusalContent))] + [ModelReaderWriterBuildable(typeof(ProceduralMemoryItem))] [ModelReaderWriterBuildable(typeof(ProjectConversation))] - [ModelReaderWriterBuildable(typeof(ProjectConversationCreationOptions))] [ModelReaderWriterBuildable(typeof(RealtimeMCPError))] [ModelReaderWriterBuildable(typeof(RealtimeMCPHTTPError))] [ModelReaderWriterBuildable(typeof(RealtimeMCPProtocolError))] @@ -291,6 +293,7 @@ namespace Azure.AI.Extensions.OpenAI [ModelReaderWriterBuildable(typeof(SharepointGroundingToolCall))] [ModelReaderWriterBuildable(typeof(SharepointGroundingToolCallOutput))] [ModelReaderWriterBuildable(typeof(TextContent))] + [ModelReaderWriterBuildable(typeof(ToolConfig))] [ModelReaderWriterBuildable(typeof(TypeParam))] [ModelReaderWriterBuildable(typeof(UnknownAgentResponseItem))] [ModelReaderWriterBuildable(typeof(UnknownAnnotation))] diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/CreateConversationRequest.Serialization.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/CreateConversationRequest.Serialization.cs new file mode 100644 index 000000000000..5a5b0cde8943 --- /dev/null +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/CreateConversationRequest.Serialization.cs @@ -0,0 +1,178 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.AI.Extensions.OpenAI +{ + /// The CreateConversationRequest. + internal partial class CreateConversationRequest : IJsonModel + { + /// The data to parse. + /// The client options for reading and writing models. + protected virtual CreateConversationRequest PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeCreateConversationRequest(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CreateConversationRequest)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIExtensionsOpenAIContext.Default); + default: + throw new FormatException($"The model {nameof(CreateConversationRequest)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + CreateConversationRequest IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The to serialize into . + public static implicit operator BinaryContent(CreateConversationRequest createConversationRequest) + { + if (createConversationRequest == null) + { + return null; + } + return BinaryContent.Create(createConversationRequest, ModelSerializationExtensions.WireOptions); + } + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CreateConversationRequest)} does not support writing '{format}' format."); + } + if (Optional.IsDefined(Metadata)) + { + writer.WritePropertyName("metadata"u8); + writer.WriteObjectValue(Metadata, options); + } + if (Optional.IsCollectionDefined(Items)) + { + writer.WritePropertyName("items"u8); + writer.WriteStartArray(); + foreach (InputItem item in Items) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + CreateConversationRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual CreateConversationRequest JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CreateConversationRequest)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCreateConversationRequest(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static CreateConversationRequest DeserializeCreateConversationRequest(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + InternalMetadataContainer metadata = default; + IList items = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("metadata"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + metadata = null; + continue; + } + metadata = InternalMetadataContainer.DeserializeInternalMetadataContainer(prop.Value, options); + continue; + } + if (prop.NameEquals("items"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(InputItem.DeserializeInputItem(item, options)); + } + items = array; + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new CreateConversationRequest(metadata, items ?? new ChangeTrackingList(), additionalBinaryDataProperties); + } + } +} diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/CreateConversationRequest.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/CreateConversationRequest.cs new file mode 100644 index 000000000000..451aff4132aa --- /dev/null +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/CreateConversationRequest.cs @@ -0,0 +1,39 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Extensions.OpenAI +{ + /// The CreateConversationRequest. + internal partial class CreateConversationRequest + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + internal CreateConversationRequest() + { + Items = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// + /// + /// Keeps track of any properties unknown to the library. + internal CreateConversationRequest(InternalMetadataContainer metadata, IList items, IDictionary additionalBinaryDataProperties) + { + Metadata = metadata; + Items = items; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// Gets the Metadata. + public InternalMetadataContainer Metadata { get; } + + /// Gets the Items. + public IList Items { get; } + } +} diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/InternalCodeInterpreterTool.Serialization.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/InternalCodeInterpreterTool.Serialization.cs index b876c4648d3f..8996b3b0de40 100644 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/InternalCodeInterpreterTool.Serialization.cs +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/InternalCodeInterpreterTool.Serialization.cs @@ -81,6 +81,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsCollectionDefined(ToolConfigs)) + { + writer.WritePropertyName("tool_configs"u8); + writer.WriteStartObject(); + foreach (var item in ToolConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } if (Optional.IsDefined(Container)) { writer.WritePropertyName("container"u8); @@ -124,6 +135,7 @@ internal static InternalCodeInterpreterTool DeserializeInternalCodeInterpreterTo IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); string name = default; string description = default; + IDictionary toolConfigs = default; BinaryData container = default; foreach (var prop in element.EnumerateObject()) { @@ -142,6 +154,20 @@ internal static InternalCodeInterpreterTool DeserializeInternalCodeInterpreterTo description = prop.Value.GetString(); continue; } + if (prop.NameEquals("tool_configs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, ToolConfig.DeserializeToolConfig(prop0.Value, options)); + } + toolConfigs = dictionary; + continue; + } if (prop.NameEquals("container"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -156,7 +182,13 @@ internal static InternalCodeInterpreterTool DeserializeInternalCodeInterpreterTo additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalCodeInterpreterTool(@type, additionalBinaryDataProperties, name, description, container); + return new InternalCodeInterpreterTool( + @type, + additionalBinaryDataProperties, + name, + description, + toolConfigs ?? new ChangeTrackingDictionary(), + container); } } } diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/InternalCodeInterpreterTool.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/InternalCodeInterpreterTool.cs index f5476da128b4..1c75357863fd 100644 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/InternalCodeInterpreterTool.cs +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/InternalCodeInterpreterTool.cs @@ -14,6 +14,7 @@ internal partial class InternalCodeInterpreterTool : ResponsesTool /// Initializes a new instance of . public InternalCodeInterpreterTool() : base(ToolType.CodeInterpreter) { + ToolConfigs = new ChangeTrackingDictionary(); } /// Initializes a new instance of . @@ -21,16 +22,22 @@ public InternalCodeInterpreterTool() : base(ToolType.CodeInterpreter) /// Keeps track of any properties unknown to the library. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// /// /// The code interpreter container. Can be a container ID or an object that /// specifies uploaded file IDs to make available to your code, along with an /// optional `memory_limit` setting. /// If not provided, the service assumes auto. /// - internal InternalCodeInterpreterTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, BinaryData container) : base(@type, additionalBinaryDataProperties) + internal InternalCodeInterpreterTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, IDictionary toolConfigs, BinaryData container) : base(@type, additionalBinaryDataProperties) { Name = name; Description = description; + ToolConfigs = toolConfigs; Container = container; } @@ -40,6 +47,13 @@ internal InternalCodeInterpreterTool(ToolType @type, IDictionary Optional user-defined description for this tool or configuration. public string Description { get; set; } + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + public IDictionary ToolConfigs { get; } + /// /// The code interpreter container. Can be a container ID or an object that /// specifies uploaded file IDs to make available to your code, along with an diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/InternalFileSearchTool.Serialization.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/InternalFileSearchTool.Serialization.cs index 078a15d6bfba..94d0f3aff4d0 100644 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/InternalFileSearchTool.Serialization.cs +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/InternalFileSearchTool.Serialization.cs @@ -120,6 +120,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsCollectionDefined(ToolConfigs)) + { + writer.WritePropertyName("tool_configs"u8); + writer.WriteStartObject(); + foreach (var item in ToolConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } } /// The JSON reader. @@ -155,6 +166,7 @@ internal static InternalFileSearchTool DeserializeInternalFileSearchTool(JsonEle BinaryData filters = default; string name = default; string description = default; + IDictionary toolConfigs = default; foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("type"u8)) @@ -217,6 +229,20 @@ internal static InternalFileSearchTool DeserializeInternalFileSearchTool(JsonEle description = prop.Value.GetString(); continue; } + if (prop.NameEquals("tool_configs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, ToolConfig.DeserializeToolConfig(prop0.Value, options)); + } + toolConfigs = dictionary; + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); @@ -230,7 +256,8 @@ internal static InternalFileSearchTool DeserializeInternalFileSearchTool(JsonEle rankingOptions, filters, name, - description); + description, + toolConfigs ?? new ChangeTrackingDictionary()); } } } diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/InternalFileSearchTool.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/InternalFileSearchTool.cs index 32939a7c643f..de4c013e2166 100644 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/InternalFileSearchTool.cs +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/InternalFileSearchTool.cs @@ -17,6 +17,7 @@ internal partial class InternalFileSearchTool : ResponsesTool public InternalFileSearchTool(IEnumerable vectorStoreIds) : base(ToolType.FileSearch) { VectorStoreIds = vectorStoreIds.ToList(); + ToolConfigs = new ChangeTrackingDictionary(); } /// Initializes a new instance of . @@ -28,7 +29,12 @@ public InternalFileSearchTool(IEnumerable vectorStoreIds) : base(ToolTyp /// /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. - internal InternalFileSearchTool(ToolType @type, IDictionary additionalBinaryDataProperties, IList vectorStoreIds, long? maxNumResults, InternalRankingOptions rankingOptions, BinaryData filters, string name, string description) : base(@type, additionalBinaryDataProperties) + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + internal InternalFileSearchTool(ToolType @type, IDictionary additionalBinaryDataProperties, IList vectorStoreIds, long? maxNumResults, InternalRankingOptions rankingOptions, BinaryData filters, string name, string description, IDictionary toolConfigs) : base(@type, additionalBinaryDataProperties) { VectorStoreIds = vectorStoreIds; MaxNumResults = maxNumResults; @@ -36,6 +42,7 @@ internal InternalFileSearchTool(ToolType @type, IDictionary Filters = filters; Name = name; Description = description; + ToolConfigs = toolConfigs; } /// The IDs of the vector stores to search. @@ -93,5 +100,12 @@ internal InternalFileSearchTool(ToolType @type, IDictionary /// Optional user-defined description for this tool or configuration. public string Description { get; set; } + + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + public IDictionary ToolConfigs { get; } } } diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/InternalImageGenTool.Serialization.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/InternalImageGenTool.Serialization.cs index 77da1d491ff7..16d5103707f1 100644 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/InternalImageGenTool.Serialization.cs +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/InternalImageGenTool.Serialization.cs @@ -136,6 +136,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsCollectionDefined(ToolConfigs)) + { + writer.WritePropertyName("tool_configs"u8); + writer.WriteStartObject(); + foreach (var item in ToolConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } } /// The JSON reader. @@ -178,6 +189,7 @@ internal static InternalImageGenTool DeserializeInternalImageGenTool(JsonElement ImageGenActionEnum? action = default; string name = default; string description = default; + IDictionary toolConfigs = default; foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("type"u8)) @@ -295,6 +307,20 @@ internal static InternalImageGenTool DeserializeInternalImageGenTool(JsonElement description = prop.Value.GetString(); continue; } + if (prop.NameEquals("tool_configs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, ToolConfig.DeserializeToolConfig(prop0.Value, options)); + } + toolConfigs = dictionary; + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); @@ -315,7 +341,8 @@ internal static InternalImageGenTool DeserializeInternalImageGenTool(JsonElement partialImages, action, name, - description); + description, + toolConfigs ?? new ChangeTrackingDictionary()); } } } diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/InternalImageGenTool.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/InternalImageGenTool.cs index b19ef8e94bec..0abe05db6d40 100644 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/InternalImageGenTool.cs +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/InternalImageGenTool.cs @@ -13,6 +13,7 @@ internal partial class InternalImageGenTool : ResponsesTool /// Initializes a new instance of . public InternalImageGenTool() : base(ToolType.ImageGeneration) { + ToolConfigs = new ChangeTrackingDictionary(); } /// Initializes a new instance of . @@ -46,7 +47,12 @@ public InternalImageGenTool() : base(ToolType.ImageGeneration) /// Whether to generate a new image or edit an existing image. Default: `auto`. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. - internal InternalImageGenTool(ToolType @type, IDictionary additionalBinaryDataProperties, ImageGenToolModel? model, ImageGenToolQuality? quality, ImageGenToolSize? size, ImageGenToolOutputFormat? outputFormat, long? outputCompression, ImageGenToolModeration? moderation, ImageGenToolBackground? background, InputFidelity? inputFidelity, InternalImageGenToolInputImageMask inputImageMask, long? partialImages, ImageGenActionEnum? action, string name, string description) : base(@type, additionalBinaryDataProperties) + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + internal InternalImageGenTool(ToolType @type, IDictionary additionalBinaryDataProperties, ImageGenToolModel? model, ImageGenToolQuality? quality, ImageGenToolSize? size, ImageGenToolOutputFormat? outputFormat, long? outputCompression, ImageGenToolModeration? moderation, ImageGenToolBackground? background, InputFidelity? inputFidelity, InternalImageGenToolInputImageMask inputImageMask, long? partialImages, ImageGenActionEnum? action, string name, string description, IDictionary toolConfigs) : base(@type, additionalBinaryDataProperties) { Model = model; Quality = quality; @@ -61,6 +67,7 @@ internal InternalImageGenTool(ToolType @type, IDictionary ad Action = action; Name = name; Description = description; + ToolConfigs = toolConfigs; } /// Gets or sets the Model. @@ -116,5 +123,12 @@ internal InternalImageGenTool(ToolType @type, IDictionary ad /// Optional user-defined description for this tool or configuration. public string Description { get; set; } + + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + public IDictionary ToolConfigs { get; } } } diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/InternalMCPTool.Serialization.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/InternalMCPTool.Serialization.cs index b4507b0e9d74..74695beeebc1 100644 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/InternalMCPTool.Serialization.cs +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/InternalMCPTool.Serialization.cs @@ -148,6 +148,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("project_connection_id"u8); writer.WriteStringValue(ProjectConnectionId); } + if (Optional.IsCollectionDefined(ToolConfigs)) + { + writer.WritePropertyName("tool_configs"u8); + writer.WriteStartObject(); + foreach (var item in ToolConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } } /// The JSON reader. @@ -187,6 +198,7 @@ internal static InternalMCPTool DeserializeInternalMCPTool(JsonElement element, BinaryData requireApproval = default; bool? deferLoading = default; string projectConnectionId = default; + IDictionary toolConfigs = default; foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("type"u8)) @@ -282,6 +294,20 @@ internal static InternalMCPTool DeserializeInternalMCPTool(JsonElement element, projectConnectionId = prop.Value.GetString(); continue; } + if (prop.NameEquals("tool_configs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, ToolConfig.DeserializeToolConfig(prop0.Value, options)); + } + toolConfigs = dictionary; + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); @@ -299,7 +325,8 @@ internal static InternalMCPTool DeserializeInternalMCPTool(JsonElement element, allowedTools, requireApproval, deferLoading, - projectConnectionId); + projectConnectionId, + toolConfigs ?? new ChangeTrackingDictionary()); } } } diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/InternalMCPTool.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/InternalMCPTool.cs index 0cb29218c3d4..c4365b0a1007 100644 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/InternalMCPTool.cs +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/InternalMCPTool.cs @@ -17,6 +17,7 @@ public InternalMCPTool(string serverLabel) : base(ToolType.Mcp) { ServerLabel = serverLabel; Headers = new ChangeTrackingDictionary(); + ToolConfigs = new ChangeTrackingDictionary(); } /// Initializes a new instance of . @@ -45,7 +46,12 @@ public InternalMCPTool(string serverLabel) : base(ToolType.Mcp) /// /// Whether this MCP tool is deferred and discovered via tool search. /// The connection ID in the project for the MCP server. The connection stores authentication and other connection details needed to connect to the MCP server. - internal InternalMCPTool(ToolType @type, IDictionary additionalBinaryDataProperties, string serverLabel, Uri serverUrl, MCPToolConnectorId? connectorId, string authorization, string serverDescription, IDictionary headers, BinaryData allowedTools, BinaryData requireApproval, bool? deferLoading, string projectConnectionId) : base(@type, additionalBinaryDataProperties) + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + internal InternalMCPTool(ToolType @type, IDictionary additionalBinaryDataProperties, string serverLabel, Uri serverUrl, MCPToolConnectorId? connectorId, string authorization, string serverDescription, IDictionary headers, BinaryData allowedTools, BinaryData requireApproval, bool? deferLoading, string projectConnectionId, IDictionary toolConfigs) : base(@type, additionalBinaryDataProperties) { ServerLabel = serverLabel; ServerUrl = serverUrl; @@ -57,6 +63,7 @@ internal InternalMCPTool(ToolType @type, IDictionary additio RequireApproval = requireApproval; DeferLoading = deferLoading; ProjectConnectionId = projectConnectionId; + ToolConfigs = toolConfigs; } /// A label for this MCP server, used to identify it in tool calls. @@ -180,5 +187,12 @@ internal InternalMCPTool(ToolType @type, IDictionary additio /// The connection ID in the project for the MCP server. The connection stores authentication and other connection details needed to connect to the MCP server. public string ProjectConnectionId { get; set; } + + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + public IDictionary ToolConfigs { get; } } } diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/MemoryCommandToolCall.Serialization.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/MemoryCommandToolCall.Serialization.cs new file mode 100644 index 000000000000..1851f6a59a4d --- /dev/null +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/MemoryCommandToolCall.Serialization.cs @@ -0,0 +1,177 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.AI.Extensions.OpenAI +{ + /// A memory command tool call. + public partial class MemoryCommandToolCall : AgentResponseItem, IJsonModel + { + /// Initializes a new instance of for deserialization. + internal MemoryCommandToolCall() + { + } + + /// The data to parse. + /// The client options for reading and writing models. + protected override AgentResponseItem PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeMemoryCommandToolCall(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(MemoryCommandToolCall)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIExtensionsOpenAIContext.Default); + default: + throw new FormatException($"The model {nameof(MemoryCommandToolCall)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + MemoryCommandToolCall IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (MemoryCommandToolCall)PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MemoryCommandToolCall)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("call_id"u8); + writer.WriteStringValue(CallId); + writer.WritePropertyName("arguments"u8); + writer.WriteStringValue(Arguments); + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToSerialString()); + } + + /// The JSON reader. + /// The client options for reading and writing models. + MemoryCommandToolCall IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (MemoryCommandToolCall)JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected override AgentResponseItem JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MemoryCommandToolCall)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeMemoryCommandToolCall(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static MemoryCommandToolCall DeserializeMemoryCommandToolCall(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AgentResponseItemKind @type = default; + string id = default; + AgentReference agentReference = default; + string responseId = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + string callId = default; + string arguments = default; + ToolCallStatus status = default; + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("type"u8)) + { + @type = new AgentResponseItemKind(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("id"u8)) + { + id = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("agent_reference"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + agentReference = AgentReference.DeserializeAgentReference(prop.Value, options); + continue; + } + if (prop.NameEquals("response_id"u8)) + { + responseId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("call_id"u8)) + { + callId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("arguments"u8)) + { + arguments = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("status"u8)) + { + status = prop.Value.GetString().ToToolCallStatus(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new MemoryCommandToolCall( + @type, + id, + agentReference, + responseId, + additionalBinaryDataProperties, + callId, + arguments, + status); + } + } +} diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/MemoryCommandToolCall.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/MemoryCommandToolCall.cs new file mode 100644 index 000000000000..8a1ef69494ac --- /dev/null +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/MemoryCommandToolCall.cs @@ -0,0 +1,53 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Extensions.OpenAI +{ + /// A memory command tool call. + public partial class MemoryCommandToolCall : AgentResponseItem + { + /// Initializes a new instance of . + /// The unique ID of the tool call generated by the model. + /// A JSON string of the arguments to pass to the tool, including `action` (`remember` or `forget`) and `content`. + /// The status of the tool call. + /// or is null. + public MemoryCommandToolCall(string callId, string arguments, ToolCallStatus status) : base(AgentResponseItemKind.MemoryCommandPreviewCall) + { + Argument.AssertNotNull(callId, nameof(callId)); + Argument.AssertNotNull(arguments, nameof(arguments)); + + CallId = callId; + Arguments = arguments; + Status = status; + } + + /// Initializes a new instance of . + /// + /// + /// The agent that created the item. + /// The response on which the item is created. + /// Keeps track of any properties unknown to the library. + /// The unique ID of the tool call generated by the model. + /// A JSON string of the arguments to pass to the tool, including `action` (`remember` or `forget`) and `content`. + /// The status of the tool call. + internal MemoryCommandToolCall(AgentResponseItemKind @type, string id, AgentReference agentReference, string responseId, IDictionary additionalBinaryDataProperties, string callId, string arguments, ToolCallStatus status) : base(@type, id, agentReference, responseId, additionalBinaryDataProperties) + { + CallId = callId; + Arguments = arguments; + Status = status; + } + + /// The unique ID of the tool call generated by the model. + public string CallId { get; set; } + + /// A JSON string of the arguments to pass to the tool, including `action` (`remember` or `forget`) and `content`. + public string Arguments { get; set; } + + /// The status of the tool call. + public ToolCallStatus Status { get; set; } + } +} diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/MemoryCommandToolCallOutput.Serialization.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/MemoryCommandToolCallOutput.Serialization.cs new file mode 100644 index 000000000000..449601351d46 --- /dev/null +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/MemoryCommandToolCallOutput.Serialization.cs @@ -0,0 +1,168 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.AI.Extensions.OpenAI +{ + /// The output of a memory command tool call. + public partial class MemoryCommandToolCallOutput : AgentResponseItem, IJsonModel + { + /// Initializes a new instance of for deserialization. + internal MemoryCommandToolCallOutput() + { + } + + /// The data to parse. + /// The client options for reading and writing models. + protected override AgentResponseItem PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeMemoryCommandToolCallOutput(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(MemoryCommandToolCallOutput)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIExtensionsOpenAIContext.Default); + default: + throw new FormatException($"The model {nameof(MemoryCommandToolCallOutput)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + MemoryCommandToolCallOutput IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (MemoryCommandToolCallOutput)PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MemoryCommandToolCallOutput)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("call_id"u8); + writer.WriteStringValue(CallId); + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToSerialString()); + } + + /// The JSON reader. + /// The client options for reading and writing models. + MemoryCommandToolCallOutput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (MemoryCommandToolCallOutput)JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected override AgentResponseItem JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(MemoryCommandToolCallOutput)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeMemoryCommandToolCallOutput(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static MemoryCommandToolCallOutput DeserializeMemoryCommandToolCallOutput(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + AgentResponseItemKind @type = default; + string id = default; + AgentReference agentReference = default; + string responseId = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + string callId = default; + ToolCallStatus status = default; + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("type"u8)) + { + @type = new AgentResponseItemKind(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("id"u8)) + { + id = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("agent_reference"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + agentReference = AgentReference.DeserializeAgentReference(prop.Value, options); + continue; + } + if (prop.NameEquals("response_id"u8)) + { + responseId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("call_id"u8)) + { + callId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("status"u8)) + { + status = prop.Value.GetString().ToToolCallStatus(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new MemoryCommandToolCallOutput( + @type, + id, + agentReference, + responseId, + additionalBinaryDataProperties, + callId, + status); + } + } +} diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/MemoryCommandToolCallOutput.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/MemoryCommandToolCallOutput.cs new file mode 100644 index 000000000000..0aaf29d1b7c9 --- /dev/null +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/MemoryCommandToolCallOutput.cs @@ -0,0 +1,45 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Extensions.OpenAI +{ + /// The output of a memory command tool call. + public partial class MemoryCommandToolCallOutput : AgentResponseItem + { + /// Initializes a new instance of . + /// The unique ID of the tool call generated by the model. + /// The status of the tool call. + /// is null. + public MemoryCommandToolCallOutput(string callId, ToolCallStatus status) : base(AgentResponseItemKind.MemoryCommandPreviewCallOutput) + { + Argument.AssertNotNull(callId, nameof(callId)); + + CallId = callId; + Status = status; + } + + /// Initializes a new instance of . + /// + /// + /// The agent that created the item. + /// The response on which the item is created. + /// Keeps track of any properties unknown to the library. + /// The unique ID of the tool call generated by the model. + /// The status of the tool call. + internal MemoryCommandToolCallOutput(AgentResponseItemKind @type, string id, AgentReference agentReference, string responseId, IDictionary additionalBinaryDataProperties, string callId, ToolCallStatus status) : base(@type, id, agentReference, responseId, additionalBinaryDataProperties) + { + CallId = callId; + Status = status; + } + + /// The unique ID of the tool call generated by the model. + public string CallId { get; set; } + + /// The status of the tool call. + public ToolCallStatus Status { get; set; } + } +} diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/MemoryItemKind.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/MemoryItemKind.cs index f636e7591c68..40eeb270fbd2 100644 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/MemoryItemKind.cs +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/MemoryItemKind.cs @@ -15,6 +15,8 @@ namespace Azure.AI.Extensions.OpenAI private const string UserProfileValue = "user_profile"; /// Summary of chat conversations. private const string ChatSummaryValue = "chat_summary"; + /// Routine procedures extracted from conversations. + private const string ProceduralValue = "procedural"; /// Initializes a new instance of . /// The value. @@ -32,6 +34,9 @@ public MemoryItemKind(string value) /// Summary of chat conversations. public static MemoryItemKind ChatSummary { get; } = new MemoryItemKind(ChatSummaryValue); + /// Routine procedures extracted from conversations. + public static MemoryItemKind Procedural { get; } = new MemoryItemKind(ProceduralValue); + /// Determines if two values are the same. /// The left value to compare. /// The right value to compare. diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/MemoryOutputItem.Serialization.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/MemoryOutputItem.Serialization.cs index 9ba161d8fc10..f79da3d7d6fe 100644 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/MemoryOutputItem.Serialization.cs +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/MemoryOutputItem.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.AI.Extensions.OpenAI { /// /// A single memory item stored in the memory store, containing content and metadata. - /// Please note this is the abstract base class. The derived classes available for instantiation are: and . + /// Please note this is the abstract base class. The derived classes available for instantiation are: , , and . /// [PersistableModelProxy(typeof(UnknownMemoryOutputItem))] public abstract partial class MemoryOutputItem : IJsonModel @@ -138,6 +138,8 @@ internal static MemoryOutputItem DeserializeMemoryOutputItem(JsonElement element return UserProfileMemoryItem.DeserializeUserProfileMemoryItem(element, options); case "chat_summary": return ChatSummaryMemoryItem.DeserializeChatSummaryMemoryItem(element, options); + case "procedural": + return ProceduralMemoryItem.DeserializeProceduralMemoryItem(element, options); } } return UnknownMemoryOutputItem.DeserializeUnknownMemoryOutputItem(element, options); diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/MemoryOutputItem.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/MemoryOutputItem.cs index f38f0708a22f..ca969bec857b 100644 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/MemoryOutputItem.cs +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/MemoryOutputItem.cs @@ -9,7 +9,7 @@ namespace Azure.AI.Extensions.OpenAI { /// /// A single memory item stored in the memory store, containing content and metadata. - /// Please note this is the abstract base class. The derived classes available for instantiation are: and . + /// Please note this is the abstract base class. The derived classes available for instantiation are: , , and . /// public abstract partial class MemoryOutputItem { diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/MemorySearchToolCallResponseItem.Serialization.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/MemorySearchToolCall.Serialization.cs similarity index 67% rename from sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/MemorySearchToolCallResponseItem.Serialization.cs rename to sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/MemorySearchToolCall.Serialization.cs index 86233293d34b..98400de04388 100644 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/MemorySearchToolCallResponseItem.Serialization.cs +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/MemorySearchToolCall.Serialization.cs @@ -9,11 +9,11 @@ namespace Azure.AI.Extensions.OpenAI { - /// The MemorySearchToolCallResponseItem. - public partial class MemorySearchToolCallResponseItem : AgentResponseItem, IJsonModel + /// A memory search tool call. + public partial class MemorySearchToolCall : AgentResponseItem, IJsonModel { - /// Initializes a new instance of for deserialization. - internal MemorySearchToolCallResponseItem() + /// Initializes a new instance of for deserialization. + internal MemorySearchToolCall() { } @@ -21,45 +21,45 @@ internal MemorySearchToolCallResponseItem() /// The client options for reading and writing models. protected override AgentResponseItem PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { - return DeserializeMemorySearchToolCallResponseItem(document.RootElement, options); + return DeserializeMemorySearchToolCall(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(MemorySearchToolCallResponseItem)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(MemorySearchToolCall)} does not support reading '{options.Format}' format."); } } /// The client options for reading and writing models. protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": return ModelReaderWriter.Write(this, options, AzureAIExtensionsOpenAIContext.Default); default: - throw new FormatException($"The model {nameof(MemorySearchToolCallResponseItem)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(MemorySearchToolCall)} does not support writing '{options.Format}' format."); } } /// The client options for reading and writing models. - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); /// The data to parse. /// The client options for reading and writing models. - MemorySearchToolCallResponseItem IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (MemorySearchToolCallResponseItem)PersistableModelCreateCore(data, options); + MemorySearchToolCall IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (MemorySearchToolCall)PersistableModelCreateCore(data, options); /// The client options for reading and writing models. - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; /// The JSON writer. /// The client options for reading and writing models. - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -70,19 +70,19 @@ void IJsonModel.Write(Utf8JsonWriter writer, M /// The client options for reading and writing models. protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(MemorySearchToolCallResponseItem)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(MemorySearchToolCall)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); writer.WritePropertyName("status"u8); - writer.WriteStringValue(Status.ToString()); - if (Optional.IsCollectionDefined(Results)) + writer.WriteStringValue(Status.ToSerialString()); + if (Optional.IsCollectionDefined(Memories)) { - writer.WritePropertyName("results"u8); + writer.WritePropertyName("memories"u8); writer.WriteStartArray(); - foreach (MemoryToolSearchItem item in Results) + foreach (MemoryOutputItem item in Memories) { writer.WriteObjectValue(item, options); } @@ -92,24 +92,24 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri /// The JSON reader. /// The client options for reading and writing models. - MemorySearchToolCallResponseItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (MemorySearchToolCallResponseItem)JsonModelCreateCore(ref reader, options); + MemorySearchToolCall IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (MemorySearchToolCall)JsonModelCreateCore(ref reader, options); /// The JSON reader. /// The client options for reading and writing models. protected override AgentResponseItem JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(MemorySearchToolCallResponseItem)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(MemorySearchToolCall)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeMemorySearchToolCallResponseItem(document.RootElement, options); + return DeserializeMemorySearchToolCall(document.RootElement, options); } /// The JSON element to deserialize. /// The client options for reading and writing models. - internal static MemorySearchToolCallResponseItem DeserializeMemorySearchToolCallResponseItem(JsonElement element, ModelReaderWriterOptions options) + internal static MemorySearchToolCall DeserializeMemorySearchToolCall(JsonElement element, ModelReaderWriterOptions options) { if (element.ValueKind == JsonValueKind.Null) { @@ -120,8 +120,8 @@ internal static MemorySearchToolCallResponseItem DeserializeMemorySearchToolCall AgentReference agentReference = default; string responseId = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); - MemorySearchToolCallStatus status = default; - IList results = default; + ToolCallStatus status = default; + IList memories = default; foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("type"u8)) @@ -150,21 +150,21 @@ internal static MemorySearchToolCallResponseItem DeserializeMemorySearchToolCall } if (prop.NameEquals("status"u8)) { - status = new MemorySearchToolCallStatus(prop.Value.GetString()); + status = prop.Value.GetString().ToToolCallStatus(); continue; } - if (prop.NameEquals("results"u8)) + if (prop.NameEquals("memories"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) { continue; } - List array = new List(); + List array = new List(); foreach (var item in prop.Value.EnumerateArray()) { - array.Add(MemoryToolSearchItem.DeserializeMemoryToolSearchItem(item, options)); + array.Add(MemoryOutputItem.DeserializeMemoryOutputItem(item, options)); } - results = array; + memories = array; continue; } if (options.Format != "W") @@ -172,14 +172,14 @@ internal static MemorySearchToolCallResponseItem DeserializeMemorySearchToolCall additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new MemorySearchToolCallResponseItem( + return new MemorySearchToolCall( @type, id, agentReference, responseId, additionalBinaryDataProperties, status, - results ?? new ChangeTrackingList()); + memories ?? new ChangeTrackingList()); } } } diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/MemorySearchToolCall.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/MemorySearchToolCall.cs new file mode 100644 index 000000000000..30d1adaadf97 --- /dev/null +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/MemorySearchToolCall.cs @@ -0,0 +1,41 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Extensions.OpenAI +{ + /// A memory search tool call. + public partial class MemorySearchToolCall : AgentResponseItem + { + /// Initializes a new instance of . + /// The status of the tool call. + public MemorySearchToolCall(ToolCallStatus status) : base(AgentResponseItemKind.MemorySearchCall) + { + Status = status; + Memories = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// + /// + /// The agent that created the item. + /// The response on which the item is created. + /// Keeps track of any properties unknown to the library. + /// The status of the tool call. + /// The results returned from the memory search. + internal MemorySearchToolCall(AgentResponseItemKind @type, string id, AgentReference agentReference, string responseId, IDictionary additionalBinaryDataProperties, ToolCallStatus status, IList memories) : base(@type, id, agentReference, responseId, additionalBinaryDataProperties) + { + Status = status; + Memories = memories; + } + + /// The status of the tool call. + public ToolCallStatus Status { get; set; } + + /// The results returned from the memory search. + public IList Memories { get; set; } + } +} diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/MemorySearchToolCallResponseItem.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/MemorySearchToolCallResponseItem.cs deleted file mode 100644 index f475ec915f06..000000000000 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/MemorySearchToolCallResponseItem.cs +++ /dev/null @@ -1,50 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Extensions.OpenAI -{ - /// The MemorySearchToolCallResponseItem. - public partial class MemorySearchToolCallResponseItem : AgentResponseItem - { - /// Initializes a new instance of . - /// - /// The status of the memory search tool call. One of `in_progress`, - /// `searching`, `completed`, `incomplete` or `failed`, - /// - public MemorySearchToolCallResponseItem(MemorySearchToolCallStatus status) : base(AgentResponseItemKind.MemorySearchCall) - { - Status = status; - Results = new ChangeTrackingList(); - } - - /// Initializes a new instance of . - /// - /// - /// The agent that created the item. - /// The response on which the item is created. - /// Keeps track of any properties unknown to the library. - /// - /// The status of the memory search tool call. One of `in_progress`, - /// `searching`, `completed`, `incomplete` or `failed`, - /// - /// The results returned from the memory search. - internal MemorySearchToolCallResponseItem(AgentResponseItemKind @type, string id, AgentReference agentReference, string responseId, IDictionary additionalBinaryDataProperties, MemorySearchToolCallStatus status, IList results) : base(@type, id, agentReference, responseId, additionalBinaryDataProperties) - { - Status = status; - Results = results; - } - - /// - /// The status of the memory search tool call. One of `in_progress`, - /// `searching`, `completed`, `incomplete` or `failed`, - /// - public MemorySearchToolCallStatus Status { get; set; } - - /// The results returned from the memory search. - public IList Results { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/MemorySearchToolCallStatus.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/MemorySearchToolCallStatus.cs deleted file mode 100644 index c1600e043484..000000000000 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/MemorySearchToolCallStatus.cs +++ /dev/null @@ -1,77 +0,0 @@ -// - -#nullable disable - -using System; -using System.ComponentModel; - -namespace Azure.AI.Extensions.OpenAI -{ - /// - public readonly partial struct MemorySearchToolCallStatus : IEquatable - { - private readonly string _value; - private const string InProgressValue = "in_progress"; - private const string SearchingValue = "searching"; - private const string CompletedValue = "completed"; - private const string IncompleteValue = "incomplete"; - private const string FailedValue = "failed"; - - /// Initializes a new instance of . - /// The value. - /// is null. - public MemorySearchToolCallStatus(string value) - { - Argument.AssertNotNull(value, nameof(value)); - - _value = value; - } - - /// Gets the InProgress. - public static MemorySearchToolCallStatus InProgress { get; } = new MemorySearchToolCallStatus(InProgressValue); - - /// Gets the Searching. - public static MemorySearchToolCallStatus Searching { get; } = new MemorySearchToolCallStatus(SearchingValue); - - /// Gets the Completed. - public static MemorySearchToolCallStatus Completed { get; } = new MemorySearchToolCallStatus(CompletedValue); - - /// Gets the Incomplete. - public static MemorySearchToolCallStatus Incomplete { get; } = new MemorySearchToolCallStatus(IncompleteValue); - - /// Gets the Failed. - public static MemorySearchToolCallStatus Failed { get; } = new MemorySearchToolCallStatus(FailedValue); - - /// Determines if two values are the same. - /// The left value to compare. - /// The right value to compare. - public static bool operator ==(MemorySearchToolCallStatus left, MemorySearchToolCallStatus right) => left.Equals(right); - - /// Determines if two values are not the same. - /// The left value to compare. - /// The right value to compare. - public static bool operator !=(MemorySearchToolCallStatus left, MemorySearchToolCallStatus right) => !left.Equals(right); - - /// Converts a string to a . - /// The value. - public static implicit operator MemorySearchToolCallStatus(string value) => new MemorySearchToolCallStatus(value); - - /// Converts a string to a . - /// The value. - public static implicit operator MemorySearchToolCallStatus?(string value) => value == null ? null : new MemorySearchToolCallStatus(value); - - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public override bool Equals(object obj) => obj is MemorySearchToolCallStatus other && Equals(other); - - /// - public bool Equals(MemorySearchToolCallStatus 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.Extensions.OpenAI/src/Generated/Models/MemoryToolSearchItem.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/MemoryToolSearchItem.cs deleted file mode 100644 index 249020aff87e..000000000000 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/MemoryToolSearchItem.cs +++ /dev/null @@ -1,38 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; - -namespace Azure.AI.Extensions.OpenAI -{ - /// A retrieved memory item from memory search. - public partial class MemoryToolSearchItem - { - /// Keeps track of any properties unknown to the library. - private protected readonly IDictionary _additionalBinaryDataProperties; - - /// Initializes a new instance of . - /// Retrieved memory item. - /// is null. - public MemoryToolSearchItem(MemoryOutputItem memoryItem) - { - Argument.AssertNotNull(memoryItem, nameof(memoryItem)); - - MemoryItem = memoryItem; - } - - /// Initializes a new instance of . - /// Retrieved memory item. - /// Keeps track of any properties unknown to the library. - internal MemoryToolSearchItem(MemoryOutputItem memoryItem, IDictionary additionalBinaryDataProperties) - { - MemoryItem = memoryItem; - _additionalBinaryDataProperties = additionalBinaryDataProperties; - } - - /// Retrieved memory item. - public MemoryOutputItem MemoryItem { get; set; } - } -} diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ProceduralMemoryItem.Serialization.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ProceduralMemoryItem.Serialization.cs new file mode 100644 index 000000000000..f80857640b8d --- /dev/null +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ProceduralMemoryItem.Serialization.cs @@ -0,0 +1,153 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.AI.Extensions.OpenAI +{ + /// A memory item containing a procedure extracted from conversations. + public partial class ProceduralMemoryItem : MemoryOutputItem, IJsonModel + { + /// Initializes a new instance of for deserialization. + internal ProceduralMemoryItem() + { + } + + /// The data to parse. + /// The client options for reading and writing models. + protected override MemoryOutputItem PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeProceduralMemoryItem(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProceduralMemoryItem)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIExtensionsOpenAIContext.Default); + default: + throw new FormatException($"The model {nameof(ProceduralMemoryItem)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + ProceduralMemoryItem IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (ProceduralMemoryItem)PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProceduralMemoryItem)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + } + + /// The JSON reader. + /// The client options for reading and writing models. + ProceduralMemoryItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ProceduralMemoryItem)JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected override MemoryOutputItem JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProceduralMemoryItem)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProceduralMemoryItem(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static ProceduralMemoryItem DeserializeProceduralMemoryItem(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string memoryId = default; + DateTimeOffset updatedAt = default; + string scope = default; + string content = default; + MemoryItemKind kind = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("memory_id"u8)) + { + memoryId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("updated_at"u8)) + { + updatedAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); + continue; + } + if (prop.NameEquals("scope"u8)) + { + scope = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("content"u8)) + { + content = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("kind"u8)) + { + kind = new MemoryItemKind(prop.Value.GetString()); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new ProceduralMemoryItem( + memoryId, + updatedAt, + scope, + content, + kind, + additionalBinaryDataProperties); + } + } +} diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ProceduralMemoryItem.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ProceduralMemoryItem.cs new file mode 100644 index 000000000000..d68c5bf1b6f0 --- /dev/null +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ProceduralMemoryItem.cs @@ -0,0 +1,38 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Extensions.OpenAI +{ + /// A memory item containing a procedure extracted from conversations. + public partial class ProceduralMemoryItem : MemoryOutputItem + { + /// Initializes a new instance of . + /// The unique ID of the memory item. + /// The last update time of the memory item. + /// The namespace that logically groups and isolates memories, such as a user ID. + /// The content of the memory. + /// , or is null. + public ProceduralMemoryItem(string memoryId, DateTimeOffset updatedAt, string scope, string content) : base(memoryId, updatedAt, scope, content, MemoryItemKind.Procedural) + { + Argument.AssertNotNull(memoryId, nameof(memoryId)); + Argument.AssertNotNull(scope, nameof(scope)); + Argument.AssertNotNull(content, nameof(content)); + + } + + /// Initializes a new instance of . + /// The unique ID of the memory item. + /// The last update time of the memory item. + /// The namespace that logically groups and isolates memories, such as a user ID. + /// The content of the memory. + /// The kind of the memory item. + /// Keeps track of any properties unknown to the library. + internal ProceduralMemoryItem(string memoryId, DateTimeOffset updatedAt, string scope, string content, MemoryItemKind kind, IDictionary additionalBinaryDataProperties) : base(memoryId, updatedAt, scope, content, kind, additionalBinaryDataProperties) + { + } + } +} diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ProjectConversationCreationOptions.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ProjectConversationCreationOptions.cs deleted file mode 100644 index 5f9c70a390bb..000000000000 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ProjectConversationCreationOptions.cs +++ /dev/null @@ -1,28 +0,0 @@ -// - -#nullable disable - -using System; -using System.Collections.Generic; -using OpenAI.Responses; - -namespace Azure.AI.Extensions.OpenAI -{ - /// The ProjectConversationCreationOptions. - public partial class ProjectConversationCreationOptions - { - /// Keeps track of any properties unknown to the library. - private protected readonly IDictionary _additionalBinaryDataProperties; - - /// Initializes a new instance of . - /// - /// - /// Keeps track of any properties unknown to the library. - internal ProjectConversationCreationOptions(InternalMetadataContainer internalMetadata, IList items, IDictionary additionalBinaryDataProperties) - { - InternalMetadata = internalMetadata; - Items = items; - _additionalBinaryDataProperties = additionalBinaryDataProperties; - } - } -} diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesA2APreviewTool.Serialization.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesA2APreviewTool.Serialization.cs index 739a162f8ddc..c787a1b43125 100644 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesA2APreviewTool.Serialization.cs +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesA2APreviewTool.Serialization.cs @@ -81,6 +81,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsCollectionDefined(ToolConfigs)) + { + writer.WritePropertyName("tool_configs"u8); + writer.WriteStartObject(); + foreach (var item in ToolConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } if (Optional.IsDefined(BaseUrl)) { writer.WritePropertyName("base_url"u8); @@ -127,6 +138,7 @@ internal static ResponsesA2APreviewTool DeserializeResponsesA2APreviewTool(JsonE IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); string name = default; string description = default; + IDictionary toolConfigs = default; Uri baseUrl = default; string agentCardPath = default; string projectConnectionId = default; @@ -147,6 +159,20 @@ internal static ResponsesA2APreviewTool DeserializeResponsesA2APreviewTool(JsonE description = prop.Value.GetString(); continue; } + if (prop.NameEquals("tool_configs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, ToolConfig.DeserializeToolConfig(prop0.Value, options)); + } + toolConfigs = dictionary; + continue; + } if (prop.NameEquals("base_url"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -176,6 +202,7 @@ internal static ResponsesA2APreviewTool DeserializeResponsesA2APreviewTool(JsonE additionalBinaryDataProperties, name, description, + toolConfigs ?? new ChangeTrackingDictionary(), baseUrl, agentCardPath, projectConnectionId); diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesA2APreviewTool.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesA2APreviewTool.cs index da505551f2ab..63a096eafb27 100644 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesA2APreviewTool.cs +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesA2APreviewTool.cs @@ -13,6 +13,7 @@ public partial class ResponsesA2APreviewTool : ResponsesTool /// Initializes a new instance of . public ResponsesA2APreviewTool() : base(ToolType.A2aPreview) { + ToolConfigs = new ChangeTrackingDictionary(); } /// Initializes a new instance of . @@ -20,6 +21,11 @@ public ResponsesA2APreviewTool() : base(ToolType.A2aPreview) /// Keeps track of any properties unknown to the library. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// /// Base URL of the agent. /// /// The path to the agent card relative to the `base_url`. @@ -29,10 +35,11 @@ public ResponsesA2APreviewTool() : base(ToolType.A2aPreview) /// The connection ID in the project for the A2A server. /// The connection stores authentication and other connection details needed to connect to the A2A server. /// - internal ResponsesA2APreviewTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, Uri baseUrl, string agentCardPath, string projectConnectionId) : base(@type, additionalBinaryDataProperties) + internal ResponsesA2APreviewTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, IDictionary toolConfigs, Uri baseUrl, string agentCardPath, string projectConnectionId) : base(@type, additionalBinaryDataProperties) { Name = name; Description = description; + ToolConfigs = toolConfigs; BaseUrl = baseUrl; AgentCardPath = agentCardPath; ProjectConnectionId = projectConnectionId; @@ -44,6 +51,13 @@ internal ResponsesA2APreviewTool(ToolType @type, IDictionary /// Optional user-defined description for this tool or configuration. public string Description { get; set; } + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + public IDictionary ToolConfigs { get; } + /// Base URL of the agent. public Uri BaseUrl { get; set; } diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesAzureAISearchTool.Serialization.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesAzureAISearchTool.Serialization.cs index d32af5efd21e..853a3ebb3c26 100644 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesAzureAISearchTool.Serialization.cs +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesAzureAISearchTool.Serialization.cs @@ -86,6 +86,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsCollectionDefined(ToolConfigs)) + { + writer.WritePropertyName("tool_configs"u8); + writer.WriteStartObject(); + foreach (var item in ToolConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } writer.WritePropertyName("azure_ai_search"u8); writer.WriteObjectValue(AzureAISearch, options); } @@ -119,6 +130,7 @@ internal static ResponsesAzureAISearchTool DeserializeResponsesAzureAISearchTool IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); string name = default; string description = default; + IDictionary toolConfigs = default; ResponsesAzureAISearchToolResource azureAISearch = default; foreach (var prop in element.EnumerateObject()) { @@ -137,6 +149,20 @@ internal static ResponsesAzureAISearchTool DeserializeResponsesAzureAISearchTool description = prop.Value.GetString(); continue; } + if (prop.NameEquals("tool_configs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, ToolConfig.DeserializeToolConfig(prop0.Value, options)); + } + toolConfigs = dictionary; + continue; + } if (prop.NameEquals("azure_ai_search"u8)) { azureAISearch = ResponsesAzureAISearchToolResource.DeserializeResponsesAzureAISearchToolResource(prop.Value, options); @@ -147,7 +173,13 @@ internal static ResponsesAzureAISearchTool DeserializeResponsesAzureAISearchTool additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ResponsesAzureAISearchTool(@type, additionalBinaryDataProperties, name, description, azureAISearch); + return new ResponsesAzureAISearchTool( + @type, + additionalBinaryDataProperties, + name, + description, + toolConfigs ?? new ChangeTrackingDictionary(), + azureAISearch); } } } diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesAzureAISearchTool.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesAzureAISearchTool.cs index a447f9985d67..cc7e19b2636c 100644 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesAzureAISearchTool.cs +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesAzureAISearchTool.cs @@ -17,6 +17,7 @@ public ResponsesAzureAISearchTool(ResponsesAzureAISearchToolResource azureAISear { Argument.AssertNotNull(azureAISearch, nameof(azureAISearch)); + ToolConfigs = new ChangeTrackingDictionary(); AzureAISearch = azureAISearch; } @@ -25,11 +26,17 @@ public ResponsesAzureAISearchTool(ResponsesAzureAISearchToolResource azureAISear /// Keeps track of any properties unknown to the library. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// /// The azure ai search index resource. - internal ResponsesAzureAISearchTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, ResponsesAzureAISearchToolResource azureAISearch) : base(@type, additionalBinaryDataProperties) + internal ResponsesAzureAISearchTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, IDictionary toolConfigs, ResponsesAzureAISearchToolResource azureAISearch) : base(@type, additionalBinaryDataProperties) { Name = name; Description = description; + ToolConfigs = toolConfigs; AzureAISearch = azureAISearch; } @@ -39,6 +46,13 @@ internal ResponsesAzureAISearchTool(ToolType @type, IDictionary Optional user-defined description for this tool or configuration. public string Description { get; set; } + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + public IDictionary ToolConfigs { get; } + /// The azure ai search index resource. public ResponsesAzureAISearchToolResource AzureAISearch { get; set; } } diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesAzureFunctionTool.Serialization.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesAzureFunctionTool.Serialization.cs index d2896de20fcb..0a655c64f20a 100644 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesAzureFunctionTool.Serialization.cs +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesAzureFunctionTool.Serialization.cs @@ -78,6 +78,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); writer.WritePropertyName("azure_function"u8); writer.WriteObjectValue(AzureFunction, options); + if (Optional.IsCollectionDefined(ToolConfigs)) + { + writer.WritePropertyName("tool_configs"u8); + writer.WriteStartObject(); + foreach (var item in ToolConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } } /// The JSON reader. @@ -108,6 +119,7 @@ internal static ResponsesAzureFunctionTool DeserializeResponsesAzureFunctionTool ToolType @type = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); ResponsesAzureFunctionDefinition azureFunction = default; + IDictionary toolConfigs = default; foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("type"u8)) @@ -120,12 +132,26 @@ internal static ResponsesAzureFunctionTool DeserializeResponsesAzureFunctionTool azureFunction = ResponsesAzureFunctionDefinition.DeserializeResponsesAzureFunctionDefinition(prop.Value, options); continue; } + if (prop.NameEquals("tool_configs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, ToolConfig.DeserializeToolConfig(prop0.Value, options)); + } + toolConfigs = dictionary; + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ResponsesAzureFunctionTool(@type, additionalBinaryDataProperties, azureFunction); + return new ResponsesAzureFunctionTool(@type, additionalBinaryDataProperties, azureFunction, toolConfigs ?? new ChangeTrackingDictionary()); } } } diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesAzureFunctionTool.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesAzureFunctionTool.cs index 0190eadbdc90..a2dbf3066a95 100644 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesAzureFunctionTool.cs +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesAzureFunctionTool.cs @@ -18,18 +18,32 @@ public ResponsesAzureFunctionTool(ResponsesAzureFunctionDefinition azureFunction Argument.AssertNotNull(azureFunction, nameof(azureFunction)); AzureFunction = azureFunction; + ToolConfigs = new ChangeTrackingDictionary(); } /// Initializes a new instance of . /// /// Keeps track of any properties unknown to the library. /// The Azure Function Tool definition. - internal ResponsesAzureFunctionTool(ToolType @type, IDictionary additionalBinaryDataProperties, ResponsesAzureFunctionDefinition azureFunction) : base(@type, additionalBinaryDataProperties) + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + internal ResponsesAzureFunctionTool(ToolType @type, IDictionary additionalBinaryDataProperties, ResponsesAzureFunctionDefinition azureFunction, IDictionary toolConfigs) : base(@type, additionalBinaryDataProperties) { AzureFunction = azureFunction; + ToolConfigs = toolConfigs; } /// The Azure Function Tool definition. public ResponsesAzureFunctionDefinition AzureFunction { get; set; } + + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + public IDictionary ToolConfigs { get; } } } diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesBingCustomSearchPreviewTool.Serialization.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesBingCustomSearchPreviewTool.Serialization.cs index b22b131a483a..0aedc8e6838a 100644 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesBingCustomSearchPreviewTool.Serialization.cs +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesBingCustomSearchPreviewTool.Serialization.cs @@ -86,6 +86,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsCollectionDefined(ToolConfigs)) + { + writer.WritePropertyName("tool_configs"u8); + writer.WriteStartObject(); + foreach (var item in ToolConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } writer.WritePropertyName("bing_custom_search_preview"u8); writer.WriteObjectValue(BingCustomSearchPreview, options); } @@ -119,6 +130,7 @@ internal static ResponsesBingCustomSearchPreviewTool DeserializeResponsesBingCus IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); string name = default; string description = default; + IDictionary toolConfigs = default; ResponsesBingCustomSearchToolParameters bingCustomSearchPreview = default; foreach (var prop in element.EnumerateObject()) { @@ -137,6 +149,20 @@ internal static ResponsesBingCustomSearchPreviewTool DeserializeResponsesBingCus description = prop.Value.GetString(); continue; } + if (prop.NameEquals("tool_configs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, ToolConfig.DeserializeToolConfig(prop0.Value, options)); + } + toolConfigs = dictionary; + continue; + } if (prop.NameEquals("bing_custom_search_preview"u8)) { bingCustomSearchPreview = ResponsesBingCustomSearchToolParameters.DeserializeResponsesBingCustomSearchToolParameters(prop.Value, options); @@ -147,7 +173,13 @@ internal static ResponsesBingCustomSearchPreviewTool DeserializeResponsesBingCus additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ResponsesBingCustomSearchPreviewTool(@type, additionalBinaryDataProperties, name, description, bingCustomSearchPreview); + return new ResponsesBingCustomSearchPreviewTool( + @type, + additionalBinaryDataProperties, + name, + description, + toolConfigs ?? new ChangeTrackingDictionary(), + bingCustomSearchPreview); } } } diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesBingCustomSearchPreviewTool.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesBingCustomSearchPreviewTool.cs index d6323835c11e..d99f6077c2a4 100644 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesBingCustomSearchPreviewTool.cs +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesBingCustomSearchPreviewTool.cs @@ -17,6 +17,7 @@ public ResponsesBingCustomSearchPreviewTool(ResponsesBingCustomSearchToolParamet { Argument.AssertNotNull(bingCustomSearchPreview, nameof(bingCustomSearchPreview)); + ToolConfigs = new ChangeTrackingDictionary(); BingCustomSearchPreview = bingCustomSearchPreview; } @@ -25,11 +26,17 @@ public ResponsesBingCustomSearchPreviewTool(ResponsesBingCustomSearchToolParamet /// Keeps track of any properties unknown to the library. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// /// The bing custom search tool parameters. - internal ResponsesBingCustomSearchPreviewTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, ResponsesBingCustomSearchToolParameters bingCustomSearchPreview) : base(@type, additionalBinaryDataProperties) + internal ResponsesBingCustomSearchPreviewTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, IDictionary toolConfigs, ResponsesBingCustomSearchToolParameters bingCustomSearchPreview) : base(@type, additionalBinaryDataProperties) { Name = name; Description = description; + ToolConfigs = toolConfigs; BingCustomSearchPreview = bingCustomSearchPreview; } @@ -39,6 +46,13 @@ internal ResponsesBingCustomSearchPreviewTool(ToolType @type, IDictionary Optional user-defined description for this tool or configuration. public string Description { get; set; } + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + public IDictionary ToolConfigs { get; } + /// The bing custom search tool parameters. public ResponsesBingCustomSearchToolParameters BingCustomSearchPreview { get; set; } } diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesBingGroundingTool.Serialization.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesBingGroundingTool.Serialization.cs index d8750b536e1f..b865e7f6e693 100644 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesBingGroundingTool.Serialization.cs +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesBingGroundingTool.Serialization.cs @@ -86,6 +86,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsCollectionDefined(ToolConfigs)) + { + writer.WritePropertyName("tool_configs"u8); + writer.WriteStartObject(); + foreach (var item in ToolConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } writer.WritePropertyName("bing_grounding"u8); writer.WriteObjectValue(BingGrounding, options); } @@ -119,6 +130,7 @@ internal static ResponsesBingGroundingTool DeserializeResponsesBingGroundingTool IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); string name = default; string description = default; + IDictionary toolConfigs = default; ResponsesBingGroundingSearchToolParameters bingGrounding = default; foreach (var prop in element.EnumerateObject()) { @@ -137,6 +149,20 @@ internal static ResponsesBingGroundingTool DeserializeResponsesBingGroundingTool description = prop.Value.GetString(); continue; } + if (prop.NameEquals("tool_configs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, ToolConfig.DeserializeToolConfig(prop0.Value, options)); + } + toolConfigs = dictionary; + continue; + } if (prop.NameEquals("bing_grounding"u8)) { bingGrounding = ResponsesBingGroundingSearchToolParameters.DeserializeResponsesBingGroundingSearchToolParameters(prop.Value, options); @@ -147,7 +173,13 @@ internal static ResponsesBingGroundingTool DeserializeResponsesBingGroundingTool additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ResponsesBingGroundingTool(@type, additionalBinaryDataProperties, name, description, bingGrounding); + return new ResponsesBingGroundingTool( + @type, + additionalBinaryDataProperties, + name, + description, + toolConfigs ?? new ChangeTrackingDictionary(), + bingGrounding); } } } diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesBingGroundingTool.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesBingGroundingTool.cs index 000b11eeae9f..f6ba2aa98d62 100644 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesBingGroundingTool.cs +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesBingGroundingTool.cs @@ -17,6 +17,7 @@ public ResponsesBingGroundingTool(ResponsesBingGroundingSearchToolParameters bin { Argument.AssertNotNull(bingGrounding, nameof(bingGrounding)); + ToolConfigs = new ChangeTrackingDictionary(); BingGrounding = bingGrounding; } @@ -25,11 +26,17 @@ public ResponsesBingGroundingTool(ResponsesBingGroundingSearchToolParameters bin /// Keeps track of any properties unknown to the library. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// /// The bing grounding search tool parameters. - internal ResponsesBingGroundingTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, ResponsesBingGroundingSearchToolParameters bingGrounding) : base(@type, additionalBinaryDataProperties) + internal ResponsesBingGroundingTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, IDictionary toolConfigs, ResponsesBingGroundingSearchToolParameters bingGrounding) : base(@type, additionalBinaryDataProperties) { Name = name; Description = description; + ToolConfigs = toolConfigs; BingGrounding = bingGrounding; } @@ -39,6 +46,13 @@ internal ResponsesBingGroundingTool(ToolType @type, IDictionary Optional user-defined description for this tool or configuration. public string Description { get; set; } + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + public IDictionary ToolConfigs { get; } + /// The bing grounding search tool parameters. public ResponsesBingGroundingSearchToolParameters BingGrounding { get; set; } } diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesBrowserAutomationPreviewTool.Serialization.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesBrowserAutomationPreviewTool.Serialization.cs index f42e1be3f991..423a00356458 100644 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesBrowserAutomationPreviewTool.Serialization.cs +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesBrowserAutomationPreviewTool.Serialization.cs @@ -86,6 +86,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsCollectionDefined(ToolConfigs)) + { + writer.WritePropertyName("tool_configs"u8); + writer.WriteStartObject(); + foreach (var item in ToolConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } writer.WritePropertyName("browser_automation_preview"u8); writer.WriteObjectValue(BrowserAutomationPreview, options); } @@ -119,6 +130,7 @@ internal static ResponsesBrowserAutomationPreviewTool DeserializeResponsesBrowse IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); string name = default; string description = default; + IDictionary toolConfigs = default; ResponsesBrowserAutomationToolParameters browserAutomationPreview = default; foreach (var prop in element.EnumerateObject()) { @@ -137,6 +149,20 @@ internal static ResponsesBrowserAutomationPreviewTool DeserializeResponsesBrowse description = prop.Value.GetString(); continue; } + if (prop.NameEquals("tool_configs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, ToolConfig.DeserializeToolConfig(prop0.Value, options)); + } + toolConfigs = dictionary; + continue; + } if (prop.NameEquals("browser_automation_preview"u8)) { browserAutomationPreview = ResponsesBrowserAutomationToolParameters.DeserializeResponsesBrowserAutomationToolParameters(prop.Value, options); @@ -147,7 +173,13 @@ internal static ResponsesBrowserAutomationPreviewTool DeserializeResponsesBrowse additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ResponsesBrowserAutomationPreviewTool(@type, additionalBinaryDataProperties, name, description, browserAutomationPreview); + return new ResponsesBrowserAutomationPreviewTool( + @type, + additionalBinaryDataProperties, + name, + description, + toolConfigs ?? new ChangeTrackingDictionary(), + browserAutomationPreview); } } } diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesBrowserAutomationPreviewTool.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesBrowserAutomationPreviewTool.cs index ad985e2c9a7e..d565dacf36bf 100644 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesBrowserAutomationPreviewTool.cs +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesBrowserAutomationPreviewTool.cs @@ -17,6 +17,7 @@ public ResponsesBrowserAutomationPreviewTool(ResponsesBrowserAutomationToolParam { Argument.AssertNotNull(browserAutomationPreview, nameof(browserAutomationPreview)); + ToolConfigs = new ChangeTrackingDictionary(); BrowserAutomationPreview = browserAutomationPreview; } @@ -25,11 +26,17 @@ public ResponsesBrowserAutomationPreviewTool(ResponsesBrowserAutomationToolParam /// Keeps track of any properties unknown to the library. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// /// The Browser Automation Tool parameters. - internal ResponsesBrowserAutomationPreviewTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, ResponsesBrowserAutomationToolParameters browserAutomationPreview) : base(@type, additionalBinaryDataProperties) + internal ResponsesBrowserAutomationPreviewTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, IDictionary toolConfigs, ResponsesBrowserAutomationToolParameters browserAutomationPreview) : base(@type, additionalBinaryDataProperties) { Name = name; Description = description; + ToolConfigs = toolConfigs; BrowserAutomationPreview = browserAutomationPreview; } @@ -39,6 +46,13 @@ internal ResponsesBrowserAutomationPreviewTool(ToolType @type, IDictionary Optional user-defined description for this tool or configuration. public string Description { get; set; } + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + public IDictionary ToolConfigs { get; } + /// The Browser Automation Tool parameters. public ResponsesBrowserAutomationToolParameters BrowserAutomationPreview { get; set; } } diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesCaptureStructuredOutputsTool.Serialization.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesCaptureStructuredOutputsTool.Serialization.cs index 6149fe76d8de..e948675bb54c 100644 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesCaptureStructuredOutputsTool.Serialization.cs +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesCaptureStructuredOutputsTool.Serialization.cs @@ -86,6 +86,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsCollectionDefined(ToolConfigs)) + { + writer.WritePropertyName("tool_configs"u8); + writer.WriteStartObject(); + foreach (var item in ToolConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } writer.WritePropertyName("outputs"u8); writer.WriteObjectValue(Outputs, options); } @@ -119,6 +130,7 @@ internal static ResponsesCaptureStructuredOutputsTool DeserializeResponsesCaptur IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); string name = default; string description = default; + IDictionary toolConfigs = default; ResponsesStructuredOutputDefinition outputs = default; foreach (var prop in element.EnumerateObject()) { @@ -137,6 +149,20 @@ internal static ResponsesCaptureStructuredOutputsTool DeserializeResponsesCaptur description = prop.Value.GetString(); continue; } + if (prop.NameEquals("tool_configs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, ToolConfig.DeserializeToolConfig(prop0.Value, options)); + } + toolConfigs = dictionary; + continue; + } if (prop.NameEquals("outputs"u8)) { outputs = ResponsesStructuredOutputDefinition.DeserializeResponsesStructuredOutputDefinition(prop.Value, options); @@ -147,7 +173,13 @@ internal static ResponsesCaptureStructuredOutputsTool DeserializeResponsesCaptur additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ResponsesCaptureStructuredOutputsTool(@type, additionalBinaryDataProperties, name, description, outputs); + return new ResponsesCaptureStructuredOutputsTool( + @type, + additionalBinaryDataProperties, + name, + description, + toolConfigs ?? new ChangeTrackingDictionary(), + outputs); } } } diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesCaptureStructuredOutputsTool.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesCaptureStructuredOutputsTool.cs index 94f48cd2f8d8..67ef0cdf5f12 100644 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesCaptureStructuredOutputsTool.cs +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesCaptureStructuredOutputsTool.cs @@ -17,6 +17,7 @@ public ResponsesCaptureStructuredOutputsTool(ResponsesStructuredOutputDefinition { Argument.AssertNotNull(outputs, nameof(outputs)); + ToolConfigs = new ChangeTrackingDictionary(); Outputs = outputs; } @@ -25,11 +26,17 @@ public ResponsesCaptureStructuredOutputsTool(ResponsesStructuredOutputDefinition /// Keeps track of any properties unknown to the library. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// /// The structured outputs to capture from the model. - internal ResponsesCaptureStructuredOutputsTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, ResponsesStructuredOutputDefinition outputs) : base(@type, additionalBinaryDataProperties) + internal ResponsesCaptureStructuredOutputsTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, IDictionary toolConfigs, ResponsesStructuredOutputDefinition outputs) : base(@type, additionalBinaryDataProperties) { Name = name; Description = description; + ToolConfigs = toolConfigs; Outputs = outputs; } @@ -39,6 +46,13 @@ internal ResponsesCaptureStructuredOutputsTool(ToolType @type, IDictionary Optional user-defined description for this tool or configuration. public string Description { get; set; } + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + public IDictionary ToolConfigs { get; } + /// The structured outputs to capture from the model. public ResponsesStructuredOutputDefinition Outputs { get; set; } } diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesFabricIQPreviewTool.Serialization.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesFabricIQPreviewTool.Serialization.cs index 376de33fba20..ae43614b9ee5 100644 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesFabricIQPreviewTool.Serialization.cs +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesFabricIQPreviewTool.Serialization.cs @@ -110,6 +110,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsCollectionDefined(ToolConfigs)) + { + writer.WritePropertyName("tool_configs"u8); + writer.WriteStartObject(); + foreach (var item in ToolConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } } /// The JSON reader. @@ -145,6 +156,7 @@ internal static ResponsesFabricIQPreviewTool DeserializeResponsesFabricIQPreview BinaryData requireApproval = default; string name = default; string description = default; + IDictionary toolConfigs = default; foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("type"u8)) @@ -191,6 +203,20 @@ internal static ResponsesFabricIQPreviewTool DeserializeResponsesFabricIQPreview description = prop.Value.GetString(); continue; } + if (prop.NameEquals("tool_configs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, ToolConfig.DeserializeToolConfig(prop0.Value, options)); + } + toolConfigs = dictionary; + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); @@ -204,7 +230,8 @@ internal static ResponsesFabricIQPreviewTool DeserializeResponsesFabricIQPreview serverUrl, requireApproval, name, - description); + description, + toolConfigs ?? new ChangeTrackingDictionary()); } } } diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesFabricIQPreviewTool.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesFabricIQPreviewTool.cs index d6c36ecd8f0d..bcfd42df9826 100644 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesFabricIQPreviewTool.cs +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesFabricIQPreviewTool.cs @@ -19,6 +19,7 @@ public ResponsesFabricIQPreviewTool(string projectConnectionId) : base(ToolType. Argument.AssertNotNull(projectConnectionId, nameof(projectConnectionId)); ProjectConnectionId = projectConnectionId; + ToolConfigs = new ChangeTrackingDictionary(); } /// Initializes a new instance of . @@ -30,7 +31,12 @@ public ResponsesFabricIQPreviewTool(string projectConnectionId) : base(ToolType. /// (Optional) Whether the agent requires approval before executing actions. Default is always. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. - internal ResponsesFabricIQPreviewTool(ToolType @type, IDictionary additionalBinaryDataProperties, string projectConnectionId, string serverLabel, Uri serverUrl, BinaryData requireApproval, string name, string description) : base(@type, additionalBinaryDataProperties) + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + internal ResponsesFabricIQPreviewTool(ToolType @type, IDictionary additionalBinaryDataProperties, string projectConnectionId, string serverLabel, Uri serverUrl, BinaryData requireApproval, string name, string description, IDictionary toolConfigs) : base(@type, additionalBinaryDataProperties) { ProjectConnectionId = projectConnectionId; ServerLabel = serverLabel; @@ -38,6 +44,7 @@ internal ResponsesFabricIQPreviewTool(ToolType @type, IDictionary The ID of the FabricIQ project connection. @@ -95,5 +102,12 @@ internal ResponsesFabricIQPreviewTool(ToolType @type, IDictionary Optional user-defined description for this tool or configuration. public string Description { get; set; } + + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + public IDictionary ToolConfigs { get; } } } diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesFunctionShellToolParam.Serialization.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesFunctionShellToolParam.Serialization.cs index 1c77dab4107e..8e935416f573 100644 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesFunctionShellToolParam.Serialization.cs +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesFunctionShellToolParam.Serialization.cs @@ -86,6 +86,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsCollectionDefined(ToolConfigs)) + { + writer.WritePropertyName("tool_configs"u8); + writer.WriteStartObject(); + foreach (var item in ToolConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } } /// The JSON reader. @@ -118,6 +129,7 @@ internal static ResponsesFunctionShellToolParam DeserializeResponsesFunctionShel ResponsesFunctionShellToolParamEnvironment environment = default; string name = default; string description = default; + IDictionary toolConfigs = default; foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("type"u8)) @@ -145,12 +157,32 @@ internal static ResponsesFunctionShellToolParam DeserializeResponsesFunctionShel description = prop.Value.GetString(); continue; } + if (prop.NameEquals("tool_configs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, ToolConfig.DeserializeToolConfig(prop0.Value, options)); + } + toolConfigs = dictionary; + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ResponsesFunctionShellToolParam(@type, additionalBinaryDataProperties, environment, name, description); + return new ResponsesFunctionShellToolParam( + @type, + additionalBinaryDataProperties, + environment, + name, + description, + toolConfigs ?? new ChangeTrackingDictionary()); } } } diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesFunctionShellToolParam.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesFunctionShellToolParam.cs index 150269deb7dd..bcdb5695d734 100644 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesFunctionShellToolParam.cs +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesFunctionShellToolParam.cs @@ -13,6 +13,7 @@ public partial class ResponsesFunctionShellToolParam : ResponsesTool /// Initializes a new instance of . public ResponsesFunctionShellToolParam() : base(ToolType.Shell) { + ToolConfigs = new ChangeTrackingDictionary(); } /// Initializes a new instance of . @@ -21,11 +22,17 @@ public ResponsesFunctionShellToolParam() : base(ToolType.Shell) /// /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. - internal ResponsesFunctionShellToolParam(ToolType @type, IDictionary additionalBinaryDataProperties, ResponsesFunctionShellToolParamEnvironment environment, string name, string description) : base(@type, additionalBinaryDataProperties) + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + internal ResponsesFunctionShellToolParam(ToolType @type, IDictionary additionalBinaryDataProperties, ResponsesFunctionShellToolParamEnvironment environment, string name, string description, IDictionary toolConfigs) : base(@type, additionalBinaryDataProperties) { Environment = environment; Name = name; Description = description; + ToolConfigs = toolConfigs; } /// Gets or sets the Environment. @@ -36,5 +43,12 @@ internal ResponsesFunctionShellToolParam(ToolType @type, IDictionary Optional user-defined description for this tool or configuration. public string Description { get; set; } + + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + public IDictionary ToolConfigs { get; } } } diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesLocalShellToolParam.Serialization.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesLocalShellToolParam.Serialization.cs index 62ff9bfe1f1f..ecc9d7ac21e7 100644 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesLocalShellToolParam.Serialization.cs +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesLocalShellToolParam.Serialization.cs @@ -81,6 +81,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsCollectionDefined(ToolConfigs)) + { + writer.WritePropertyName("tool_configs"u8); + writer.WriteStartObject(); + foreach (var item in ToolConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } } /// The JSON reader. @@ -112,6 +123,7 @@ internal static ResponsesLocalShellToolParam DeserializeResponsesLocalShellToolP IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); string name = default; string description = default; + IDictionary toolConfigs = default; foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("type"u8)) @@ -129,12 +141,26 @@ internal static ResponsesLocalShellToolParam DeserializeResponsesLocalShellToolP description = prop.Value.GetString(); continue; } + if (prop.NameEquals("tool_configs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, ToolConfig.DeserializeToolConfig(prop0.Value, options)); + } + toolConfigs = dictionary; + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ResponsesLocalShellToolParam(@type, additionalBinaryDataProperties, name, description); + return new ResponsesLocalShellToolParam(@type, additionalBinaryDataProperties, name, description, toolConfigs ?? new ChangeTrackingDictionary()); } } } diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesLocalShellToolParam.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesLocalShellToolParam.cs index aa732679bee1..32ac04ae4e6e 100644 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesLocalShellToolParam.cs +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesLocalShellToolParam.cs @@ -13,6 +13,7 @@ public partial class ResponsesLocalShellToolParam : ResponsesTool /// Initializes a new instance of . public ResponsesLocalShellToolParam() : base(ToolType.LocalShell) { + ToolConfigs = new ChangeTrackingDictionary(); } /// Initializes a new instance of . @@ -20,10 +21,16 @@ public ResponsesLocalShellToolParam() : base(ToolType.LocalShell) /// Keeps track of any properties unknown to the library. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. - internal ResponsesLocalShellToolParam(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description) : base(@type, additionalBinaryDataProperties) + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + internal ResponsesLocalShellToolParam(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, IDictionary toolConfigs) : base(@type, additionalBinaryDataProperties) { Name = name; Description = description; + ToolConfigs = toolConfigs; } /// Optional user-defined name for this tool or configuration. @@ -31,5 +38,12 @@ internal ResponsesLocalShellToolParam(ToolType @type, IDictionary Optional user-defined description for this tool or configuration. public string Description { get; set; } + + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + public IDictionary ToolConfigs { get; } } } diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesMemorySearchPreviewTool.Serialization.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesMemorySearchPreviewTool.Serialization.cs index 4450df738eae..309fba3a8ba8 100644 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesMemorySearchPreviewTool.Serialization.cs +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesMemorySearchPreviewTool.Serialization.cs @@ -86,6 +86,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsCollectionDefined(ToolConfigs)) + { + writer.WritePropertyName("tool_configs"u8); + writer.WriteStartObject(); + foreach (var item in ToolConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } writer.WritePropertyName("memory_store_name"u8); writer.WriteStringValue(MemoryStoreName); writer.WritePropertyName("scope"u8); @@ -131,6 +142,7 @@ internal static ResponsesMemorySearchPreviewTool DeserializeResponsesMemorySearc IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); string name = default; string description = default; + IDictionary toolConfigs = default; string memoryStoreName = default; string scope = default; ResponsesMemorySearchOptions searchOptions = default; @@ -152,6 +164,20 @@ internal static ResponsesMemorySearchPreviewTool DeserializeResponsesMemorySearc description = prop.Value.GetString(); continue; } + if (prop.NameEquals("tool_configs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, ToolConfig.DeserializeToolConfig(prop0.Value, options)); + } + toolConfigs = dictionary; + continue; + } if (prop.NameEquals("memory_store_name"u8)) { memoryStoreName = prop.Value.GetString(); @@ -190,6 +216,7 @@ internal static ResponsesMemorySearchPreviewTool DeserializeResponsesMemorySearc additionalBinaryDataProperties, name, description, + toolConfigs ?? new ChangeTrackingDictionary(), memoryStoreName, scope, searchOptions, diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesMemorySearchPreviewTool.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesMemorySearchPreviewTool.cs index 8708d71d2afb..daeddf82f4e0 100644 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesMemorySearchPreviewTool.cs +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesMemorySearchPreviewTool.cs @@ -23,6 +23,7 @@ public ResponsesMemorySearchPreviewTool(string memoryStoreName, string scope) : Argument.AssertNotNull(memoryStoreName, nameof(memoryStoreName)); Argument.AssertNotNull(scope, nameof(scope)); + ToolConfigs = new ChangeTrackingDictionary(); MemoryStoreName = memoryStoreName; Scope = scope; } @@ -32,6 +33,11 @@ public ResponsesMemorySearchPreviewTool(string memoryStoreName, string scope) : /// Keeps track of any properties unknown to the library. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// /// The name of the memory store to use. /// /// The namespace used to group and isolate memories, such as a user ID. @@ -40,10 +46,11 @@ public ResponsesMemorySearchPreviewTool(string memoryStoreName, string scope) : /// /// Options for searching the memory store. /// Time to wait before updating memories after inactivity (seconds). Default 300. - internal ResponsesMemorySearchPreviewTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, string memoryStoreName, string scope, ResponsesMemorySearchOptions searchOptions, int? updateDelayInSeconds) : base(@type, additionalBinaryDataProperties) + internal ResponsesMemorySearchPreviewTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, IDictionary toolConfigs, string memoryStoreName, string scope, ResponsesMemorySearchOptions searchOptions, int? updateDelayInSeconds) : base(@type, additionalBinaryDataProperties) { Name = name; Description = description; + ToolConfigs = toolConfigs; MemoryStoreName = memoryStoreName; Scope = scope; SearchOptions = searchOptions; @@ -56,6 +63,13 @@ internal ResponsesMemorySearchPreviewTool(ToolType @type, IDictionary Optional user-defined description for this tool or configuration. public string Description { get; set; } + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + public IDictionary ToolConfigs { get; } + /// The name of the memory store to use. public string MemoryStoreName { get; set; } diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesMicrosoftFabricPreviewTool.Serialization.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesMicrosoftFabricPreviewTool.Serialization.cs index 3699a7aac9f2..6ce0f2643c09 100644 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesMicrosoftFabricPreviewTool.Serialization.cs +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesMicrosoftFabricPreviewTool.Serialization.cs @@ -86,6 +86,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsCollectionDefined(ToolConfigs)) + { + writer.WritePropertyName("tool_configs"u8); + writer.WriteStartObject(); + foreach (var item in ToolConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } writer.WritePropertyName("fabric_dataagent_preview"u8); writer.WriteObjectValue(FabricDataagentPreview, options); } @@ -119,6 +130,7 @@ internal static ResponsesMicrosoftFabricPreviewTool DeserializeResponsesMicrosof IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); string name = default; string description = default; + IDictionary toolConfigs = default; ResponsesFabricDataAgentToolOptions fabricDataagentPreview = default; foreach (var prop in element.EnumerateObject()) { @@ -137,6 +149,20 @@ internal static ResponsesMicrosoftFabricPreviewTool DeserializeResponsesMicrosof description = prop.Value.GetString(); continue; } + if (prop.NameEquals("tool_configs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, ToolConfig.DeserializeToolConfig(prop0.Value, options)); + } + toolConfigs = dictionary; + continue; + } if (prop.NameEquals("fabric_dataagent_preview"u8)) { fabricDataagentPreview = ResponsesFabricDataAgentToolOptions.DeserializeResponsesFabricDataAgentToolOptions(prop.Value, options); @@ -147,7 +173,13 @@ internal static ResponsesMicrosoftFabricPreviewTool DeserializeResponsesMicrosof additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ResponsesMicrosoftFabricPreviewTool(@type, additionalBinaryDataProperties, name, description, fabricDataagentPreview); + return new ResponsesMicrosoftFabricPreviewTool( + @type, + additionalBinaryDataProperties, + name, + description, + toolConfigs ?? new ChangeTrackingDictionary(), + fabricDataagentPreview); } } } diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesMicrosoftFabricPreviewTool.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesMicrosoftFabricPreviewTool.cs index a5f36177a109..571a0cc11596 100644 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesMicrosoftFabricPreviewTool.cs +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesMicrosoftFabricPreviewTool.cs @@ -17,6 +17,7 @@ public ResponsesMicrosoftFabricPreviewTool(ResponsesFabricDataAgentToolOptions f { Argument.AssertNotNull(fabricDataagentPreview, nameof(fabricDataagentPreview)); + ToolConfigs = new ChangeTrackingDictionary(); FabricDataagentPreview = fabricDataagentPreview; } @@ -25,11 +26,17 @@ public ResponsesMicrosoftFabricPreviewTool(ResponsesFabricDataAgentToolOptions f /// Keeps track of any properties unknown to the library. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// /// The fabric data agent tool parameters. - internal ResponsesMicrosoftFabricPreviewTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, ResponsesFabricDataAgentToolOptions fabricDataagentPreview) : base(@type, additionalBinaryDataProperties) + internal ResponsesMicrosoftFabricPreviewTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, IDictionary toolConfigs, ResponsesFabricDataAgentToolOptions fabricDataagentPreview) : base(@type, additionalBinaryDataProperties) { Name = name; Description = description; + ToolConfigs = toolConfigs; FabricDataagentPreview = fabricDataagentPreview; } @@ -39,6 +46,13 @@ internal ResponsesMicrosoftFabricPreviewTool(ToolType @type, IDictionary Optional user-defined description for this tool or configuration. public string Description { get; set; } + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + public IDictionary ToolConfigs { get; } + /// The fabric data agent tool parameters. public ResponsesFabricDataAgentToolOptions FabricDataagentPreview { get; set; } } diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesOpenApiTool.Serialization.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesOpenApiTool.Serialization.cs index 0d071c1b5c1c..7493c68b0cb5 100644 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesOpenApiTool.Serialization.cs +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesOpenApiTool.Serialization.cs @@ -78,6 +78,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); writer.WritePropertyName("openapi"u8); writer.WriteObjectValue(OpenApi, options); + if (Optional.IsCollectionDefined(ToolConfigs)) + { + writer.WritePropertyName("tool_configs"u8); + writer.WriteStartObject(); + foreach (var item in ToolConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } } /// The JSON reader. @@ -108,6 +119,7 @@ internal static ResponsesOpenApiTool DeserializeResponsesOpenApiTool(JsonElement ToolType @type = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); ResponsesOpenApiFunctionDefinition openApi = default; + IDictionary toolConfigs = default; foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("type"u8)) @@ -120,12 +132,26 @@ internal static ResponsesOpenApiTool DeserializeResponsesOpenApiTool(JsonElement openApi = ResponsesOpenApiFunctionDefinition.DeserializeResponsesOpenApiFunctionDefinition(prop.Value, options); continue; } + if (prop.NameEquals("tool_configs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, ToolConfig.DeserializeToolConfig(prop0.Value, options)); + } + toolConfigs = dictionary; + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ResponsesOpenApiTool(@type, additionalBinaryDataProperties, openApi); + return new ResponsesOpenApiTool(@type, additionalBinaryDataProperties, openApi, toolConfigs ?? new ChangeTrackingDictionary()); } } } diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesOpenApiTool.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesOpenApiTool.cs index b3ce312d4074..a2a185be67f8 100644 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesOpenApiTool.cs +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesOpenApiTool.cs @@ -18,18 +18,32 @@ public ResponsesOpenApiTool(ResponsesOpenApiFunctionDefinition openApi) : base(T Argument.AssertNotNull(openApi, nameof(openApi)); OpenApi = openApi; + ToolConfigs = new ChangeTrackingDictionary(); } /// Initializes a new instance of . /// /// Keeps track of any properties unknown to the library. /// The openapi function definition. - internal ResponsesOpenApiTool(ToolType @type, IDictionary additionalBinaryDataProperties, ResponsesOpenApiFunctionDefinition openApi) : base(@type, additionalBinaryDataProperties) + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + internal ResponsesOpenApiTool(ToolType @type, IDictionary additionalBinaryDataProperties, ResponsesOpenApiFunctionDefinition openApi, IDictionary toolConfigs) : base(@type, additionalBinaryDataProperties) { OpenApi = openApi; + ToolConfigs = toolConfigs; } /// The openapi function definition. public ResponsesOpenApiFunctionDefinition OpenApi { get; set; } + + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + public IDictionary ToolConfigs { get; } } } diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesSharepointPreviewTool.Serialization.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesSharepointPreviewTool.Serialization.cs index c6c591b79f5d..535c63a77adf 100644 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesSharepointPreviewTool.Serialization.cs +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesSharepointPreviewTool.Serialization.cs @@ -86,6 +86,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsCollectionDefined(ToolConfigs)) + { + writer.WritePropertyName("tool_configs"u8); + writer.WriteStartObject(); + foreach (var item in ToolConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } writer.WritePropertyName("sharepoint_grounding_preview"u8); writer.WriteObjectValue(SharepointGroundingPreview, options); } @@ -119,6 +130,7 @@ internal static ResponsesSharepointPreviewTool DeserializeResponsesSharepointPre IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); string name = default; string description = default; + IDictionary toolConfigs = default; ResponsesSharepointGroundingToolParameters sharepointGroundingPreview = default; foreach (var prop in element.EnumerateObject()) { @@ -137,6 +149,20 @@ internal static ResponsesSharepointPreviewTool DeserializeResponsesSharepointPre description = prop.Value.GetString(); continue; } + if (prop.NameEquals("tool_configs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, ToolConfig.DeserializeToolConfig(prop0.Value, options)); + } + toolConfigs = dictionary; + continue; + } if (prop.NameEquals("sharepoint_grounding_preview"u8)) { sharepointGroundingPreview = ResponsesSharepointGroundingToolParameters.DeserializeResponsesSharepointGroundingToolParameters(prop.Value, options); @@ -147,7 +173,13 @@ internal static ResponsesSharepointPreviewTool DeserializeResponsesSharepointPre additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ResponsesSharepointPreviewTool(@type, additionalBinaryDataProperties, name, description, sharepointGroundingPreview); + return new ResponsesSharepointPreviewTool( + @type, + additionalBinaryDataProperties, + name, + description, + toolConfigs ?? new ChangeTrackingDictionary(), + sharepointGroundingPreview); } } } diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesSharepointPreviewTool.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesSharepointPreviewTool.cs index d8e13e9955dd..58c6375e62cf 100644 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesSharepointPreviewTool.cs +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesSharepointPreviewTool.cs @@ -17,6 +17,7 @@ public ResponsesSharepointPreviewTool(ResponsesSharepointGroundingToolParameters { Argument.AssertNotNull(sharepointGroundingPreview, nameof(sharepointGroundingPreview)); + ToolConfigs = new ChangeTrackingDictionary(); SharepointGroundingPreview = sharepointGroundingPreview; } @@ -25,11 +26,17 @@ public ResponsesSharepointPreviewTool(ResponsesSharepointGroundingToolParameters /// Keeps track of any properties unknown to the library. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// /// The sharepoint grounding tool parameters. - internal ResponsesSharepointPreviewTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, ResponsesSharepointGroundingToolParameters sharepointGroundingPreview) : base(@type, additionalBinaryDataProperties) + internal ResponsesSharepointPreviewTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, IDictionary toolConfigs, ResponsesSharepointGroundingToolParameters sharepointGroundingPreview) : base(@type, additionalBinaryDataProperties) { Name = name; Description = description; + ToolConfigs = toolConfigs; SharepointGroundingPreview = sharepointGroundingPreview; } @@ -39,6 +46,13 @@ internal ResponsesSharepointPreviewTool(ToolType @type, IDictionary Optional user-defined description for this tool or configuration. public string Description { get; set; } + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + public IDictionary ToolConfigs { get; } + /// The sharepoint grounding tool parameters. public ResponsesSharepointGroundingToolParameters SharepointGroundingPreview { get; set; } } diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesToolboxSearchPreviewTool.Serialization.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesToolboxSearchPreviewTool.Serialization.cs index 8133b9b5d5be..f3bff7cb6324 100644 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesToolboxSearchPreviewTool.Serialization.cs +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesToolboxSearchPreviewTool.Serialization.cs @@ -85,6 +85,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsCollectionDefined(ToolConfigs)) + { + writer.WritePropertyName("tool_configs"u8); + writer.WriteStartObject(); + foreach (var item in ToolConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } } /// The JSON reader. @@ -116,6 +127,7 @@ internal static ResponsesToolboxSearchPreviewTool DeserializeResponsesToolboxSea IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); string name = default; string description = default; + IDictionary toolConfigs = default; foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("type"u8)) @@ -133,12 +145,26 @@ internal static ResponsesToolboxSearchPreviewTool DeserializeResponsesToolboxSea description = prop.Value.GetString(); continue; } + if (prop.NameEquals("tool_configs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, ToolConfig.DeserializeToolConfig(prop0.Value, options)); + } + toolConfigs = dictionary; + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ResponsesToolboxSearchPreviewTool(@type, additionalBinaryDataProperties, name, description); + return new ResponsesToolboxSearchPreviewTool(@type, additionalBinaryDataProperties, name, description, toolConfigs ?? new ChangeTrackingDictionary()); } } } diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesToolboxSearchPreviewTool.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesToolboxSearchPreviewTool.cs index 82e9d0299fed..3aa36d56b163 100644 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesToolboxSearchPreviewTool.cs +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesToolboxSearchPreviewTool.cs @@ -17,6 +17,7 @@ public partial class ResponsesToolboxSearchPreviewTool : ResponsesTool /// Initializes a new instance of . public ResponsesToolboxSearchPreviewTool() : base(ToolType.ToolboxSearchPreview) { + ToolConfigs = new ChangeTrackingDictionary(); } /// Initializes a new instance of . @@ -24,10 +25,16 @@ public ResponsesToolboxSearchPreviewTool() : base(ToolType.ToolboxSearchPreview) /// Keeps track of any properties unknown to the library. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. - internal ResponsesToolboxSearchPreviewTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description) : base(@type, additionalBinaryDataProperties) + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + internal ResponsesToolboxSearchPreviewTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, IDictionary toolConfigs) : base(@type, additionalBinaryDataProperties) { Name = name; Description = description; + ToolConfigs = toolConfigs; } /// Optional user-defined name for this tool or configuration. @@ -35,5 +42,12 @@ internal ResponsesToolboxSearchPreviewTool(ToolType @type, IDictionary Optional user-defined description for this tool or configuration. public string Description { get; set; } + + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + public IDictionary ToolConfigs { get; } } } diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesWebSearchTool.Serialization.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesWebSearchTool.Serialization.cs index be02414d153f..b4b155ceb384 100644 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesWebSearchTool.Serialization.cs +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesWebSearchTool.Serialization.cs @@ -96,6 +96,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsCollectionDefined(ToolConfigs)) + { + writer.WritePropertyName("tool_configs"u8); + writer.WriteStartObject(); + foreach (var item in ToolConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } if (Optional.IsDefined(CustomSearchConfiguration)) { writer.WritePropertyName("custom_search_configuration"u8); @@ -135,6 +146,7 @@ internal static ResponsesWebSearchTool DeserializeResponsesWebSearchTool(JsonEle ResponsesWebSearchToolSearchContextSize? searchContextSize = default; string name = default; string description = default; + IDictionary toolConfigs = default; ResponsesWebSearchConfiguration customSearchConfiguration = default; foreach (var prop in element.EnumerateObject()) { @@ -182,6 +194,20 @@ internal static ResponsesWebSearchTool DeserializeResponsesWebSearchTool(JsonEle description = prop.Value.GetString(); continue; } + if (prop.NameEquals("tool_configs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, ToolConfig.DeserializeToolConfig(prop0.Value, options)); + } + toolConfigs = dictionary; + continue; + } if (prop.NameEquals("custom_search_configuration"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -204,6 +230,7 @@ internal static ResponsesWebSearchTool DeserializeResponsesWebSearchTool(JsonEle searchContextSize, name, description, + toolConfigs ?? new ChangeTrackingDictionary(), customSearchConfiguration); } } diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesWebSearchTool.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesWebSearchTool.cs index 93408c011aee..ea7b0402d998 100644 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesWebSearchTool.cs +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesWebSearchTool.cs @@ -13,6 +13,7 @@ public partial class ResponsesWebSearchTool : ResponsesTool /// Initializes a new instance of . public ResponsesWebSearchTool() : base(ToolType.WebSearch) { + ToolConfigs = new ChangeTrackingDictionary(); } /// Initializes a new instance of . @@ -23,17 +24,23 @@ public ResponsesWebSearchTool() : base(ToolType.WebSearch) /// High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// /// /// The project connections attached to this tool. There can be a maximum of 1 connection /// resource attached to the tool. /// - internal ResponsesWebSearchTool(ToolType @type, IDictionary additionalBinaryDataProperties, WebSearchToolFilters filters, ResponsesWebSearchApproximateLocation userLocation, ResponsesWebSearchToolSearchContextSize? searchContextSize, string name, string description, ResponsesWebSearchConfiguration customSearchConfiguration) : base(@type, additionalBinaryDataProperties) + internal ResponsesWebSearchTool(ToolType @type, IDictionary additionalBinaryDataProperties, WebSearchToolFilters filters, ResponsesWebSearchApproximateLocation userLocation, ResponsesWebSearchToolSearchContextSize? searchContextSize, string name, string description, IDictionary toolConfigs, ResponsesWebSearchConfiguration customSearchConfiguration) : base(@type, additionalBinaryDataProperties) { Filters = filters; UserLocation = userLocation; SearchContextSize = searchContextSize; Name = name; Description = description; + ToolConfigs = toolConfigs; CustomSearchConfiguration = customSearchConfiguration; } @@ -52,6 +59,13 @@ internal ResponsesWebSearchTool(ToolType @type, IDictionary /// Optional user-defined description for this tool or configuration. public string Description { get; set; } + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + public IDictionary ToolConfigs { get; } + /// /// The project connections attached to this tool. There can be a maximum of 1 connection /// resource attached to the tool. diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesWorkIQPreviewTool.Serialization.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesWorkIQPreviewTool.Serialization.cs index b06636c9928a..0290686fed7e 100644 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesWorkIQPreviewTool.Serialization.cs +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesWorkIQPreviewTool.Serialization.cs @@ -88,6 +88,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsCollectionDefined(ToolConfigs)) + { + writer.WritePropertyName("tool_configs"u8); + writer.WriteStartObject(); + foreach (var item in ToolConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } } /// The JSON reader. @@ -120,6 +131,7 @@ internal static ResponsesWorkIQPreviewTool DeserializeResponsesWorkIQPreviewTool string projectConnectionId = default; string name = default; string description = default; + IDictionary toolConfigs = default; foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("type"u8)) @@ -142,12 +154,32 @@ internal static ResponsesWorkIQPreviewTool DeserializeResponsesWorkIQPreviewTool description = prop.Value.GetString(); continue; } + if (prop.NameEquals("tool_configs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, ToolConfig.DeserializeToolConfig(prop0.Value, options)); + } + toolConfigs = dictionary; + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ResponsesWorkIQPreviewTool(@type, additionalBinaryDataProperties, projectConnectionId, name, description); + return new ResponsesWorkIQPreviewTool( + @type, + additionalBinaryDataProperties, + projectConnectionId, + name, + description, + toolConfigs ?? new ChangeTrackingDictionary()); } } } diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesWorkIQPreviewTool.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesWorkIQPreviewTool.cs index bfd70ad447cc..af02af77b29d 100644 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesWorkIQPreviewTool.cs +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ResponsesWorkIQPreviewTool.cs @@ -18,6 +18,7 @@ public ResponsesWorkIQPreviewTool(string projectConnectionId) : base(ToolType.Wo Argument.AssertNotNull(projectConnectionId, nameof(projectConnectionId)); ProjectConnectionId = projectConnectionId; + ToolConfigs = new ChangeTrackingDictionary(); } /// Initializes a new instance of . @@ -26,11 +27,17 @@ public ResponsesWorkIQPreviewTool(string projectConnectionId) : base(ToolType.Wo /// The ID of the WorkIQ project connection. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. - internal ResponsesWorkIQPreviewTool(ToolType @type, IDictionary additionalBinaryDataProperties, string projectConnectionId, string name, string description) : base(@type, additionalBinaryDataProperties) + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + internal ResponsesWorkIQPreviewTool(ToolType @type, IDictionary additionalBinaryDataProperties, string projectConnectionId, string name, string description, IDictionary toolConfigs) : base(@type, additionalBinaryDataProperties) { ProjectConnectionId = projectConnectionId; Name = name; Description = description; + ToolConfigs = toolConfigs; } /// The ID of the WorkIQ project connection. @@ -41,5 +48,12 @@ internal ResponsesWorkIQPreviewTool(ToolType @type, IDictionary Optional user-defined description for this tool or configuration. public string Description { get; set; } + + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + public IDictionary ToolConfigs { get; } } } diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ToolConfig.Serialization.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ToolConfig.Serialization.cs new file mode 100644 index 000000000000..208c5970ecb9 --- /dev/null +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ToolConfig.Serialization.cs @@ -0,0 +1,152 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.AI.Extensions.OpenAI +{ + /// Per-tool configuration that controls tool visibility and search behavior. + public partial class ToolConfig : IJsonModel + { + /// The data to parse. + /// The client options for reading and writing models. + protected virtual ToolConfig PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeToolConfig(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ToolConfig)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIExtensionsOpenAIContext.Default); + default: + throw new FormatException($"The model {nameof(ToolConfig)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + ToolConfig IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ToolConfig)} does not support writing '{format}' format."); + } + if (Optional.IsDefined(Pin)) + { + writer.WritePropertyName("pin"u8); + writer.WriteBooleanValue(Pin.Value); + } + if (Optional.IsDefined(AdditionalSearchText)) + { + writer.WritePropertyName("additional_search_text"u8); + writer.WriteStringValue(AdditionalSearchText); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + ToolConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual ToolConfig JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ToolConfig)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeToolConfig(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static ToolConfig DeserializeToolConfig(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool? pin = default; + string additionalSearchText = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("pin"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + pin = prop.Value.GetBoolean(); + continue; + } + if (prop.NameEquals("additional_search_text"u8)) + { + additionalSearchText = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new ToolConfig(pin, additionalSearchText, additionalBinaryDataProperties); + } + } +} diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ToolConfig.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ToolConfig.cs new file mode 100644 index 000000000000..0d0db3702cb1 --- /dev/null +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/ToolConfig.cs @@ -0,0 +1,50 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Extensions.OpenAI +{ + /// Per-tool configuration that controls tool visibility and search behavior. + public partial class ToolConfig + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + public ToolConfig() + { + } + + /// Initializes a new instance of . + /// + /// When true, the tool is always included in agent context and visible in `tools/list`. + /// When false (default), the tool is hidden from `tools/list` and only discoverable via `tool_search`. + /// + /// + /// Additional text indexed for tool_search. Supplements the native tool description + /// to improve discoverability. Does not alter `tools/list` output. + /// + /// Keeps track of any properties unknown to the library. + internal ToolConfig(bool? pin, string additionalSearchText, IDictionary additionalBinaryDataProperties) + { + Pin = pin; + AdditionalSearchText = additionalSearchText; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// + /// When true, the tool is always included in agent context and visible in `tools/list`. + /// When false (default), the tool is hidden from `tools/list` and only discoverable via `tool_search`. + /// + public bool? Pin { get; set; } + + /// + /// Additional text indexed for tool_search. Supplements the native tool description + /// to improve discoverability. Does not alter `tools/list` output. + /// + public string AdditionalSearchText { get; set; } + } +} diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/tests/Samples/Sample_Conversation_CRUD.cs b/sdk/ai/Azure.AI.Extensions.OpenAI/tests/Samples/Sample_Conversation_CRUD.cs index 320fa6920710..6e0cb9abd9a1 100644 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/tests/Samples/Sample_Conversation_CRUD.cs +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/tests/Samples/Sample_Conversation_CRUD.cs @@ -3,7 +3,6 @@ using System; using System.Threading.Tasks; -using Azure.AI.Extensions.OpenAI; using Azure.AI.Projects; using Azure.Identity; using Microsoft.ClientModel.TestFramework; diff --git a/sdk/ai/Azure.AI.Extensions.OpenAI/tsp-location.yaml b/sdk/ai/Azure.AI.Extensions.OpenAI/tsp-location.yaml index b493866e40cc..98f97747e82f 100644 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/tsp-location.yaml +++ b/sdk/ai/Azure.AI.Extensions.OpenAI/tsp-location.yaml @@ -1,5 +1,5 @@ directory: specification/ai-foundry/data-plane/Foundry/src/sdk-extensions-openai -commit: b4de814e0b475880111db5c641b78ef85c8a3157 +commit: d70b666663d37cc99887311c19996b3ae29ce927 repo: Azure/azure-rest-api-specs additionalDirectories: - specification/ai-foundry/data-plane/Foundry/src/common diff --git a/sdk/ai/Azure.AI.Projects.Agents/api/Azure.AI.Projects.Agents.net10.0.cs b/sdk/ai/Azure.AI.Projects.Agents/api/Azure.AI.Projects.Agents.net10.0.cs index 7df51cade17d..5d7518ac4177 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/api/Azure.AI.Projects.Agents.net10.0.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/api/Azure.AI.Projects.Agents.net10.0.cs @@ -9,6 +9,7 @@ public A2APreviewTool(System.Uri baseUri) { } public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } public string ProjectConnectionId { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Projects.Agents.ProjectsAgentTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Projects.Agents.ProjectsAgentTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -36,28 +37,34 @@ public AgentAdministrationClient(System.Uri endpoint, System.ClientModel.Authent public virtual System.ClientModel.ClientResult CreateAgentVersion(string agentName, System.ClientModel.BinaryContent content, string foundryFeatures = null, System.ClientModel.Primitives.RequestOptions options = null) { throw null; } public virtual System.Threading.Tasks.Task> CreateAgentVersionAsync(string agentName, Azure.AI.Projects.Agents.ProjectsAgentVersionCreationOptions options = null, string foundryFeatures = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task CreateAgentVersionAsync(string agentName, System.ClientModel.BinaryContent content, string foundryFeatures = null, System.ClientModel.Primitives.RequestOptions options = null) { throw null; } - public virtual System.ClientModel.ClientResult CreateAgentVersionFromCode(string agentName, string filePath, string contentType, string foundryFeatures = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateAgentVersionFromCodeAsync(string agentName, string filePath, string contentType, string foundryFeatures = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.ClientResult CreateAgentVersionFromCode(string agentName, string filePath, Azure.AI.Projects.Agents.CreateAgentVersionFromCodeMetadata metadata, string contentType, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateAgentVersionFromCodeAsync(string agentName, string filePath, Azure.AI.Projects.Agents.CreateAgentVersionFromCodeMetadata metadata, string contentType, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.ClientModel.ClientResult CreateAgentVersionFromManifest(string agentName, System.ClientModel.BinaryContent content, System.ClientModel.Primitives.RequestOptions options = null) { throw null; } public virtual System.ClientModel.ClientResult CreateAgentVersionFromManifest(string agentName, string manifestId, Azure.AI.Projects.Agents.AgentManifestOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task CreateAgentVersionFromManifestAsync(string agentName, System.ClientModel.BinaryContent content, System.ClientModel.Primitives.RequestOptions options = null) { throw null; } public virtual System.Threading.Tasks.Task> CreateAgentVersionFromManifestAsync(string agentName, string manifestId, Azure.AI.Projects.Agents.AgentManifestOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.ClientModel.ClientResult CreateSession(string agentName, Azure.AI.Projects.Agents.VersionIndicator versionIndicator, string agentSessionId = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateSessionAsync(string agentName, Azure.AI.Projects.Agents.VersionIndicator versionIndicator, string agentSessionId = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.ClientResult CreateSession(string agentName, Azure.AI.Projects.Agents.VersionIndicator versionIndicator, string agentSessionId = null, string userIsolationKey = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateSessionAsync(string agentName, Azure.AI.Projects.Agents.VersionIndicator versionIndicator, string agentSessionId = null, string userIsolationKey = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.ClientModel.ClientResult DeleteAgent(string agentName, System.ClientModel.Primitives.RequestOptions options) { throw null; } + public virtual System.ClientModel.ClientResult DeleteAgent(string agentName, bool? force, System.ClientModel.Primitives.RequestOptions options) { throw null; } + public virtual System.ClientModel.ClientResult DeleteAgent(string agentName, bool? force, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.ClientModel.ClientResult DeleteAgent(string agentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAgentAsync(string agentName, System.ClientModel.Primitives.RequestOptions options) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAgentAsync(string agentName, bool? force, System.ClientModel.Primitives.RequestOptions options) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAgentAsync(string agentName, bool? force, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAgentAsync(string agentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.ClientModel.ClientResult DeleteAgentVersion(string agentName, string agentVersion, System.ClientModel.Primitives.RequestOptions options) { throw null; } + public virtual System.ClientModel.ClientResult DeleteAgentVersion(string agentName, string agentVersion, bool? force, System.ClientModel.Primitives.RequestOptions options) { throw null; } + public virtual System.ClientModel.ClientResult DeleteAgentVersion(string agentName, string agentVersion, bool? force, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.ClientModel.ClientResult DeleteAgentVersion(string agentName, string agentVersion, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAgentVersionAsync(string agentName, string agentVersion, System.ClientModel.Primitives.RequestOptions options) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAgentVersionAsync(string agentName, string agentVersion, bool? force, System.ClientModel.Primitives.RequestOptions options) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAgentVersionAsync(string agentName, string agentVersion, bool? force, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAgentVersionAsync(string agentName, string agentVersion, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.ClientModel.ClientResult DeleteSession(string agentName, string sessionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DeleteSessionAsync(string agentName, string sessionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.ClientResult DeleteSession(string agentName, string sessionId, string userIsolationKey = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteSessionAsync(string agentName, string sessionId, string userIsolationKey = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.BinaryData DownloadAgentCode(string agentName, string path, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DownloadAgentCodeAsync(string agentName, string path, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.BinaryData DownloadAgentVersionCode(string agentName, string agentVersion, string path, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DownloadAgentVersionCodeAsync(string agentName, string agentVersion, string path, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.ClientModel.ClientResult GetAgent(string agentName, System.ClientModel.Primitives.RequestOptions options) { throw null; } public virtual System.ClientModel.ClientResult GetAgent(string agentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task GetAgentAsync(string agentName, System.ClientModel.Primitives.RequestOptions options) { throw null; } @@ -73,12 +80,12 @@ public AgentAdministrationClient(System.Uri endpoint, System.ClientModel.Authent public virtual System.Threading.Tasks.Task> GetAgentVersionAsync(string agentName, string agentVersion, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.ClientModel.CollectionResult GetAgentVersions(string agentName, int? limit = default(int?), Azure.AI.Projects.Agents.AgentListOrder? order = default(Azure.AI.Projects.Agents.AgentListOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.ClientModel.AsyncCollectionResult GetAgentVersionsAsync(string agentName, int? limit = default(int?), Azure.AI.Projects.Agents.AgentListOrder? order = default(Azure.AI.Projects.Agents.AgentListOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.ClientModel.ClientResult GetSession(string agentName, string sessionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetSessionAsync(string agentName, string sessionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.ClientResult GetSession(string agentName, string sessionId, string userIsolationKey = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetSessionAsync(string agentName, string sessionId, string userIsolationKey = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.ClientModel.ClientResult GetSessionLogStream(string agentName, string agentVersion, string sessionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetSessionLogStreamAsync(string agentName, string agentVersion, string sessionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.ClientModel.CollectionResult GetSessions(string agentName, int? limit = default(int?), Azure.AI.Projects.Agents.AgentListOrder? order = default(Azure.AI.Projects.Agents.AgentListOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.ClientModel.AsyncCollectionResult GetSessionsAsync(string agentName, int? limit = default(int?), Azure.AI.Projects.Agents.AgentListOrder? order = default(Azure.AI.Projects.Agents.AgentListOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.CollectionResult GetSessions(string agentName, string userIsolationKey = null, int? limit = default(int?), Azure.AI.Projects.Agents.AgentListOrder? order = default(Azure.AI.Projects.Agents.AgentListOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.AsyncCollectionResult GetSessionsAsync(string agentName, string userIsolationKey = null, int? limit = default(int?), Azure.AI.Projects.Agents.AgentListOrder? order = default(Azure.AI.Projects.Agents.AgentListOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.ClientModel.ClientResult PatchAgentObject(string agentName, Azure.AI.Projects.Agents.PatchAgentOptions patchAgentOptions, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> PatchAgentObjectAsync(string agentName, Azure.AI.Projects.Agents.PatchAgentOptions patchAgentOptions, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.ClientModel.ClientResult UpdateAgent(string agentName, System.ClientModel.BinaryContent content, string foundryFeatures = null, System.ClientModel.Primitives.RequestOptions options = null) { throw null; } @@ -161,9 +168,9 @@ public enum AgentDefinitionOptInKeys { HostedAgentsV1Preview = 0, WorkflowAgentsV1Preview = 1, - ContainerAgentsV1Preview = 2, - AgentEndpointV1Preview = 3, - CodeAgentsV1Preview = 4, + AgentEndpointV1Preview = 2, + CodeAgentsV1Preview = 3, + ExternalAgentsV1Preview = 4, } public abstract partial class AgentEndpointAuthorizationScheme : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { @@ -269,14 +276,14 @@ public partial class AgentSessionFiles { protected AgentSessionFiles() { } public System.ClientModel.Primitives.ClientPipeline Pipeline { get { throw null; } } - public virtual System.ClientModel.ClientResult DeleteSessionFile(string agentName, string sessionId, string path, bool? recursive = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DeleteSessionFileAsync(string agentName, string sessionId, string path, bool? recursive = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.BinaryData DownloadSessionFile(string agentName, string sessionId, string sessionStoragePath, string localPath, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DownloadSessionFileAsync(string agentName, string sessionId, string sessionStoragePath, string localPath, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.ClientModel.ClientResult GetSessionFiles(string agentName, string sessionId, string sessionStoragePath, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetSessionFilesAsync(string agentName, string sessionId, string sessionStoragePath, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public System.ClientModel.ClientResult UploadSessionFile(string agentName, string sessionId, string sessionStoragePath, string localPath, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UploadSessionFileAsync(string agentName, string sessionId, string sessionStoragePath, string localPath, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.ClientResult DeleteSessionFile(string agentName, string sessionId, string path, bool? recursive = default(bool?), string userIsolationKey = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteSessionFileAsync(string agentName, string sessionId, string path, bool? recursive = default(bool?), string userIsolationKey = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.BinaryData DownloadSessionFile(string agentName, string sessionId, string sessionStoragePath, string localPath, string userIsolationKey = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DownloadSessionFileAsync(string agentName, string sessionId, string sessionStoragePath, string localPath, string userIsolationKey = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.ClientResult GetSessionFiles(string agentName, string sessionId, string sessionStoragePath, string userIsolationKey = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetSessionFilesAsync(string agentName, string sessionId, string sessionStoragePath, string userIsolationKey = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public System.ClientModel.ClientResult UploadSessionFile(string agentName, string sessionId, string sessionStoragePath, string localPath, string userIsolationKey = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UploadSessionFileAsync(string agentName, string sessionId, string sessionStoragePath, string localPath, string userIsolationKey = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct AgentSessionStatus : System.IEquatable @@ -398,6 +405,7 @@ public AzureAISearchTool(Azure.AI.Projects.Agents.AzureAISearchToolOptions optio public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } public Azure.AI.Projects.Agents.AzureAISearchToolOptions Options { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Projects.Agents.ProjectsAgentTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Projects.Agents.ProjectsAgentTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -507,6 +515,7 @@ public partial class AzureFunctionTool : Azure.AI.Projects.Agents.ProjectsAgentT { public AzureFunctionTool(Azure.AI.Projects.Agents.AzureFunctionDefinition azureFunction) { } public Azure.AI.Projects.Agents.AzureFunctionDefinition AzureFunction { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Projects.Agents.ProjectsAgentTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Projects.Agents.ProjectsAgentTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -542,6 +551,7 @@ public BingCustomSearchPreviewTool(Azure.AI.Projects.Agents.BingCustomSearchTool public Azure.AI.Projects.Agents.BingCustomSearchToolOptions BingCustomSearchPreview { get { throw null; } set { } } public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Projects.Agents.ProjectsAgentTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Projects.Agents.ProjectsAgentTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -604,6 +614,7 @@ public BingGroundingTool(Azure.AI.Projects.Agents.BingGroundingSearchToolOptions public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } public Azure.AI.Projects.Agents.BingGroundingSearchToolOptions SearchToolOptions { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Projects.Agents.ProjectsAgentTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Projects.Agents.ProjectsAgentTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -645,6 +656,7 @@ public partial class BrowserAutomationPreviewTool : Azure.AI.Projects.Agents.Pro public BrowserAutomationPreviewTool(Azure.AI.Projects.Agents.BrowserAutomationToolOptions toolParameters) { } public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } public Azure.AI.Projects.Agents.BrowserAutomationToolOptions ToolParameters { get { throw null; } set { } } protected override Azure.AI.Projects.Agents.ProjectsAgentTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -690,6 +702,7 @@ public CaptureStructuredOutputsTool(Azure.AI.Projects.Agents.StructuredOutputDef public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } public Azure.AI.Projects.Agents.StructuredOutputDefinition OutputDefinition { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Projects.Agents.ProjectsAgentTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Projects.Agents.ProjectsAgentTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -776,6 +789,38 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class CreateAgentFromCodeOptions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CreateAgentFromCodeOptions(Azure.AI.Projects.Agents.CreateAgentVersionFromCodeMetadata metadata, System.BinaryData code) { } + public System.BinaryData Code { get { throw null; } } + public Azure.AI.Projects.Agents.CreateAgentVersionFromCodeMetadata Metadata { get { throw null; } } + protected virtual Azure.AI.Projects.Agents.CreateAgentFromCodeOptions JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + public static implicit operator System.ClientModel.BinaryContent (Azure.AI.Projects.Agents.CreateAgentFromCodeOptions createAgentFromCodeOptions) { throw null; } + protected virtual Azure.AI.Projects.Agents.CreateAgentFromCodeOptions PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.Agents.CreateAgentFromCodeOptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.Agents.CreateAgentFromCodeOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CreateAgentVersionFromCodeMetadata : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CreateAgentVersionFromCodeMetadata(Azure.AI.Projects.Agents.HostedAgentDefinition definition) { } + public Azure.AI.Projects.Agents.HostedAgentDefinition Definition { get { throw null; } } + public string Description { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Metadata { get { throw null; } } + protected virtual Azure.AI.Projects.Agents.CreateAgentVersionFromCodeMetadata JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.Agents.CreateAgentVersionFromCodeMetadata PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.Agents.CreateAgentVersionFromCodeMetadata System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.Agents.CreateAgentVersionFromCodeMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class CreateAgentVersionFromManifestRequest : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public CreateAgentVersionFromManifestRequest(string manifestId, System.Collections.Generic.IDictionary parameterValues) { } @@ -834,6 +879,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class EntraAuthorizationScheme : Azure.AI.Projects.Agents.AgentEndpointAuthorizationScheme, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public EntraAuthorizationScheme() { } + public Azure.AI.Projects.Agents.IsolationKeySource IsolationKeySource { get { throw null; } set { } } protected override Azure.AI.Projects.Agents.AgentEndpointAuthorizationScheme JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Projects.Agents.AgentEndpointAuthorizationScheme PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -844,6 +890,19 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class EntraIsolationKeySource : Azure.AI.Projects.Agents.IsolationKeySource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EntraIsolationKeySource() { } + protected override Azure.AI.Projects.Agents.IsolationKeySource JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.Agents.IsolationKeySource PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.Agents.EntraIsolationKeySource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.Agents.EntraIsolationKeySource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ExportedDataTypes : System.IEquatable { @@ -862,6 +921,20 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public static bool operator !=(Azure.AI.Projects.Agents.ExportedDataTypes left, Azure.AI.Projects.Agents.ExportedDataTypes right) { throw null; } public override string ToString() { throw null; } } + public partial class ExternalAgentDefinition : Azure.AI.Projects.Agents.ProjectsAgentDefinition, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExternalAgentDefinition() { } + public string OtelAgentId { get { throw null; } set { } } + protected override Azure.AI.Projects.Agents.ProjectsAgentDefinition JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.Agents.ProjectsAgentDefinition PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.Agents.ExternalAgentDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.Agents.ExternalAgentDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class FabricDataAgentToolOptions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public FabricDataAgentToolOptions() { } @@ -885,6 +958,7 @@ public FabricIQPreviewTool(string projectConnectionId) { } public System.BinaryData RequireApproval { get { throw null; } set { } } public string ServerLabel { get { throw null; } set { } } public System.Uri ServerUrl { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Projects.Agents.ProjectsAgentTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Projects.Agents.ProjectsAgentTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -916,12 +990,25 @@ public enum FoundryFeaturesOptInKeys RedTeamsV1Preview = 2, InsightsV1Preview = 3, MemoryStoresV1Preview = 4, - ToolboxesV1Preview = 5, + RoutinesV1Preview = 5, SkillsV1Preview = 6, DataGenerationJobsV1Preview = 7, ModelsV1Preview = 8, AgentsOptimizationV1Preview = 9, } + public partial class HeaderIsolationKeySource : Azure.AI.Projects.Agents.IsolationKeySource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public HeaderIsolationKeySource() { } + protected override Azure.AI.Projects.Agents.IsolationKeySource JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.Agents.IsolationKeySource PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.Agents.HeaderIsolationKeySource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.Agents.HeaderIsolationKeySource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class HeaderTelemetryEndpointAuth : Azure.AI.Projects.Agents.TelemetryEndpointAuthentication, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public HeaderTelemetryEndpointAuth(string headerName, string secretId, string secretKey) { } @@ -963,6 +1050,19 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public abstract partial class IsolationKeySource : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal IsolationKeySource() { } + protected virtual Azure.AI.Projects.Agents.IsolationKeySource JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.Agents.IsolationKeySource PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.Agents.IsolationKeySource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.Agents.IsolationKeySource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ManagedAgentIdentityBlueprintReference : Azure.AI.Projects.Agents.AgentBlueprintReference, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ManagedAgentIdentityBlueprintReference(string blueprintId) { } @@ -1000,6 +1100,7 @@ public MemorySearchPreviewTool(string memoryStoreName, string scope) { } public string Name { get { throw null; } set { } } public string Scope { get { throw null; } set { } } public Azure.AI.Projects.Agents.MemorySearchToolOptions SearchOptions { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } public int? UpdateDelayInSecs { get { throw null; } set { } } protected override Azure.AI.Projects.Agents.ProjectsAgentTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1030,6 +1131,7 @@ public partial class MicrosoftFabricPreviewTool : Azure.AI.Projects.Agents.Proje public MicrosoftFabricPreviewTool(Azure.AI.Projects.Agents.FabricDataAgentToolOptions toolOptions) { } public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } public Azure.AI.Projects.Agents.FabricDataAgentToolOptions ToolOptions { get { throw null; } set { } } protected override Azure.AI.Projects.Agents.ProjectsAgentTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1163,6 +1265,7 @@ public partial class OpenAPITool : Azure.AI.Projects.Agents.ProjectsAgentTool, S { public OpenAPITool(Azure.AI.Projects.Agents.OpenApiFunctionDefinition functionDefinition) { } public Azure.AI.Projects.Agents.OpenApiFunctionDefinition FunctionDefinition { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Projects.Agents.ProjectsAgentTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Projects.Agents.ProjectsAgentTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1285,6 +1388,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer private readonly object _dummy; private readonly int _dummyPrimitive; public ProjectsAgentKind(string value) { throw null; } + public static Azure.AI.Projects.Agents.ProjectsAgentKind External { get { throw null; } } public static Azure.AI.Projects.Agents.ProjectsAgentKind Hosted { get { throw null; } } public static Azure.AI.Projects.Agents.ProjectsAgentKind Prompt { get { throw null; } } public static Azure.AI.Projects.Agents.ProjectsAgentKind Workflow { get { throw null; } } @@ -1340,7 +1444,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } public static partial class ProjectsAgentsModelFactory { - public static Azure.AI.Projects.Agents.A2APreviewTool A2APreviewTool(string name = null, string description = null, System.Uri baseUri = null, string agentCardPath = null, string projectConnectionId = null) { throw null; } + public static Azure.AI.Projects.Agents.A2APreviewTool A2APreviewTool(string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null, System.Uri baseUri = null, string agentCardPath = null, string projectConnectionId = null) { throw null; } public static Azure.AI.Projects.Agents.A2APreviewTool A2APreviewTool(System.Uri baseUri, string agentCardPath, string projectConnectionId) { throw null; } public static Azure.AI.Projects.Agents.AgentBlueprintReference AgentBlueprintReference(string type = null) { throw null; } public static Azure.AI.Projects.Agents.AgentCard AgentCard(string version = null, string description = null, System.Collections.Generic.IEnumerable skills = null) { throw null; } @@ -1351,50 +1455,57 @@ public static partial class ProjectsAgentsModelFactory public static Azure.AI.Projects.Agents.AgentManifestOptions AgentManifestOptions(System.Collections.Generic.IDictionary metadata = null, string description = null, string manifestId = null, System.Collections.Generic.IDictionary parameterValues = null) { throw null; } public static Azure.AI.Projects.Agents.AgentsSkill AgentsSkill(string skillId = null, bool hasBlob = false, string name = null, string description = null, System.Collections.Generic.IDictionary metadata = null) { throw null; } public static Azure.AI.Projects.Agents.AzureAISearchTool AzureAISearchTool(Azure.AI.Projects.Agents.AzureAISearchToolOptions options) { throw null; } - public static Azure.AI.Projects.Agents.AzureAISearchTool AzureAISearchTool(string name = null, string description = null, Azure.AI.Projects.Agents.AzureAISearchToolOptions options = null) { throw null; } + public static Azure.AI.Projects.Agents.AzureAISearchTool AzureAISearchTool(string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null, Azure.AI.Projects.Agents.AzureAISearchToolOptions options = null) { throw null; } public static Azure.AI.Projects.Agents.AzureAISearchToolIndex AzureAISearchToolIndex(string projectConnectionId = null, string indexName = null, Azure.AI.Projects.Agents.AzureAISearchQueryType? queryType = default(Azure.AI.Projects.Agents.AzureAISearchQueryType?), int? topK = default(int?), string filter = null, string indexAssetId = null) { throw null; } public static Azure.AI.Projects.Agents.AzureAISearchToolOptions AzureAISearchToolOptions(System.Collections.Generic.IEnumerable indexes = null) { throw null; } public static Azure.AI.Projects.Agents.AzureFunctionBinding AzureFunctionBinding(Azure.AI.Projects.Agents.AzureFunctionStorageQueue storageQueue = null) { throw null; } public static Azure.AI.Projects.Agents.AzureFunctionDefinition AzureFunctionDefinition(Azure.AI.Projects.Agents.AzureFunctionDefinitionFunction function = null, Azure.AI.Projects.Agents.AzureFunctionBinding inputBinding = null, Azure.AI.Projects.Agents.AzureFunctionBinding outputBinding = null) { throw null; } public static Azure.AI.Projects.Agents.AzureFunctionDefinitionFunction AzureFunctionDefinitionFunction(string name = null, string description = null, System.BinaryData parameters = null) { throw null; } public static Azure.AI.Projects.Agents.AzureFunctionStorageQueue AzureFunctionStorageQueue(string queueServiceEndpoint = null, string queueName = null) { throw null; } - public static Azure.AI.Projects.Agents.AzureFunctionTool AzureFunctionTool(Azure.AI.Projects.Agents.AzureFunctionDefinition azureFunction = null) { throw null; } + public static Azure.AI.Projects.Agents.AzureFunctionTool AzureFunctionTool(Azure.AI.Projects.Agents.AzureFunctionDefinition azureFunction) { throw null; } + public static Azure.AI.Projects.Agents.AzureFunctionTool AzureFunctionTool(Azure.AI.Projects.Agents.AzureFunctionDefinition azureFunction = null, System.Collections.Generic.IDictionary toolConfigs = null) { throw null; } public static Azure.AI.Projects.Agents.BingCustomSearchConfiguration BingCustomSearchConfiguration(string projectConnectionId = null, string instanceName = null, string market = null, string setLang = null, long? count = default(long?), string freshness = null) { throw null; } public static Azure.AI.Projects.Agents.BingCustomSearchPreviewTool BingCustomSearchPreviewTool(Azure.AI.Projects.Agents.BingCustomSearchToolOptions bingCustomSearchPreview) { throw null; } - public static Azure.AI.Projects.Agents.BingCustomSearchPreviewTool BingCustomSearchPreviewTool(string name = null, string description = null, Azure.AI.Projects.Agents.BingCustomSearchToolOptions bingCustomSearchPreview = null) { throw null; } + public static Azure.AI.Projects.Agents.BingCustomSearchPreviewTool BingCustomSearchPreviewTool(string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null, Azure.AI.Projects.Agents.BingCustomSearchToolOptions bingCustomSearchPreview = null) { throw null; } public static Azure.AI.Projects.Agents.BingCustomSearchToolOptions BingCustomSearchToolOptions(System.Collections.Generic.IEnumerable searchConfigurations = null) { throw null; } public static Azure.AI.Projects.Agents.BingGroundingSearchConfiguration BingGroundingSearchConfiguration(string projectConnectionId = null, string market = null, string bingUserInterfaceLanguage = null, long? count = default(long?), string freshness = null) { throw null; } public static Azure.AI.Projects.Agents.BingGroundingSearchToolOptions BingGroundingSearchToolOptions(System.Collections.Generic.IEnumerable searchConfigurations = null) { throw null; } public static Azure.AI.Projects.Agents.BingGroundingTool BingGroundingTool(Azure.AI.Projects.Agents.BingGroundingSearchToolOptions searchToolOptions) { throw null; } - public static Azure.AI.Projects.Agents.BingGroundingTool BingGroundingTool(string name = null, string description = null, Azure.AI.Projects.Agents.BingGroundingSearchToolOptions searchToolOptions = null) { throw null; } + public static Azure.AI.Projects.Agents.BingGroundingTool BingGroundingTool(string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null, Azure.AI.Projects.Agents.BingGroundingSearchToolOptions searchToolOptions = null) { throw null; } public static Azure.AI.Projects.Agents.BotServiceAuthorizationScheme BotServiceAuthorizationScheme() { throw null; } public static Azure.AI.Projects.Agents.BotServiceRbacAuthorizationScheme BotServiceRbacAuthorizationScheme() { throw null; } public static Azure.AI.Projects.Agents.BrowserAutomationPreviewTool BrowserAutomationPreviewTool(Azure.AI.Projects.Agents.BrowserAutomationToolOptions toolParameters) { throw null; } - public static Azure.AI.Projects.Agents.BrowserAutomationPreviewTool BrowserAutomationPreviewTool(string name = null, string description = null, Azure.AI.Projects.Agents.BrowserAutomationToolOptions toolParameters = null) { throw null; } + public static Azure.AI.Projects.Agents.BrowserAutomationPreviewTool BrowserAutomationPreviewTool(string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null, Azure.AI.Projects.Agents.BrowserAutomationToolOptions toolParameters = null) { throw null; } public static Azure.AI.Projects.Agents.BrowserAutomationToolConnectionParameters BrowserAutomationToolConnectionParameters(string projectConnectionId = null) { throw null; } public static Azure.AI.Projects.Agents.BrowserAutomationToolOptions BrowserAutomationToolOptions(Azure.AI.Projects.Agents.BrowserAutomationToolConnectionParameters toolConnectionParameters = null) { throw null; } public static Azure.AI.Projects.Agents.CaptureStructuredOutputsTool CaptureStructuredOutputsTool(Azure.AI.Projects.Agents.StructuredOutputDefinition outputDefinition) { throw null; } - public static Azure.AI.Projects.Agents.CaptureStructuredOutputsTool CaptureStructuredOutputsTool(string name = null, string description = null, Azure.AI.Projects.Agents.StructuredOutputDefinition outputDefinition = null) { throw null; } + public static Azure.AI.Projects.Agents.CaptureStructuredOutputsTool CaptureStructuredOutputsTool(string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null, Azure.AI.Projects.Agents.StructuredOutputDefinition outputDefinition = null) { throw null; } public static Azure.AI.Projects.Agents.CodeConfiguration CodeConfiguration(string runtime = null, System.Collections.Generic.IEnumerable entryPoint = null, Azure.AI.Projects.Agents.CodeDependencyResolution dependencyResolution = default(Azure.AI.Projects.Agents.CodeDependencyResolution), string contentHash = null) { throw null; } public static Azure.AI.Projects.Agents.ContainerConfiguration ContainerConfiguration(string image = null) { throw null; } public static Azure.AI.Projects.Agents.ContentFilterConfiguration ContentFilterConfiguration(string raiPolicyName = null) { throw null; } + public static Azure.AI.Projects.Agents.CreateAgentFromCodeOptions CreateAgentFromCodeOptions(Azure.AI.Projects.Agents.CreateAgentVersionFromCodeMetadata metadata = null, System.BinaryData code = null) { throw null; } + public static Azure.AI.Projects.Agents.CreateAgentVersionFromCodeMetadata CreateAgentVersionFromCodeMetadata(string description = null, System.Collections.Generic.IDictionary metadata = null, Azure.AI.Projects.Agents.HostedAgentDefinition definition = null) { throw null; } public static Azure.AI.Projects.Agents.CreateAgentVersionFromManifestRequest CreateAgentVersionFromManifestRequest(System.Collections.Generic.IDictionary metadata = null, string description = null, string manifestId = null, System.Collections.Generic.IDictionary parameterValues = null) { throw null; } public static Azure.AI.Projects.Agents.DeclarativeAgentDefinition DeclarativeAgentDefinition(Azure.AI.Projects.Agents.ContentFilterConfiguration contentFilterConfiguration = null, string model = null, string instructions = null, float? temperature = default(float?), float? topP = default(float?), OpenAI.Responses.ResponseReasoningOptions reasoningOptions = null, System.Collections.Generic.IEnumerable tools = null, System.BinaryData toolChoice = null, OpenAI.Responses.ResponseTextOptions textOptions = null, System.Collections.Generic.IDictionary structuredInputs = null) { throw null; } public static Azure.AI.Projects.Agents.DeleteSkillResponse DeleteSkillResponse(string name = null, bool deleted = false) { throw null; } public static OpenAI.EmptyModelParam EmptyModelParam() { throw null; } - public static Azure.AI.Projects.Agents.EntraAuthorizationScheme EntraAuthorizationScheme() { throw null; } + public static Azure.AI.Projects.Agents.EntraAuthorizationScheme EntraAuthorizationScheme(Azure.AI.Projects.Agents.IsolationKeySource isolationKeySource = null) { throw null; } + public static Azure.AI.Projects.Agents.EntraIsolationKeySource EntraIsolationKeySource() { throw null; } + public static Azure.AI.Projects.Agents.ExternalAgentDefinition ExternalAgentDefinition(Azure.AI.Projects.Agents.ContentFilterConfiguration contentFilterConfiguration = null, string otelAgentId = null) { throw null; } public static Azure.AI.Projects.Agents.FabricDataAgentToolOptions FabricDataAgentToolOptions(System.Collections.Generic.IEnumerable projectConnections = null) { throw null; } - public static Azure.AI.Projects.Agents.FabricIQPreviewTool FabricIQPreviewTool(string projectConnectionId = null, string serverLabel = null, System.Uri serverUrl = null, System.BinaryData requireApproval = null, string name = null, string description = null) { throw null; } + public static Azure.AI.Projects.Agents.FabricIQPreviewTool FabricIQPreviewTool(string projectConnectionId = null, string serverLabel = null, System.Uri serverUrl = null, System.BinaryData requireApproval = null, string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null) { throw null; } public static Azure.AI.Projects.Agents.FixedRatioVersionSelectionRule FixedRatioVersionSelectionRule(string agentVersion = null, int trafficPercentage = 0) { throw null; } + public static Azure.AI.Projects.Agents.HeaderIsolationKeySource HeaderIsolationKeySource() { throw null; } public static Azure.AI.Projects.Agents.HeaderTelemetryEndpointAuth HeaderTelemetryEndpointAuth(string headerName = null, string secretId = null, string secretKey = null) { throw null; } public static Azure.AI.Projects.Agents.HostedAgentDefinition HostedAgentDefinition(Azure.AI.Projects.Agents.ContentFilterConfiguration contentFilterConfiguration, System.Collections.Generic.IEnumerable tools, System.Collections.Generic.IEnumerable versions, string cpu, string memory, System.Collections.Generic.IDictionary environmentVariables, string image) { throw null; } public static Azure.AI.Projects.Agents.HostedAgentDefinition HostedAgentDefinition(Azure.AI.Projects.Agents.ContentFilterConfiguration contentFilterConfiguration = null, System.Collections.Generic.IEnumerable tools = null, System.Collections.Generic.IEnumerable versions = null, string cpu = null, string memory = null, System.Collections.Generic.IDictionary environmentVariables = null, string image = null, Azure.AI.Projects.Agents.ContainerConfiguration containerConfiguration = null, System.Collections.Generic.IEnumerable protocolVersions = null, Azure.AI.Projects.Agents.CodeConfiguration codeConfiguration = null, Azure.AI.Projects.Agents.TelemetryConfig telemetryConfig = null) { throw null; } + public static Azure.AI.Projects.Agents.IsolationKeySource IsolationKeySource(string kind = null) { throw null; } public static Azure.AI.Projects.Agents.ManagedAgentIdentityBlueprintReference ManagedAgentIdentityBlueprintReference(string blueprintId = null) { throw null; } public static Azure.AI.Projects.Agents.MemorySearchPreviewTool MemorySearchPreviewTool(string memoryStoreName, string scope, Azure.AI.Projects.Agents.MemorySearchToolOptions searchOptions, int? updateDelayInSecs) { throw null; } - public static Azure.AI.Projects.Agents.MemorySearchPreviewTool MemorySearchPreviewTool(string name = null, string description = null, string memoryStoreName = null, string scope = null, Azure.AI.Projects.Agents.MemorySearchToolOptions searchOptions = null, int? updateDelayInSecs = default(int?)) { throw null; } + public static Azure.AI.Projects.Agents.MemorySearchPreviewTool MemorySearchPreviewTool(string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null, string memoryStoreName = null, string scope = null, Azure.AI.Projects.Agents.MemorySearchToolOptions searchOptions = null, int? updateDelayInSecs = default(int?)) { throw null; } public static Azure.AI.Projects.Agents.MemorySearchToolOptions MemorySearchToolOptions(int? maxMemories = default(int?)) { throw null; } public static Azure.AI.Projects.Agents.MicrosoftFabricPreviewTool MicrosoftFabricPreviewTool(Azure.AI.Projects.Agents.FabricDataAgentToolOptions toolOptions) { throw null; } - public static Azure.AI.Projects.Agents.MicrosoftFabricPreviewTool MicrosoftFabricPreviewTool(string name = null, string description = null, Azure.AI.Projects.Agents.FabricDataAgentToolOptions toolOptions = null) { throw null; } + public static Azure.AI.Projects.Agents.MicrosoftFabricPreviewTool MicrosoftFabricPreviewTool(string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null, Azure.AI.Projects.Agents.FabricDataAgentToolOptions toolOptions = null) { throw null; } public static Azure.AI.Projects.Agents.OpenAPIAnonymousAuthenticationDetails OpenAPIAnonymousAuthenticationDetails() { throw null; } public static Azure.AI.Projects.Agents.OpenApiAuthenticationDetails OpenApiAuthenticationDetails(string type = null) { throw null; } public static Azure.AI.Projects.Agents.OpenApiFunctionDefinition OpenApiFunctionDefinition(string name = null, string description = null, System.Collections.Generic.IDictionary spec = null, Azure.AI.Projects.Agents.OpenApiAuthenticationDetails authenticationDetails = null, System.Collections.Generic.IEnumerable defaultParams = null, System.Collections.Generic.IEnumerable functions = null) { throw null; } @@ -1403,7 +1514,8 @@ public static partial class ProjectsAgentsModelFactory public static Azure.AI.Projects.Agents.OpenAPIManagedSecurityScheme OpenAPIManagedSecurityScheme(string audience = null) { throw null; } public static Azure.AI.Projects.Agents.OpenApiProjectConnectionAuthenticationDetails OpenApiProjectConnectionAuthenticationDetails(Azure.AI.Projects.Agents.OpenApiProjectConnectionSecurityScheme securityScheme = null) { throw null; } public static Azure.AI.Projects.Agents.OpenApiProjectConnectionSecurityScheme OpenApiProjectConnectionSecurityScheme(string projectConnectionId = null) { throw null; } - public static Azure.AI.Projects.Agents.OpenAPITool OpenAPITool(Azure.AI.Projects.Agents.OpenApiFunctionDefinition functionDefinition = null) { throw null; } + public static Azure.AI.Projects.Agents.OpenAPITool OpenAPITool(Azure.AI.Projects.Agents.OpenApiFunctionDefinition functionDefinition) { throw null; } + public static Azure.AI.Projects.Agents.OpenAPITool OpenAPITool(Azure.AI.Projects.Agents.OpenApiFunctionDefinition functionDefinition = null, System.Collections.Generic.IDictionary toolConfigs = null) { throw null; } public static Azure.AI.Projects.Agents.OtlpTelemetryEndpoint OtlpTelemetryEndpoint(System.Collections.Generic.IEnumerable exportedDataTypes = null, Azure.AI.Projects.Agents.TelemetryEndpointAuthentication authentication = null, string endpoint = null, Azure.AI.Projects.Agents.TelemetryTransportProtocol protocol = default(Azure.AI.Projects.Agents.TelemetryTransportProtocol)) { throw null; } public static Azure.AI.Projects.Agents.PatchAgentOptions PatchAgentOptions(Azure.AI.Projects.Agents.AgentEndpointConfiguration agentEndpoint = null, Azure.AI.Projects.Agents.AgentCard agentCard = null) { throw null; } public static Azure.AI.Projects.Agents.ProjectAgentSession ProjectAgentSession(string agentSessionId = null, Azure.AI.Projects.Agents.VersionIndicator versionIndicator = null, Azure.AI.Projects.Agents.AgentSessionStatus status = default(Azure.AI.Projects.Agents.AgentSessionStatus), System.DateTimeOffset createdAt = default(System.DateTimeOffset), System.DateTimeOffset lastAccessedAt = default(System.DateTimeOffset), System.DateTimeOffset expiresAt = default(System.DateTimeOffset)) { throw null; } @@ -1422,7 +1534,7 @@ public static partial class ProjectsAgentsModelFactory public static Azure.AI.Projects.Agents.SessionLogEvent SessionLogEvent(Azure.AI.Projects.Agents.SessionLogEventType @event = default(Azure.AI.Projects.Agents.SessionLogEventType), string data = null) { throw null; } public static Azure.AI.Projects.Agents.SharePointGroundingToolOptions SharePointGroundingToolOptions(System.Collections.Generic.IEnumerable projectConnections = null) { throw null; } public static Azure.AI.Projects.Agents.SharepointPreviewTool SharepointPreviewTool(Azure.AI.Projects.Agents.SharePointGroundingToolOptions toolOptions) { throw null; } - public static Azure.AI.Projects.Agents.SharepointPreviewTool SharepointPreviewTool(string name = null, string description = null, Azure.AI.Projects.Agents.SharePointGroundingToolOptions toolOptions = null) { throw null; } + public static Azure.AI.Projects.Agents.SharepointPreviewTool SharepointPreviewTool(string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null, Azure.AI.Projects.Agents.SharePointGroundingToolOptions toolOptions = null) { throw null; } public static Azure.AI.Projects.Agents.StructuredInputDefinition StructuredInputDefinition(string description = null, System.BinaryData defaultValue = null, System.Collections.Generic.IDictionary schema = null, bool? isRequired = default(bool?)) { throw null; } public static Azure.AI.Projects.Agents.StructuredOutputDefinition StructuredOutputDefinition(string name = null, string description = null, System.Collections.Generic.IDictionary schema = null, bool? strict = default(bool?)) { throw null; } public static Azure.AI.Projects.Agents.TelemetryConfig TelemetryConfig(System.Collections.Generic.IEnumerable endpoints = null) { throw null; } @@ -1430,8 +1542,9 @@ public static partial class ProjectsAgentsModelFactory public static Azure.AI.Projects.Agents.TelemetryEndpointAuthentication TelemetryEndpointAuthentication(string type = null) { throw null; } public static Azure.AI.Projects.Agents.ToolboxPolicies ToolboxPolicies(Azure.AI.Projects.Agents.ContentFilterConfiguration raiConfig = null) { throw null; } public static Azure.AI.Projects.Agents.ToolboxRecord ToolboxRecord(string id = null, string name = null, string defaultVersion = null) { throw null; } - public static Azure.AI.Projects.Agents.ToolboxSearchPreviewTool ToolboxSearchPreviewTool(string name = null, string description = null) { throw null; } + public static Azure.AI.Projects.Agents.ToolboxSearchPreviewTool ToolboxSearchPreviewTool(string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null) { throw null; } public static Azure.AI.Projects.Agents.ToolboxVersion ToolboxVersion(System.Collections.Generic.IDictionary metadata = null, string id = null, string name = null, string version = null, string description = null, System.DateTimeOffset createdAt = default(System.DateTimeOffset), System.Collections.Generic.IEnumerable tools = null, Azure.AI.Projects.Agents.ToolboxPolicies policies = null) { throw null; } + public static Azure.AI.Projects.Agents.ToolConfig ToolConfig(bool? pin = default(bool?), string additionalSearchText = null) { throw null; } public static Azure.AI.Projects.Agents.ToolProjectConnection ToolProjectConnection(string projectConnectionId = null) { throw null; } public static Azure.AI.Projects.Agents.ToolSearchTool ToolSearchTool(OpenAI.ToolSearchExecutionType? execution = default(OpenAI.ToolSearchExecutionType?), string description = null, OpenAI.EmptyModelParam parameters = null) { throw null; } public static Azure.AI.Projects.Agents.UpdateToolboxRequest UpdateToolboxRequest(string name = null, string defaultVersion = null) { throw null; } @@ -1440,12 +1553,12 @@ public static partial class ProjectsAgentsModelFactory public static Azure.AI.Projects.Agents.VersionSelectionRule VersionSelectionRule(string type = null, string agentVersion = null) { throw null; } public static Azure.AI.Projects.Agents.VersionSelector VersionSelector(System.Collections.Generic.IEnumerable versionSelectionRules = null) { throw null; } public static Azure.AI.Projects.Agents.WorkflowAgentDefinition WorkflowAgentDefinition(Azure.AI.Projects.Agents.ContentFilterConfiguration contentFilterConfiguration = null, string workflowYaml = null) { throw null; } - public static Azure.AI.Projects.Agents.WorkIQPreviewTool WorkIQPreviewTool(string projectConnectionId = null, string name = null, string description = null) { throw null; } + public static Azure.AI.Projects.Agents.WorkIQPreviewTool WorkIQPreviewTool(string projectConnectionId = null, string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null) { throw null; } } public abstract partial class ProjectsAgentTool : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ProjectsAgentTool() { } - public static Azure.AI.Projects.Agents.ProjectsAgentTool AsProjectTool(OpenAI.Responses.ResponseTool tool) { throw null; } + public static Azure.AI.Projects.Agents.ProjectsAgentTool AsProjectTool(T tool) { throw null; } public static OpenAI.Responses.ResponseTool CreateA2ATool(System.Uri baseUri, string agentCardPath = null) { throw null; } public static Azure.AI.Projects.Agents.AzureAISearchTool CreateAzureAISearchTool(Azure.AI.Projects.Agents.AzureAISearchToolOptions options = null) { throw null; } public static Azure.AI.Projects.Agents.BingCustomSearchPreviewTool CreateBingCustomSearchTool(Azure.AI.Projects.Agents.BingCustomSearchToolOptions parameters) { throw null; } @@ -1643,6 +1756,7 @@ public partial class SharepointPreviewTool : Azure.AI.Projects.Agents.ProjectsAg public SharepointPreviewTool(Azure.AI.Projects.Agents.SharePointGroundingToolOptions toolOptions) { } public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } public Azure.AI.Projects.Agents.SharePointGroundingToolOptions ToolOptions { get { throw null; } set { } } protected override Azure.AI.Projects.Agents.ProjectsAgentTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1783,6 +1897,7 @@ public partial class ToolboxSearchPreviewTool : Azure.AI.Projects.Agents.Project public ToolboxSearchPreviewTool() { } public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Projects.Agents.ProjectsAgentTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Projects.Agents.ProjectsAgentTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1815,6 +1930,21 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class ToolConfig : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ToolConfig() { } + public string AdditionalSearchText { get { throw null; } set { } } + public bool? Pin { get { throw null; } set { } } + protected virtual Azure.AI.Projects.Agents.ToolConfig JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.Agents.ToolConfig PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.Agents.ToolConfig System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.Agents.ToolConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ToolProjectConnection : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ToolProjectConnection(string projectConnectionId) { } @@ -1951,6 +2081,7 @@ public WorkIQPreviewTool(string projectConnectionId) { } public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } public string ProjectConnectionId { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Projects.Agents.ProjectsAgentTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Projects.Agents.ProjectsAgentTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/ai/Azure.AI.Projects.Agents/api/Azure.AI.Projects.Agents.net8.0.cs b/sdk/ai/Azure.AI.Projects.Agents/api/Azure.AI.Projects.Agents.net8.0.cs index e1438b74f685..1368610252a2 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/api/Azure.AI.Projects.Agents.net8.0.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/api/Azure.AI.Projects.Agents.net8.0.cs @@ -9,6 +9,7 @@ public A2APreviewTool(System.Uri baseUri) { } public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } public string ProjectConnectionId { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Projects.Agents.ProjectsAgentTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Projects.Agents.ProjectsAgentTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -36,28 +37,34 @@ public AgentAdministrationClient(System.Uri endpoint, System.ClientModel.Authent public virtual System.ClientModel.ClientResult CreateAgentVersion(string agentName, System.ClientModel.BinaryContent content, string foundryFeatures = null, System.ClientModel.Primitives.RequestOptions options = null) { throw null; } public virtual System.Threading.Tasks.Task> CreateAgentVersionAsync(string agentName, Azure.AI.Projects.Agents.ProjectsAgentVersionCreationOptions options = null, string foundryFeatures = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task CreateAgentVersionAsync(string agentName, System.ClientModel.BinaryContent content, string foundryFeatures = null, System.ClientModel.Primitives.RequestOptions options = null) { throw null; } - public virtual System.ClientModel.ClientResult CreateAgentVersionFromCode(string agentName, string filePath, string contentType, string foundryFeatures = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateAgentVersionFromCodeAsync(string agentName, string filePath, string contentType, string foundryFeatures = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.ClientResult CreateAgentVersionFromCode(string agentName, string filePath, Azure.AI.Projects.Agents.CreateAgentVersionFromCodeMetadata metadata, string contentType, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateAgentVersionFromCodeAsync(string agentName, string filePath, Azure.AI.Projects.Agents.CreateAgentVersionFromCodeMetadata metadata, string contentType, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.ClientModel.ClientResult CreateAgentVersionFromManifest(string agentName, System.ClientModel.BinaryContent content, System.ClientModel.Primitives.RequestOptions options = null) { throw null; } public virtual System.ClientModel.ClientResult CreateAgentVersionFromManifest(string agentName, string manifestId, Azure.AI.Projects.Agents.AgentManifestOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task CreateAgentVersionFromManifestAsync(string agentName, System.ClientModel.BinaryContent content, System.ClientModel.Primitives.RequestOptions options = null) { throw null; } public virtual System.Threading.Tasks.Task> CreateAgentVersionFromManifestAsync(string agentName, string manifestId, Azure.AI.Projects.Agents.AgentManifestOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.ClientModel.ClientResult CreateSession(string agentName, Azure.AI.Projects.Agents.VersionIndicator versionIndicator, string agentSessionId = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateSessionAsync(string agentName, Azure.AI.Projects.Agents.VersionIndicator versionIndicator, string agentSessionId = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.ClientResult CreateSession(string agentName, Azure.AI.Projects.Agents.VersionIndicator versionIndicator, string agentSessionId = null, string userIsolationKey = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateSessionAsync(string agentName, Azure.AI.Projects.Agents.VersionIndicator versionIndicator, string agentSessionId = null, string userIsolationKey = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.ClientModel.ClientResult DeleteAgent(string agentName, System.ClientModel.Primitives.RequestOptions options) { throw null; } + public virtual System.ClientModel.ClientResult DeleteAgent(string agentName, bool? force, System.ClientModel.Primitives.RequestOptions options) { throw null; } + public virtual System.ClientModel.ClientResult DeleteAgent(string agentName, bool? force, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.ClientModel.ClientResult DeleteAgent(string agentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAgentAsync(string agentName, System.ClientModel.Primitives.RequestOptions options) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAgentAsync(string agentName, bool? force, System.ClientModel.Primitives.RequestOptions options) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAgentAsync(string agentName, bool? force, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAgentAsync(string agentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.ClientModel.ClientResult DeleteAgentVersion(string agentName, string agentVersion, System.ClientModel.Primitives.RequestOptions options) { throw null; } + public virtual System.ClientModel.ClientResult DeleteAgentVersion(string agentName, string agentVersion, bool? force, System.ClientModel.Primitives.RequestOptions options) { throw null; } + public virtual System.ClientModel.ClientResult DeleteAgentVersion(string agentName, string agentVersion, bool? force, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.ClientModel.ClientResult DeleteAgentVersion(string agentName, string agentVersion, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAgentVersionAsync(string agentName, string agentVersion, System.ClientModel.Primitives.RequestOptions options) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAgentVersionAsync(string agentName, string agentVersion, bool? force, System.ClientModel.Primitives.RequestOptions options) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAgentVersionAsync(string agentName, string agentVersion, bool? force, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAgentVersionAsync(string agentName, string agentVersion, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.ClientModel.ClientResult DeleteSession(string agentName, string sessionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DeleteSessionAsync(string agentName, string sessionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.ClientResult DeleteSession(string agentName, string sessionId, string userIsolationKey = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteSessionAsync(string agentName, string sessionId, string userIsolationKey = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.BinaryData DownloadAgentCode(string agentName, string path, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DownloadAgentCodeAsync(string agentName, string path, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.BinaryData DownloadAgentVersionCode(string agentName, string agentVersion, string path, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DownloadAgentVersionCodeAsync(string agentName, string agentVersion, string path, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.ClientModel.ClientResult GetAgent(string agentName, System.ClientModel.Primitives.RequestOptions options) { throw null; } public virtual System.ClientModel.ClientResult GetAgent(string agentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task GetAgentAsync(string agentName, System.ClientModel.Primitives.RequestOptions options) { throw null; } @@ -73,12 +80,12 @@ public AgentAdministrationClient(System.Uri endpoint, System.ClientModel.Authent public virtual System.Threading.Tasks.Task> GetAgentVersionAsync(string agentName, string agentVersion, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.ClientModel.CollectionResult GetAgentVersions(string agentName, int? limit = default(int?), Azure.AI.Projects.Agents.AgentListOrder? order = default(Azure.AI.Projects.Agents.AgentListOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.ClientModel.AsyncCollectionResult GetAgentVersionsAsync(string agentName, int? limit = default(int?), Azure.AI.Projects.Agents.AgentListOrder? order = default(Azure.AI.Projects.Agents.AgentListOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.ClientModel.ClientResult GetSession(string agentName, string sessionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetSessionAsync(string agentName, string sessionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.ClientResult GetSession(string agentName, string sessionId, string userIsolationKey = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetSessionAsync(string agentName, string sessionId, string userIsolationKey = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.ClientModel.ClientResult GetSessionLogStream(string agentName, string agentVersion, string sessionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetSessionLogStreamAsync(string agentName, string agentVersion, string sessionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.ClientModel.CollectionResult GetSessions(string agentName, int? limit = default(int?), Azure.AI.Projects.Agents.AgentListOrder? order = default(Azure.AI.Projects.Agents.AgentListOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.ClientModel.AsyncCollectionResult GetSessionsAsync(string agentName, int? limit = default(int?), Azure.AI.Projects.Agents.AgentListOrder? order = default(Azure.AI.Projects.Agents.AgentListOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.CollectionResult GetSessions(string agentName, string userIsolationKey = null, int? limit = default(int?), Azure.AI.Projects.Agents.AgentListOrder? order = default(Azure.AI.Projects.Agents.AgentListOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.AsyncCollectionResult GetSessionsAsync(string agentName, string userIsolationKey = null, int? limit = default(int?), Azure.AI.Projects.Agents.AgentListOrder? order = default(Azure.AI.Projects.Agents.AgentListOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.ClientModel.ClientResult PatchAgentObject(string agentName, Azure.AI.Projects.Agents.PatchAgentOptions patchAgentOptions, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> PatchAgentObjectAsync(string agentName, Azure.AI.Projects.Agents.PatchAgentOptions patchAgentOptions, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.ClientModel.ClientResult UpdateAgent(string agentName, System.ClientModel.BinaryContent content, string foundryFeatures = null, System.ClientModel.Primitives.RequestOptions options = null) { throw null; } @@ -161,9 +168,9 @@ public enum AgentDefinitionOptInKeys { HostedAgentsV1Preview = 0, WorkflowAgentsV1Preview = 1, - ContainerAgentsV1Preview = 2, - AgentEndpointV1Preview = 3, - CodeAgentsV1Preview = 4, + AgentEndpointV1Preview = 2, + CodeAgentsV1Preview = 3, + ExternalAgentsV1Preview = 4, } public abstract partial class AgentEndpointAuthorizationScheme : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { @@ -269,14 +276,14 @@ public partial class AgentSessionFiles { protected AgentSessionFiles() { } public System.ClientModel.Primitives.ClientPipeline Pipeline { get { throw null; } } - public virtual System.ClientModel.ClientResult DeleteSessionFile(string agentName, string sessionId, string path, bool? recursive = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DeleteSessionFileAsync(string agentName, string sessionId, string path, bool? recursive = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.BinaryData DownloadSessionFile(string agentName, string sessionId, string sessionStoragePath, string localPath, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DownloadSessionFileAsync(string agentName, string sessionId, string sessionStoragePath, string localPath, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.ClientModel.ClientResult GetSessionFiles(string agentName, string sessionId, string sessionStoragePath, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetSessionFilesAsync(string agentName, string sessionId, string sessionStoragePath, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public System.ClientModel.ClientResult UploadSessionFile(string agentName, string sessionId, string sessionStoragePath, string localPath, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UploadSessionFileAsync(string agentName, string sessionId, string sessionStoragePath, string localPath, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.ClientResult DeleteSessionFile(string agentName, string sessionId, string path, bool? recursive = default(bool?), string userIsolationKey = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteSessionFileAsync(string agentName, string sessionId, string path, bool? recursive = default(bool?), string userIsolationKey = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.BinaryData DownloadSessionFile(string agentName, string sessionId, string sessionStoragePath, string localPath, string userIsolationKey = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DownloadSessionFileAsync(string agentName, string sessionId, string sessionStoragePath, string localPath, string userIsolationKey = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.ClientResult GetSessionFiles(string agentName, string sessionId, string sessionStoragePath, string userIsolationKey = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetSessionFilesAsync(string agentName, string sessionId, string sessionStoragePath, string userIsolationKey = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public System.ClientModel.ClientResult UploadSessionFile(string agentName, string sessionId, string sessionStoragePath, string localPath, string userIsolationKey = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UploadSessionFileAsync(string agentName, string sessionId, string sessionStoragePath, string localPath, string userIsolationKey = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct AgentSessionStatus : System.IEquatable @@ -398,6 +405,7 @@ public AzureAISearchTool(Azure.AI.Projects.Agents.AzureAISearchToolOptions optio public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } public Azure.AI.Projects.Agents.AzureAISearchToolOptions Options { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Projects.Agents.ProjectsAgentTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Projects.Agents.ProjectsAgentTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -507,6 +515,7 @@ public partial class AzureFunctionTool : Azure.AI.Projects.Agents.ProjectsAgentT { public AzureFunctionTool(Azure.AI.Projects.Agents.AzureFunctionDefinition azureFunction) { } public Azure.AI.Projects.Agents.AzureFunctionDefinition AzureFunction { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Projects.Agents.ProjectsAgentTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Projects.Agents.ProjectsAgentTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -542,6 +551,7 @@ public BingCustomSearchPreviewTool(Azure.AI.Projects.Agents.BingCustomSearchTool public Azure.AI.Projects.Agents.BingCustomSearchToolOptions BingCustomSearchPreview { get { throw null; } set { } } public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Projects.Agents.ProjectsAgentTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Projects.Agents.ProjectsAgentTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -604,6 +614,7 @@ public BingGroundingTool(Azure.AI.Projects.Agents.BingGroundingSearchToolOptions public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } public Azure.AI.Projects.Agents.BingGroundingSearchToolOptions SearchToolOptions { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Projects.Agents.ProjectsAgentTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Projects.Agents.ProjectsAgentTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -645,6 +656,7 @@ public partial class BrowserAutomationPreviewTool : Azure.AI.Projects.Agents.Pro public BrowserAutomationPreviewTool(Azure.AI.Projects.Agents.BrowserAutomationToolOptions toolParameters) { } public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } public Azure.AI.Projects.Agents.BrowserAutomationToolOptions ToolParameters { get { throw null; } set { } } protected override Azure.AI.Projects.Agents.ProjectsAgentTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -690,6 +702,7 @@ public CaptureStructuredOutputsTool(Azure.AI.Projects.Agents.StructuredOutputDef public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } public Azure.AI.Projects.Agents.StructuredOutputDefinition OutputDefinition { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Projects.Agents.ProjectsAgentTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Projects.Agents.ProjectsAgentTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -775,6 +788,38 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class CreateAgentFromCodeOptions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CreateAgentFromCodeOptions(Azure.AI.Projects.Agents.CreateAgentVersionFromCodeMetadata metadata, System.BinaryData code) { } + public System.BinaryData Code { get { throw null; } } + public Azure.AI.Projects.Agents.CreateAgentVersionFromCodeMetadata Metadata { get { throw null; } } + protected virtual Azure.AI.Projects.Agents.CreateAgentFromCodeOptions JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + public static implicit operator System.ClientModel.BinaryContent (Azure.AI.Projects.Agents.CreateAgentFromCodeOptions createAgentFromCodeOptions) { throw null; } + protected virtual Azure.AI.Projects.Agents.CreateAgentFromCodeOptions PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.Agents.CreateAgentFromCodeOptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.Agents.CreateAgentFromCodeOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CreateAgentVersionFromCodeMetadata : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CreateAgentVersionFromCodeMetadata(Azure.AI.Projects.Agents.HostedAgentDefinition definition) { } + public Azure.AI.Projects.Agents.HostedAgentDefinition Definition { get { throw null; } } + public string Description { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Metadata { get { throw null; } } + protected virtual Azure.AI.Projects.Agents.CreateAgentVersionFromCodeMetadata JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.Agents.CreateAgentVersionFromCodeMetadata PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.Agents.CreateAgentVersionFromCodeMetadata System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.Agents.CreateAgentVersionFromCodeMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class CreateAgentVersionFromManifestRequest : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public CreateAgentVersionFromManifestRequest(string manifestId, System.Collections.Generic.IDictionary parameterValues) { } @@ -833,6 +878,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class EntraAuthorizationScheme : Azure.AI.Projects.Agents.AgentEndpointAuthorizationScheme, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public EntraAuthorizationScheme() { } + public Azure.AI.Projects.Agents.IsolationKeySource IsolationKeySource { get { throw null; } set { } } protected override Azure.AI.Projects.Agents.AgentEndpointAuthorizationScheme JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Projects.Agents.AgentEndpointAuthorizationScheme PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -843,6 +889,19 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class EntraIsolationKeySource : Azure.AI.Projects.Agents.IsolationKeySource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EntraIsolationKeySource() { } + protected override Azure.AI.Projects.Agents.IsolationKeySource JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.Agents.IsolationKeySource PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.Agents.EntraIsolationKeySource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.Agents.EntraIsolationKeySource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ExportedDataTypes : System.IEquatable { @@ -861,6 +920,20 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public static bool operator !=(Azure.AI.Projects.Agents.ExportedDataTypes left, Azure.AI.Projects.Agents.ExportedDataTypes right) { throw null; } public override string ToString() { throw null; } } + public partial class ExternalAgentDefinition : Azure.AI.Projects.Agents.ProjectsAgentDefinition, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExternalAgentDefinition() { } + public string OtelAgentId { get { throw null; } set { } } + protected override Azure.AI.Projects.Agents.ProjectsAgentDefinition JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.Agents.ProjectsAgentDefinition PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.Agents.ExternalAgentDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.Agents.ExternalAgentDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class FabricDataAgentToolOptions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public FabricDataAgentToolOptions() { } @@ -884,6 +957,7 @@ public FabricIQPreviewTool(string projectConnectionId) { } public System.BinaryData RequireApproval { get { throw null; } set { } } public string ServerLabel { get { throw null; } set { } } public System.Uri ServerUrl { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Projects.Agents.ProjectsAgentTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Projects.Agents.ProjectsAgentTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -915,12 +989,25 @@ public enum FoundryFeaturesOptInKeys RedTeamsV1Preview = 2, InsightsV1Preview = 3, MemoryStoresV1Preview = 4, - ToolboxesV1Preview = 5, + RoutinesV1Preview = 5, SkillsV1Preview = 6, DataGenerationJobsV1Preview = 7, ModelsV1Preview = 8, AgentsOptimizationV1Preview = 9, } + public partial class HeaderIsolationKeySource : Azure.AI.Projects.Agents.IsolationKeySource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public HeaderIsolationKeySource() { } + protected override Azure.AI.Projects.Agents.IsolationKeySource JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.Agents.IsolationKeySource PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.Agents.HeaderIsolationKeySource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.Agents.HeaderIsolationKeySource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class HeaderTelemetryEndpointAuth : Azure.AI.Projects.Agents.TelemetryEndpointAuthentication, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public HeaderTelemetryEndpointAuth(string headerName, string secretId, string secretKey) { } @@ -962,6 +1049,19 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public abstract partial class IsolationKeySource : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal IsolationKeySource() { } + protected virtual Azure.AI.Projects.Agents.IsolationKeySource JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.Agents.IsolationKeySource PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.Agents.IsolationKeySource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.Agents.IsolationKeySource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ManagedAgentIdentityBlueprintReference : Azure.AI.Projects.Agents.AgentBlueprintReference, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ManagedAgentIdentityBlueprintReference(string blueprintId) { } @@ -998,6 +1098,7 @@ public MemorySearchPreviewTool(string memoryStoreName, string scope) { } public string Name { get { throw null; } set { } } public string Scope { get { throw null; } set { } } public Azure.AI.Projects.Agents.MemorySearchToolOptions SearchOptions { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } public int? UpdateDelayInSecs { get { throw null; } set { } } protected override Azure.AI.Projects.Agents.ProjectsAgentTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1028,6 +1129,7 @@ public partial class MicrosoftFabricPreviewTool : Azure.AI.Projects.Agents.Proje public MicrosoftFabricPreviewTool(Azure.AI.Projects.Agents.FabricDataAgentToolOptions toolOptions) { } public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } public Azure.AI.Projects.Agents.FabricDataAgentToolOptions ToolOptions { get { throw null; } set { } } protected override Azure.AI.Projects.Agents.ProjectsAgentTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1161,6 +1263,7 @@ public partial class OpenAPITool : Azure.AI.Projects.Agents.ProjectsAgentTool, S { public OpenAPITool(Azure.AI.Projects.Agents.OpenApiFunctionDefinition functionDefinition) { } public Azure.AI.Projects.Agents.OpenApiFunctionDefinition FunctionDefinition { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Projects.Agents.ProjectsAgentTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Projects.Agents.ProjectsAgentTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1283,6 +1386,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer private readonly object _dummy; private readonly int _dummyPrimitive; public ProjectsAgentKind(string value) { throw null; } + public static Azure.AI.Projects.Agents.ProjectsAgentKind External { get { throw null; } } public static Azure.AI.Projects.Agents.ProjectsAgentKind Hosted { get { throw null; } } public static Azure.AI.Projects.Agents.ProjectsAgentKind Prompt { get { throw null; } } public static Azure.AI.Projects.Agents.ProjectsAgentKind Workflow { get { throw null; } } @@ -1338,7 +1442,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } public static partial class ProjectsAgentsModelFactory { - public static Azure.AI.Projects.Agents.A2APreviewTool A2APreviewTool(string name = null, string description = null, System.Uri baseUri = null, string agentCardPath = null, string projectConnectionId = null) { throw null; } + public static Azure.AI.Projects.Agents.A2APreviewTool A2APreviewTool(string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null, System.Uri baseUri = null, string agentCardPath = null, string projectConnectionId = null) { throw null; } public static Azure.AI.Projects.Agents.A2APreviewTool A2APreviewTool(System.Uri baseUri, string agentCardPath, string projectConnectionId) { throw null; } public static Azure.AI.Projects.Agents.AgentBlueprintReference AgentBlueprintReference(string type = null) { throw null; } public static Azure.AI.Projects.Agents.AgentCard AgentCard(string version = null, string description = null, System.Collections.Generic.IEnumerable skills = null) { throw null; } @@ -1349,50 +1453,57 @@ public static partial class ProjectsAgentsModelFactory public static Azure.AI.Projects.Agents.AgentManifestOptions AgentManifestOptions(System.Collections.Generic.IDictionary metadata = null, string description = null, string manifestId = null, System.Collections.Generic.IDictionary parameterValues = null) { throw null; } public static Azure.AI.Projects.Agents.AgentsSkill AgentsSkill(string skillId = null, bool hasBlob = false, string name = null, string description = null, System.Collections.Generic.IDictionary metadata = null) { throw null; } public static Azure.AI.Projects.Agents.AzureAISearchTool AzureAISearchTool(Azure.AI.Projects.Agents.AzureAISearchToolOptions options) { throw null; } - public static Azure.AI.Projects.Agents.AzureAISearchTool AzureAISearchTool(string name = null, string description = null, Azure.AI.Projects.Agents.AzureAISearchToolOptions options = null) { throw null; } + public static Azure.AI.Projects.Agents.AzureAISearchTool AzureAISearchTool(string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null, Azure.AI.Projects.Agents.AzureAISearchToolOptions options = null) { throw null; } public static Azure.AI.Projects.Agents.AzureAISearchToolIndex AzureAISearchToolIndex(string projectConnectionId = null, string indexName = null, Azure.AI.Projects.Agents.AzureAISearchQueryType? queryType = default(Azure.AI.Projects.Agents.AzureAISearchQueryType?), int? topK = default(int?), string filter = null, string indexAssetId = null) { throw null; } public static Azure.AI.Projects.Agents.AzureAISearchToolOptions AzureAISearchToolOptions(System.Collections.Generic.IEnumerable indexes = null) { throw null; } public static Azure.AI.Projects.Agents.AzureFunctionBinding AzureFunctionBinding(Azure.AI.Projects.Agents.AzureFunctionStorageQueue storageQueue = null) { throw null; } public static Azure.AI.Projects.Agents.AzureFunctionDefinition AzureFunctionDefinition(Azure.AI.Projects.Agents.AzureFunctionDefinitionFunction function = null, Azure.AI.Projects.Agents.AzureFunctionBinding inputBinding = null, Azure.AI.Projects.Agents.AzureFunctionBinding outputBinding = null) { throw null; } public static Azure.AI.Projects.Agents.AzureFunctionDefinitionFunction AzureFunctionDefinitionFunction(string name = null, string description = null, System.BinaryData parameters = null) { throw null; } public static Azure.AI.Projects.Agents.AzureFunctionStorageQueue AzureFunctionStorageQueue(string queueServiceEndpoint = null, string queueName = null) { throw null; } - public static Azure.AI.Projects.Agents.AzureFunctionTool AzureFunctionTool(Azure.AI.Projects.Agents.AzureFunctionDefinition azureFunction = null) { throw null; } + public static Azure.AI.Projects.Agents.AzureFunctionTool AzureFunctionTool(Azure.AI.Projects.Agents.AzureFunctionDefinition azureFunction) { throw null; } + public static Azure.AI.Projects.Agents.AzureFunctionTool AzureFunctionTool(Azure.AI.Projects.Agents.AzureFunctionDefinition azureFunction = null, System.Collections.Generic.IDictionary toolConfigs = null) { throw null; } public static Azure.AI.Projects.Agents.BingCustomSearchConfiguration BingCustomSearchConfiguration(string projectConnectionId = null, string instanceName = null, string market = null, string setLang = null, long? count = default(long?), string freshness = null) { throw null; } public static Azure.AI.Projects.Agents.BingCustomSearchPreviewTool BingCustomSearchPreviewTool(Azure.AI.Projects.Agents.BingCustomSearchToolOptions bingCustomSearchPreview) { throw null; } - public static Azure.AI.Projects.Agents.BingCustomSearchPreviewTool BingCustomSearchPreviewTool(string name = null, string description = null, Azure.AI.Projects.Agents.BingCustomSearchToolOptions bingCustomSearchPreview = null) { throw null; } + public static Azure.AI.Projects.Agents.BingCustomSearchPreviewTool BingCustomSearchPreviewTool(string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null, Azure.AI.Projects.Agents.BingCustomSearchToolOptions bingCustomSearchPreview = null) { throw null; } public static Azure.AI.Projects.Agents.BingCustomSearchToolOptions BingCustomSearchToolOptions(System.Collections.Generic.IEnumerable searchConfigurations = null) { throw null; } public static Azure.AI.Projects.Agents.BingGroundingSearchConfiguration BingGroundingSearchConfiguration(string projectConnectionId = null, string market = null, string bingUserInterfaceLanguage = null, long? count = default(long?), string freshness = null) { throw null; } public static Azure.AI.Projects.Agents.BingGroundingSearchToolOptions BingGroundingSearchToolOptions(System.Collections.Generic.IEnumerable searchConfigurations = null) { throw null; } public static Azure.AI.Projects.Agents.BingGroundingTool BingGroundingTool(Azure.AI.Projects.Agents.BingGroundingSearchToolOptions searchToolOptions) { throw null; } - public static Azure.AI.Projects.Agents.BingGroundingTool BingGroundingTool(string name = null, string description = null, Azure.AI.Projects.Agents.BingGroundingSearchToolOptions searchToolOptions = null) { throw null; } + public static Azure.AI.Projects.Agents.BingGroundingTool BingGroundingTool(string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null, Azure.AI.Projects.Agents.BingGroundingSearchToolOptions searchToolOptions = null) { throw null; } public static Azure.AI.Projects.Agents.BotServiceAuthorizationScheme BotServiceAuthorizationScheme() { throw null; } public static Azure.AI.Projects.Agents.BotServiceRbacAuthorizationScheme BotServiceRbacAuthorizationScheme() { throw null; } public static Azure.AI.Projects.Agents.BrowserAutomationPreviewTool BrowserAutomationPreviewTool(Azure.AI.Projects.Agents.BrowserAutomationToolOptions toolParameters) { throw null; } - public static Azure.AI.Projects.Agents.BrowserAutomationPreviewTool BrowserAutomationPreviewTool(string name = null, string description = null, Azure.AI.Projects.Agents.BrowserAutomationToolOptions toolParameters = null) { throw null; } + public static Azure.AI.Projects.Agents.BrowserAutomationPreviewTool BrowserAutomationPreviewTool(string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null, Azure.AI.Projects.Agents.BrowserAutomationToolOptions toolParameters = null) { throw null; } public static Azure.AI.Projects.Agents.BrowserAutomationToolConnectionParameters BrowserAutomationToolConnectionParameters(string projectConnectionId = null) { throw null; } public static Azure.AI.Projects.Agents.BrowserAutomationToolOptions BrowserAutomationToolOptions(Azure.AI.Projects.Agents.BrowserAutomationToolConnectionParameters toolConnectionParameters = null) { throw null; } public static Azure.AI.Projects.Agents.CaptureStructuredOutputsTool CaptureStructuredOutputsTool(Azure.AI.Projects.Agents.StructuredOutputDefinition outputDefinition) { throw null; } - public static Azure.AI.Projects.Agents.CaptureStructuredOutputsTool CaptureStructuredOutputsTool(string name = null, string description = null, Azure.AI.Projects.Agents.StructuredOutputDefinition outputDefinition = null) { throw null; } + public static Azure.AI.Projects.Agents.CaptureStructuredOutputsTool CaptureStructuredOutputsTool(string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null, Azure.AI.Projects.Agents.StructuredOutputDefinition outputDefinition = null) { throw null; } public static Azure.AI.Projects.Agents.CodeConfiguration CodeConfiguration(string runtime = null, System.Collections.Generic.IEnumerable entryPoint = null, Azure.AI.Projects.Agents.CodeDependencyResolution dependencyResolution = default(Azure.AI.Projects.Agents.CodeDependencyResolution), string contentHash = null) { throw null; } public static Azure.AI.Projects.Agents.ContainerConfiguration ContainerConfiguration(string image = null) { throw null; } public static Azure.AI.Projects.Agents.ContentFilterConfiguration ContentFilterConfiguration(string raiPolicyName = null) { throw null; } + public static Azure.AI.Projects.Agents.CreateAgentFromCodeOptions CreateAgentFromCodeOptions(Azure.AI.Projects.Agents.CreateAgentVersionFromCodeMetadata metadata = null, System.BinaryData code = null) { throw null; } + public static Azure.AI.Projects.Agents.CreateAgentVersionFromCodeMetadata CreateAgentVersionFromCodeMetadata(string description = null, System.Collections.Generic.IDictionary metadata = null, Azure.AI.Projects.Agents.HostedAgentDefinition definition = null) { throw null; } public static Azure.AI.Projects.Agents.CreateAgentVersionFromManifestRequest CreateAgentVersionFromManifestRequest(System.Collections.Generic.IDictionary metadata = null, string description = null, string manifestId = null, System.Collections.Generic.IDictionary parameterValues = null) { throw null; } public static Azure.AI.Projects.Agents.DeclarativeAgentDefinition DeclarativeAgentDefinition(Azure.AI.Projects.Agents.ContentFilterConfiguration contentFilterConfiguration = null, string model = null, string instructions = null, float? temperature = default(float?), float? topP = default(float?), OpenAI.Responses.ResponseReasoningOptions reasoningOptions = null, System.Collections.Generic.IEnumerable tools = null, System.BinaryData toolChoice = null, OpenAI.Responses.ResponseTextOptions textOptions = null, System.Collections.Generic.IDictionary structuredInputs = null) { throw null; } public static Azure.AI.Projects.Agents.DeleteSkillResponse DeleteSkillResponse(string name = null, bool deleted = false) { throw null; } public static OpenAI.EmptyModelParam EmptyModelParam() { throw null; } - public static Azure.AI.Projects.Agents.EntraAuthorizationScheme EntraAuthorizationScheme() { throw null; } + public static Azure.AI.Projects.Agents.EntraAuthorizationScheme EntraAuthorizationScheme(Azure.AI.Projects.Agents.IsolationKeySource isolationKeySource = null) { throw null; } + public static Azure.AI.Projects.Agents.EntraIsolationKeySource EntraIsolationKeySource() { throw null; } + public static Azure.AI.Projects.Agents.ExternalAgentDefinition ExternalAgentDefinition(Azure.AI.Projects.Agents.ContentFilterConfiguration contentFilterConfiguration = null, string otelAgentId = null) { throw null; } public static Azure.AI.Projects.Agents.FabricDataAgentToolOptions FabricDataAgentToolOptions(System.Collections.Generic.IEnumerable projectConnections = null) { throw null; } - public static Azure.AI.Projects.Agents.FabricIQPreviewTool FabricIQPreviewTool(string projectConnectionId = null, string serverLabel = null, System.Uri serverUrl = null, System.BinaryData requireApproval = null, string name = null, string description = null) { throw null; } + public static Azure.AI.Projects.Agents.FabricIQPreviewTool FabricIQPreviewTool(string projectConnectionId = null, string serverLabel = null, System.Uri serverUrl = null, System.BinaryData requireApproval = null, string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null) { throw null; } public static Azure.AI.Projects.Agents.FixedRatioVersionSelectionRule FixedRatioVersionSelectionRule(string agentVersion = null, int trafficPercentage = 0) { throw null; } + public static Azure.AI.Projects.Agents.HeaderIsolationKeySource HeaderIsolationKeySource() { throw null; } public static Azure.AI.Projects.Agents.HeaderTelemetryEndpointAuth HeaderTelemetryEndpointAuth(string headerName = null, string secretId = null, string secretKey = null) { throw null; } public static Azure.AI.Projects.Agents.HostedAgentDefinition HostedAgentDefinition(Azure.AI.Projects.Agents.ContentFilterConfiguration contentFilterConfiguration, System.Collections.Generic.IEnumerable tools, System.Collections.Generic.IEnumerable versions, string cpu, string memory, System.Collections.Generic.IDictionary environmentVariables, string image) { throw null; } public static Azure.AI.Projects.Agents.HostedAgentDefinition HostedAgentDefinition(Azure.AI.Projects.Agents.ContentFilterConfiguration contentFilterConfiguration = null, System.Collections.Generic.IEnumerable tools = null, System.Collections.Generic.IEnumerable versions = null, string cpu = null, string memory = null, System.Collections.Generic.IDictionary environmentVariables = null, string image = null, Azure.AI.Projects.Agents.ContainerConfiguration containerConfiguration = null, System.Collections.Generic.IEnumerable protocolVersions = null, Azure.AI.Projects.Agents.CodeConfiguration codeConfiguration = null, Azure.AI.Projects.Agents.TelemetryConfig telemetryConfig = null) { throw null; } + public static Azure.AI.Projects.Agents.IsolationKeySource IsolationKeySource(string kind = null) { throw null; } public static Azure.AI.Projects.Agents.ManagedAgentIdentityBlueprintReference ManagedAgentIdentityBlueprintReference(string blueprintId = null) { throw null; } public static Azure.AI.Projects.Agents.MemorySearchPreviewTool MemorySearchPreviewTool(string memoryStoreName, string scope, Azure.AI.Projects.Agents.MemorySearchToolOptions searchOptions, int? updateDelayInSecs) { throw null; } - public static Azure.AI.Projects.Agents.MemorySearchPreviewTool MemorySearchPreviewTool(string name = null, string description = null, string memoryStoreName = null, string scope = null, Azure.AI.Projects.Agents.MemorySearchToolOptions searchOptions = null, int? updateDelayInSecs = default(int?)) { throw null; } + public static Azure.AI.Projects.Agents.MemorySearchPreviewTool MemorySearchPreviewTool(string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null, string memoryStoreName = null, string scope = null, Azure.AI.Projects.Agents.MemorySearchToolOptions searchOptions = null, int? updateDelayInSecs = default(int?)) { throw null; } public static Azure.AI.Projects.Agents.MemorySearchToolOptions MemorySearchToolOptions(int? maxMemories = default(int?)) { throw null; } public static Azure.AI.Projects.Agents.MicrosoftFabricPreviewTool MicrosoftFabricPreviewTool(Azure.AI.Projects.Agents.FabricDataAgentToolOptions toolOptions) { throw null; } - public static Azure.AI.Projects.Agents.MicrosoftFabricPreviewTool MicrosoftFabricPreviewTool(string name = null, string description = null, Azure.AI.Projects.Agents.FabricDataAgentToolOptions toolOptions = null) { throw null; } + public static Azure.AI.Projects.Agents.MicrosoftFabricPreviewTool MicrosoftFabricPreviewTool(string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null, Azure.AI.Projects.Agents.FabricDataAgentToolOptions toolOptions = null) { throw null; } public static Azure.AI.Projects.Agents.OpenAPIAnonymousAuthenticationDetails OpenAPIAnonymousAuthenticationDetails() { throw null; } public static Azure.AI.Projects.Agents.OpenApiAuthenticationDetails OpenApiAuthenticationDetails(string type = null) { throw null; } public static Azure.AI.Projects.Agents.OpenApiFunctionDefinition OpenApiFunctionDefinition(string name = null, string description = null, System.Collections.Generic.IDictionary spec = null, Azure.AI.Projects.Agents.OpenApiAuthenticationDetails authenticationDetails = null, System.Collections.Generic.IEnumerable defaultParams = null, System.Collections.Generic.IEnumerable functions = null) { throw null; } @@ -1401,7 +1512,8 @@ public static partial class ProjectsAgentsModelFactory public static Azure.AI.Projects.Agents.OpenAPIManagedSecurityScheme OpenAPIManagedSecurityScheme(string audience = null) { throw null; } public static Azure.AI.Projects.Agents.OpenApiProjectConnectionAuthenticationDetails OpenApiProjectConnectionAuthenticationDetails(Azure.AI.Projects.Agents.OpenApiProjectConnectionSecurityScheme securityScheme = null) { throw null; } public static Azure.AI.Projects.Agents.OpenApiProjectConnectionSecurityScheme OpenApiProjectConnectionSecurityScheme(string projectConnectionId = null) { throw null; } - public static Azure.AI.Projects.Agents.OpenAPITool OpenAPITool(Azure.AI.Projects.Agents.OpenApiFunctionDefinition functionDefinition = null) { throw null; } + public static Azure.AI.Projects.Agents.OpenAPITool OpenAPITool(Azure.AI.Projects.Agents.OpenApiFunctionDefinition functionDefinition) { throw null; } + public static Azure.AI.Projects.Agents.OpenAPITool OpenAPITool(Azure.AI.Projects.Agents.OpenApiFunctionDefinition functionDefinition = null, System.Collections.Generic.IDictionary toolConfigs = null) { throw null; } public static Azure.AI.Projects.Agents.OtlpTelemetryEndpoint OtlpTelemetryEndpoint(System.Collections.Generic.IEnumerable exportedDataTypes = null, Azure.AI.Projects.Agents.TelemetryEndpointAuthentication authentication = null, string endpoint = null, Azure.AI.Projects.Agents.TelemetryTransportProtocol protocol = default(Azure.AI.Projects.Agents.TelemetryTransportProtocol)) { throw null; } public static Azure.AI.Projects.Agents.PatchAgentOptions PatchAgentOptions(Azure.AI.Projects.Agents.AgentEndpointConfiguration agentEndpoint = null, Azure.AI.Projects.Agents.AgentCard agentCard = null) { throw null; } public static Azure.AI.Projects.Agents.ProjectAgentSession ProjectAgentSession(string agentSessionId = null, Azure.AI.Projects.Agents.VersionIndicator versionIndicator = null, Azure.AI.Projects.Agents.AgentSessionStatus status = default(Azure.AI.Projects.Agents.AgentSessionStatus), System.DateTimeOffset createdAt = default(System.DateTimeOffset), System.DateTimeOffset lastAccessedAt = default(System.DateTimeOffset), System.DateTimeOffset expiresAt = default(System.DateTimeOffset)) { throw null; } @@ -1420,7 +1532,7 @@ public static partial class ProjectsAgentsModelFactory public static Azure.AI.Projects.Agents.SessionLogEvent SessionLogEvent(Azure.AI.Projects.Agents.SessionLogEventType @event = default(Azure.AI.Projects.Agents.SessionLogEventType), string data = null) { throw null; } public static Azure.AI.Projects.Agents.SharePointGroundingToolOptions SharePointGroundingToolOptions(System.Collections.Generic.IEnumerable projectConnections = null) { throw null; } public static Azure.AI.Projects.Agents.SharepointPreviewTool SharepointPreviewTool(Azure.AI.Projects.Agents.SharePointGroundingToolOptions toolOptions) { throw null; } - public static Azure.AI.Projects.Agents.SharepointPreviewTool SharepointPreviewTool(string name = null, string description = null, Azure.AI.Projects.Agents.SharePointGroundingToolOptions toolOptions = null) { throw null; } + public static Azure.AI.Projects.Agents.SharepointPreviewTool SharepointPreviewTool(string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null, Azure.AI.Projects.Agents.SharePointGroundingToolOptions toolOptions = null) { throw null; } public static Azure.AI.Projects.Agents.StructuredInputDefinition StructuredInputDefinition(string description = null, System.BinaryData defaultValue = null, System.Collections.Generic.IDictionary schema = null, bool? isRequired = default(bool?)) { throw null; } public static Azure.AI.Projects.Agents.StructuredOutputDefinition StructuredOutputDefinition(string name = null, string description = null, System.Collections.Generic.IDictionary schema = null, bool? strict = default(bool?)) { throw null; } public static Azure.AI.Projects.Agents.TelemetryConfig TelemetryConfig(System.Collections.Generic.IEnumerable endpoints = null) { throw null; } @@ -1428,8 +1540,9 @@ public static partial class ProjectsAgentsModelFactory public static Azure.AI.Projects.Agents.TelemetryEndpointAuthentication TelemetryEndpointAuthentication(string type = null) { throw null; } public static Azure.AI.Projects.Agents.ToolboxPolicies ToolboxPolicies(Azure.AI.Projects.Agents.ContentFilterConfiguration raiConfig = null) { throw null; } public static Azure.AI.Projects.Agents.ToolboxRecord ToolboxRecord(string id = null, string name = null, string defaultVersion = null) { throw null; } - public static Azure.AI.Projects.Agents.ToolboxSearchPreviewTool ToolboxSearchPreviewTool(string name = null, string description = null) { throw null; } + public static Azure.AI.Projects.Agents.ToolboxSearchPreviewTool ToolboxSearchPreviewTool(string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null) { throw null; } public static Azure.AI.Projects.Agents.ToolboxVersion ToolboxVersion(System.Collections.Generic.IDictionary metadata = null, string id = null, string name = null, string version = null, string description = null, System.DateTimeOffset createdAt = default(System.DateTimeOffset), System.Collections.Generic.IEnumerable tools = null, Azure.AI.Projects.Agents.ToolboxPolicies policies = null) { throw null; } + public static Azure.AI.Projects.Agents.ToolConfig ToolConfig(bool? pin = default(bool?), string additionalSearchText = null) { throw null; } public static Azure.AI.Projects.Agents.ToolProjectConnection ToolProjectConnection(string projectConnectionId = null) { throw null; } public static Azure.AI.Projects.Agents.ToolSearchTool ToolSearchTool(OpenAI.ToolSearchExecutionType? execution = default(OpenAI.ToolSearchExecutionType?), string description = null, OpenAI.EmptyModelParam parameters = null) { throw null; } public static Azure.AI.Projects.Agents.UpdateToolboxRequest UpdateToolboxRequest(string name = null, string defaultVersion = null) { throw null; } @@ -1438,12 +1551,12 @@ public static partial class ProjectsAgentsModelFactory public static Azure.AI.Projects.Agents.VersionSelectionRule VersionSelectionRule(string type = null, string agentVersion = null) { throw null; } public static Azure.AI.Projects.Agents.VersionSelector VersionSelector(System.Collections.Generic.IEnumerable versionSelectionRules = null) { throw null; } public static Azure.AI.Projects.Agents.WorkflowAgentDefinition WorkflowAgentDefinition(Azure.AI.Projects.Agents.ContentFilterConfiguration contentFilterConfiguration = null, string workflowYaml = null) { throw null; } - public static Azure.AI.Projects.Agents.WorkIQPreviewTool WorkIQPreviewTool(string projectConnectionId = null, string name = null, string description = null) { throw null; } + public static Azure.AI.Projects.Agents.WorkIQPreviewTool WorkIQPreviewTool(string projectConnectionId = null, string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null) { throw null; } } public abstract partial class ProjectsAgentTool : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ProjectsAgentTool() { } - public static Azure.AI.Projects.Agents.ProjectsAgentTool AsProjectTool(OpenAI.Responses.ResponseTool tool) { throw null; } + public static Azure.AI.Projects.Agents.ProjectsAgentTool AsProjectTool(T tool) { throw null; } public static OpenAI.Responses.ResponseTool CreateA2ATool(System.Uri baseUri, string agentCardPath = null) { throw null; } public static Azure.AI.Projects.Agents.AzureAISearchTool CreateAzureAISearchTool(Azure.AI.Projects.Agents.AzureAISearchToolOptions options = null) { throw null; } public static Azure.AI.Projects.Agents.BingCustomSearchPreviewTool CreateBingCustomSearchTool(Azure.AI.Projects.Agents.BingCustomSearchToolOptions parameters) { throw null; } @@ -1641,6 +1754,7 @@ public partial class SharepointPreviewTool : Azure.AI.Projects.Agents.ProjectsAg public SharepointPreviewTool(Azure.AI.Projects.Agents.SharePointGroundingToolOptions toolOptions) { } public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } public Azure.AI.Projects.Agents.SharePointGroundingToolOptions ToolOptions { get { throw null; } set { } } protected override Azure.AI.Projects.Agents.ProjectsAgentTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1781,6 +1895,7 @@ public partial class ToolboxSearchPreviewTool : Azure.AI.Projects.Agents.Project public ToolboxSearchPreviewTool() { } public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Projects.Agents.ProjectsAgentTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Projects.Agents.ProjectsAgentTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1813,6 +1928,21 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class ToolConfig : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ToolConfig() { } + public string AdditionalSearchText { get { throw null; } set { } } + public bool? Pin { get { throw null; } set { } } + protected virtual Azure.AI.Projects.Agents.ToolConfig JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.Agents.ToolConfig PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.Agents.ToolConfig System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.Agents.ToolConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ToolProjectConnection : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ToolProjectConnection(string projectConnectionId) { } @@ -1948,6 +2078,7 @@ public WorkIQPreviewTool(string projectConnectionId) { } public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } public string ProjectConnectionId { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Projects.Agents.ProjectsAgentTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Projects.Agents.ProjectsAgentTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/ai/Azure.AI.Projects.Agents/api/Azure.AI.Projects.Agents.netstandard2.0.cs b/sdk/ai/Azure.AI.Projects.Agents/api/Azure.AI.Projects.Agents.netstandard2.0.cs index e3e5c8d5c78a..99893cd73007 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/api/Azure.AI.Projects.Agents.netstandard2.0.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/api/Azure.AI.Projects.Agents.netstandard2.0.cs @@ -9,6 +9,7 @@ public A2APreviewTool(System.Uri baseUri) { } public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } public string ProjectConnectionId { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Projects.Agents.ProjectsAgentTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Projects.Agents.ProjectsAgentTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -35,28 +36,34 @@ public AgentAdministrationClient(System.Uri endpoint, System.ClientModel.Authent public virtual System.ClientModel.ClientResult CreateAgentVersion(string agentName, System.ClientModel.BinaryContent content, string foundryFeatures = null, System.ClientModel.Primitives.RequestOptions options = null) { throw null; } public virtual System.Threading.Tasks.Task> CreateAgentVersionAsync(string agentName, Azure.AI.Projects.Agents.ProjectsAgentVersionCreationOptions options = null, string foundryFeatures = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task CreateAgentVersionAsync(string agentName, System.ClientModel.BinaryContent content, string foundryFeatures = null, System.ClientModel.Primitives.RequestOptions options = null) { throw null; } - public virtual System.ClientModel.ClientResult CreateAgentVersionFromCode(string agentName, string filePath, string contentType, string foundryFeatures = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateAgentVersionFromCodeAsync(string agentName, string filePath, string contentType, string foundryFeatures = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.ClientResult CreateAgentVersionFromCode(string agentName, string filePath, Azure.AI.Projects.Agents.CreateAgentVersionFromCodeMetadata metadata, string contentType, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateAgentVersionFromCodeAsync(string agentName, string filePath, Azure.AI.Projects.Agents.CreateAgentVersionFromCodeMetadata metadata, string contentType, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.ClientModel.ClientResult CreateAgentVersionFromManifest(string agentName, System.ClientModel.BinaryContent content, System.ClientModel.Primitives.RequestOptions options = null) { throw null; } public virtual System.ClientModel.ClientResult CreateAgentVersionFromManifest(string agentName, string manifestId, Azure.AI.Projects.Agents.AgentManifestOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task CreateAgentVersionFromManifestAsync(string agentName, System.ClientModel.BinaryContent content, System.ClientModel.Primitives.RequestOptions options = null) { throw null; } public virtual System.Threading.Tasks.Task> CreateAgentVersionFromManifestAsync(string agentName, string manifestId, Azure.AI.Projects.Agents.AgentManifestOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.ClientModel.ClientResult CreateSession(string agentName, Azure.AI.Projects.Agents.VersionIndicator versionIndicator, string agentSessionId = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> CreateSessionAsync(string agentName, Azure.AI.Projects.Agents.VersionIndicator versionIndicator, string agentSessionId = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.ClientResult CreateSession(string agentName, Azure.AI.Projects.Agents.VersionIndicator versionIndicator, string agentSessionId = null, string userIsolationKey = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateSessionAsync(string agentName, Azure.AI.Projects.Agents.VersionIndicator versionIndicator, string agentSessionId = null, string userIsolationKey = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.ClientModel.ClientResult DeleteAgent(string agentName, System.ClientModel.Primitives.RequestOptions options) { throw null; } + public virtual System.ClientModel.ClientResult DeleteAgent(string agentName, bool? force, System.ClientModel.Primitives.RequestOptions options) { throw null; } + public virtual System.ClientModel.ClientResult DeleteAgent(string agentName, bool? force, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.ClientModel.ClientResult DeleteAgent(string agentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAgentAsync(string agentName, System.ClientModel.Primitives.RequestOptions options) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAgentAsync(string agentName, bool? force, System.ClientModel.Primitives.RequestOptions options) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAgentAsync(string agentName, bool? force, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAgentAsync(string agentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.ClientModel.ClientResult DeleteAgentVersion(string agentName, string agentVersion, System.ClientModel.Primitives.RequestOptions options) { throw null; } + public virtual System.ClientModel.ClientResult DeleteAgentVersion(string agentName, string agentVersion, bool? force, System.ClientModel.Primitives.RequestOptions options) { throw null; } + public virtual System.ClientModel.ClientResult DeleteAgentVersion(string agentName, string agentVersion, bool? force, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.ClientModel.ClientResult DeleteAgentVersion(string agentName, string agentVersion, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAgentVersionAsync(string agentName, string agentVersion, System.ClientModel.Primitives.RequestOptions options) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAgentVersionAsync(string agentName, string agentVersion, bool? force, System.ClientModel.Primitives.RequestOptions options) { throw null; } + public virtual System.Threading.Tasks.Task DeleteAgentVersionAsync(string agentName, string agentVersion, bool? force, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteAgentVersionAsync(string agentName, string agentVersion, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.ClientModel.ClientResult DeleteSession(string agentName, string sessionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DeleteSessionAsync(string agentName, string sessionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.ClientResult DeleteSession(string agentName, string sessionId, string userIsolationKey = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteSessionAsync(string agentName, string sessionId, string userIsolationKey = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.BinaryData DownloadAgentCode(string agentName, string path, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DownloadAgentCodeAsync(string agentName, string path, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.BinaryData DownloadAgentVersionCode(string agentName, string agentVersion, string path, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DownloadAgentVersionCodeAsync(string agentName, string agentVersion, string path, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.ClientModel.ClientResult GetAgent(string agentName, System.ClientModel.Primitives.RequestOptions options) { throw null; } public virtual System.ClientModel.ClientResult GetAgent(string agentName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task GetAgentAsync(string agentName, System.ClientModel.Primitives.RequestOptions options) { throw null; } @@ -72,12 +79,12 @@ public AgentAdministrationClient(System.Uri endpoint, System.ClientModel.Authent public virtual System.Threading.Tasks.Task> GetAgentVersionAsync(string agentName, string agentVersion, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.ClientModel.CollectionResult GetAgentVersions(string agentName, int? limit = default(int?), Azure.AI.Projects.Agents.AgentListOrder? order = default(Azure.AI.Projects.Agents.AgentListOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.ClientModel.AsyncCollectionResult GetAgentVersionsAsync(string agentName, int? limit = default(int?), Azure.AI.Projects.Agents.AgentListOrder? order = default(Azure.AI.Projects.Agents.AgentListOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.ClientModel.ClientResult GetSession(string agentName, string sessionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetSessionAsync(string agentName, string sessionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.ClientResult GetSession(string agentName, string sessionId, string userIsolationKey = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetSessionAsync(string agentName, string sessionId, string userIsolationKey = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.ClientModel.ClientResult GetSessionLogStream(string agentName, string agentVersion, string sessionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> GetSessionLogStreamAsync(string agentName, string agentVersion, string sessionId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.ClientModel.CollectionResult GetSessions(string agentName, int? limit = default(int?), Azure.AI.Projects.Agents.AgentListOrder? order = default(Azure.AI.Projects.Agents.AgentListOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.ClientModel.AsyncCollectionResult GetSessionsAsync(string agentName, int? limit = default(int?), Azure.AI.Projects.Agents.AgentListOrder? order = default(Azure.AI.Projects.Agents.AgentListOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.CollectionResult GetSessions(string agentName, string userIsolationKey = null, int? limit = default(int?), Azure.AI.Projects.Agents.AgentListOrder? order = default(Azure.AI.Projects.Agents.AgentListOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.AsyncCollectionResult GetSessionsAsync(string agentName, string userIsolationKey = null, int? limit = default(int?), Azure.AI.Projects.Agents.AgentListOrder? order = default(Azure.AI.Projects.Agents.AgentListOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.ClientModel.ClientResult PatchAgentObject(string agentName, Azure.AI.Projects.Agents.PatchAgentOptions patchAgentOptions, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task> PatchAgentObjectAsync(string agentName, Azure.AI.Projects.Agents.PatchAgentOptions patchAgentOptions, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.ClientModel.ClientResult UpdateAgent(string agentName, System.ClientModel.BinaryContent content, string foundryFeatures = null, System.ClientModel.Primitives.RequestOptions options = null) { throw null; } @@ -158,9 +165,9 @@ public enum AgentDefinitionOptInKeys { HostedAgentsV1Preview = 0, WorkflowAgentsV1Preview = 1, - ContainerAgentsV1Preview = 2, - AgentEndpointV1Preview = 3, - CodeAgentsV1Preview = 4, + AgentEndpointV1Preview = 2, + CodeAgentsV1Preview = 3, + ExternalAgentsV1Preview = 4, } public abstract partial class AgentEndpointAuthorizationScheme : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { @@ -265,14 +272,14 @@ public partial class AgentSessionFiles { protected AgentSessionFiles() { } public System.ClientModel.Primitives.ClientPipeline Pipeline { get { throw null; } } - public virtual System.ClientModel.ClientResult DeleteSessionFile(string agentName, string sessionId, string path, bool? recursive = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DeleteSessionFileAsync(string agentName, string sessionId, string path, bool? recursive = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.BinaryData DownloadSessionFile(string agentName, string sessionId, string sessionStoragePath, string localPath, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task DownloadSessionFileAsync(string agentName, string sessionId, string sessionStoragePath, string localPath, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.ClientModel.ClientResult GetSessionFiles(string agentName, string sessionId, string sessionStoragePath, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> GetSessionFilesAsync(string agentName, string sessionId, string sessionStoragePath, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public System.ClientModel.ClientResult UploadSessionFile(string agentName, string sessionId, string sessionStoragePath, string localPath, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> UploadSessionFileAsync(string agentName, string sessionId, string sessionStoragePath, string localPath, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.ClientResult DeleteSessionFile(string agentName, string sessionId, string path, bool? recursive = default(bool?), string userIsolationKey = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteSessionFileAsync(string agentName, string sessionId, string path, bool? recursive = default(bool?), string userIsolationKey = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.BinaryData DownloadSessionFile(string agentName, string sessionId, string sessionStoragePath, string localPath, string userIsolationKey = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DownloadSessionFileAsync(string agentName, string sessionId, string sessionStoragePath, string localPath, string userIsolationKey = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.ClientResult GetSessionFiles(string agentName, string sessionId, string sessionStoragePath, string userIsolationKey = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetSessionFilesAsync(string agentName, string sessionId, string sessionStoragePath, string userIsolationKey = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public System.ClientModel.ClientResult UploadSessionFile(string agentName, string sessionId, string sessionStoragePath, string localPath, string userIsolationKey = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> UploadSessionFileAsync(string agentName, string sessionId, string sessionStoragePath, string localPath, string userIsolationKey = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct AgentSessionStatus : System.IEquatable @@ -393,6 +400,7 @@ public AzureAISearchTool(Azure.AI.Projects.Agents.AzureAISearchToolOptions optio public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } public Azure.AI.Projects.Agents.AzureAISearchToolOptions Options { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Projects.Agents.ProjectsAgentTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Projects.Agents.ProjectsAgentTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -502,6 +510,7 @@ public partial class AzureFunctionTool : Azure.AI.Projects.Agents.ProjectsAgentT { public AzureFunctionTool(Azure.AI.Projects.Agents.AzureFunctionDefinition azureFunction) { } public Azure.AI.Projects.Agents.AzureFunctionDefinition AzureFunction { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Projects.Agents.ProjectsAgentTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Projects.Agents.ProjectsAgentTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -537,6 +546,7 @@ public BingCustomSearchPreviewTool(Azure.AI.Projects.Agents.BingCustomSearchTool public Azure.AI.Projects.Agents.BingCustomSearchToolOptions BingCustomSearchPreview { get { throw null; } set { } } public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Projects.Agents.ProjectsAgentTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Projects.Agents.ProjectsAgentTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -599,6 +609,7 @@ public BingGroundingTool(Azure.AI.Projects.Agents.BingGroundingSearchToolOptions public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } public Azure.AI.Projects.Agents.BingGroundingSearchToolOptions SearchToolOptions { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Projects.Agents.ProjectsAgentTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Projects.Agents.ProjectsAgentTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -640,6 +651,7 @@ public partial class BrowserAutomationPreviewTool : Azure.AI.Projects.Agents.Pro public BrowserAutomationPreviewTool(Azure.AI.Projects.Agents.BrowserAutomationToolOptions toolParameters) { } public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } public Azure.AI.Projects.Agents.BrowserAutomationToolOptions ToolParameters { get { throw null; } set { } } protected override Azure.AI.Projects.Agents.ProjectsAgentTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -685,6 +697,7 @@ public CaptureStructuredOutputsTool(Azure.AI.Projects.Agents.StructuredOutputDef public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } public Azure.AI.Projects.Agents.StructuredOutputDefinition OutputDefinition { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Projects.Agents.ProjectsAgentTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Projects.Agents.ProjectsAgentTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -770,6 +783,38 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class CreateAgentFromCodeOptions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CreateAgentFromCodeOptions(Azure.AI.Projects.Agents.CreateAgentVersionFromCodeMetadata metadata, System.BinaryData code) { } + public System.BinaryData Code { get { throw null; } } + public Azure.AI.Projects.Agents.CreateAgentVersionFromCodeMetadata Metadata { get { throw null; } } + protected virtual Azure.AI.Projects.Agents.CreateAgentFromCodeOptions JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + public static implicit operator System.ClientModel.BinaryContent (Azure.AI.Projects.Agents.CreateAgentFromCodeOptions createAgentFromCodeOptions) { throw null; } + protected virtual Azure.AI.Projects.Agents.CreateAgentFromCodeOptions PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.Agents.CreateAgentFromCodeOptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.Agents.CreateAgentFromCodeOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class CreateAgentVersionFromCodeMetadata : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public CreateAgentVersionFromCodeMetadata(Azure.AI.Projects.Agents.HostedAgentDefinition definition) { } + public Azure.AI.Projects.Agents.HostedAgentDefinition Definition { get { throw null; } } + public string Description { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Metadata { get { throw null; } } + protected virtual Azure.AI.Projects.Agents.CreateAgentVersionFromCodeMetadata JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.Agents.CreateAgentVersionFromCodeMetadata PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.Agents.CreateAgentVersionFromCodeMetadata System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.Agents.CreateAgentVersionFromCodeMetadata System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class CreateAgentVersionFromManifestRequest : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public CreateAgentVersionFromManifestRequest(string manifestId, System.Collections.Generic.IDictionary parameterValues) { } @@ -828,6 +873,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public partial class EntraAuthorizationScheme : Azure.AI.Projects.Agents.AgentEndpointAuthorizationScheme, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public EntraAuthorizationScheme() { } + public Azure.AI.Projects.Agents.IsolationKeySource IsolationKeySource { get { throw null; } set { } } protected override Azure.AI.Projects.Agents.AgentEndpointAuthorizationScheme JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Projects.Agents.AgentEndpointAuthorizationScheme PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -838,6 +884,19 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class EntraIsolationKeySource : Azure.AI.Projects.Agents.IsolationKeySource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EntraIsolationKeySource() { } + protected override Azure.AI.Projects.Agents.IsolationKeySource JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.Agents.IsolationKeySource PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.Agents.EntraIsolationKeySource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.Agents.EntraIsolationKeySource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct ExportedDataTypes : System.IEquatable { @@ -856,6 +915,20 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public static bool operator !=(Azure.AI.Projects.Agents.ExportedDataTypes left, Azure.AI.Projects.Agents.ExportedDataTypes right) { throw null; } public override string ToString() { throw null; } } + public partial class ExternalAgentDefinition : Azure.AI.Projects.Agents.ProjectsAgentDefinition, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ExternalAgentDefinition() { } + public string OtelAgentId { get { throw null; } set { } } + protected override Azure.AI.Projects.Agents.ProjectsAgentDefinition JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.Agents.ProjectsAgentDefinition PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.Agents.ExternalAgentDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.Agents.ExternalAgentDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class FabricDataAgentToolOptions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public FabricDataAgentToolOptions() { } @@ -879,6 +952,7 @@ public FabricIQPreviewTool(string projectConnectionId) { } public System.BinaryData RequireApproval { get { throw null; } set { } } public string ServerLabel { get { throw null; } set { } } public System.Uri ServerUrl { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Projects.Agents.ProjectsAgentTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Projects.Agents.ProjectsAgentTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -910,12 +984,25 @@ public enum FoundryFeaturesOptInKeys RedTeamsV1Preview = 2, InsightsV1Preview = 3, MemoryStoresV1Preview = 4, - ToolboxesV1Preview = 5, + RoutinesV1Preview = 5, SkillsV1Preview = 6, DataGenerationJobsV1Preview = 7, ModelsV1Preview = 8, AgentsOptimizationV1Preview = 9, } + public partial class HeaderIsolationKeySource : Azure.AI.Projects.Agents.IsolationKeySource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public HeaderIsolationKeySource() { } + protected override Azure.AI.Projects.Agents.IsolationKeySource JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.Agents.IsolationKeySource PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.Agents.HeaderIsolationKeySource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.Agents.HeaderIsolationKeySource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class HeaderTelemetryEndpointAuth : Azure.AI.Projects.Agents.TelemetryEndpointAuthentication, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public HeaderTelemetryEndpointAuth(string headerName, string secretId, string secretKey) { } @@ -956,6 +1043,19 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public abstract partial class IsolationKeySource : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal IsolationKeySource() { } + protected virtual Azure.AI.Projects.Agents.IsolationKeySource JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.Agents.IsolationKeySource PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.Agents.IsolationKeySource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.Agents.IsolationKeySource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ManagedAgentIdentityBlueprintReference : Azure.AI.Projects.Agents.AgentBlueprintReference, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ManagedAgentIdentityBlueprintReference(string blueprintId) { } @@ -992,6 +1092,7 @@ public MemorySearchPreviewTool(string memoryStoreName, string scope) { } public string Name { get { throw null; } set { } } public string Scope { get { throw null; } set { } } public Azure.AI.Projects.Agents.MemorySearchToolOptions SearchOptions { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } public int? UpdateDelayInSecs { get { throw null; } set { } } protected override Azure.AI.Projects.Agents.ProjectsAgentTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1022,6 +1123,7 @@ public partial class MicrosoftFabricPreviewTool : Azure.AI.Projects.Agents.Proje public MicrosoftFabricPreviewTool(Azure.AI.Projects.Agents.FabricDataAgentToolOptions toolOptions) { } public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } public Azure.AI.Projects.Agents.FabricDataAgentToolOptions ToolOptions { get { throw null; } set { } } protected override Azure.AI.Projects.Agents.ProjectsAgentTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1155,6 +1257,7 @@ public partial class OpenAPITool : Azure.AI.Projects.Agents.ProjectsAgentTool, S { public OpenAPITool(Azure.AI.Projects.Agents.OpenApiFunctionDefinition functionDefinition) { } public Azure.AI.Projects.Agents.OpenApiFunctionDefinition FunctionDefinition { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Projects.Agents.ProjectsAgentTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Projects.Agents.ProjectsAgentTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1276,6 +1379,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer private readonly object _dummy; private readonly int _dummyPrimitive; public ProjectsAgentKind(string value) { throw null; } + public static Azure.AI.Projects.Agents.ProjectsAgentKind External { get { throw null; } } public static Azure.AI.Projects.Agents.ProjectsAgentKind Hosted { get { throw null; } } public static Azure.AI.Projects.Agents.ProjectsAgentKind Prompt { get { throw null; } } public static Azure.AI.Projects.Agents.ProjectsAgentKind Workflow { get { throw null; } } @@ -1331,7 +1435,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer } public static partial class ProjectsAgentsModelFactory { - public static Azure.AI.Projects.Agents.A2APreviewTool A2APreviewTool(string name = null, string description = null, System.Uri baseUri = null, string agentCardPath = null, string projectConnectionId = null) { throw null; } + public static Azure.AI.Projects.Agents.A2APreviewTool A2APreviewTool(string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null, System.Uri baseUri = null, string agentCardPath = null, string projectConnectionId = null) { throw null; } public static Azure.AI.Projects.Agents.A2APreviewTool A2APreviewTool(System.Uri baseUri, string agentCardPath, string projectConnectionId) { throw null; } public static Azure.AI.Projects.Agents.AgentBlueprintReference AgentBlueprintReference(string type = null) { throw null; } public static Azure.AI.Projects.Agents.AgentCard AgentCard(string version = null, string description = null, System.Collections.Generic.IEnumerable skills = null) { throw null; } @@ -1342,50 +1446,57 @@ public static partial class ProjectsAgentsModelFactory public static Azure.AI.Projects.Agents.AgentManifestOptions AgentManifestOptions(System.Collections.Generic.IDictionary metadata = null, string description = null, string manifestId = null, System.Collections.Generic.IDictionary parameterValues = null) { throw null; } public static Azure.AI.Projects.Agents.AgentsSkill AgentsSkill(string skillId = null, bool hasBlob = false, string name = null, string description = null, System.Collections.Generic.IDictionary metadata = null) { throw null; } public static Azure.AI.Projects.Agents.AzureAISearchTool AzureAISearchTool(Azure.AI.Projects.Agents.AzureAISearchToolOptions options) { throw null; } - public static Azure.AI.Projects.Agents.AzureAISearchTool AzureAISearchTool(string name = null, string description = null, Azure.AI.Projects.Agents.AzureAISearchToolOptions options = null) { throw null; } + public static Azure.AI.Projects.Agents.AzureAISearchTool AzureAISearchTool(string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null, Azure.AI.Projects.Agents.AzureAISearchToolOptions options = null) { throw null; } public static Azure.AI.Projects.Agents.AzureAISearchToolIndex AzureAISearchToolIndex(string projectConnectionId = null, string indexName = null, Azure.AI.Projects.Agents.AzureAISearchQueryType? queryType = default(Azure.AI.Projects.Agents.AzureAISearchQueryType?), int? topK = default(int?), string filter = null, string indexAssetId = null) { throw null; } public static Azure.AI.Projects.Agents.AzureAISearchToolOptions AzureAISearchToolOptions(System.Collections.Generic.IEnumerable indexes = null) { throw null; } public static Azure.AI.Projects.Agents.AzureFunctionBinding AzureFunctionBinding(Azure.AI.Projects.Agents.AzureFunctionStorageQueue storageQueue = null) { throw null; } public static Azure.AI.Projects.Agents.AzureFunctionDefinition AzureFunctionDefinition(Azure.AI.Projects.Agents.AzureFunctionDefinitionFunction function = null, Azure.AI.Projects.Agents.AzureFunctionBinding inputBinding = null, Azure.AI.Projects.Agents.AzureFunctionBinding outputBinding = null) { throw null; } public static Azure.AI.Projects.Agents.AzureFunctionDefinitionFunction AzureFunctionDefinitionFunction(string name = null, string description = null, System.BinaryData parameters = null) { throw null; } public static Azure.AI.Projects.Agents.AzureFunctionStorageQueue AzureFunctionStorageQueue(string queueServiceEndpoint = null, string queueName = null) { throw null; } - public static Azure.AI.Projects.Agents.AzureFunctionTool AzureFunctionTool(Azure.AI.Projects.Agents.AzureFunctionDefinition azureFunction = null) { throw null; } + public static Azure.AI.Projects.Agents.AzureFunctionTool AzureFunctionTool(Azure.AI.Projects.Agents.AzureFunctionDefinition azureFunction) { throw null; } + public static Azure.AI.Projects.Agents.AzureFunctionTool AzureFunctionTool(Azure.AI.Projects.Agents.AzureFunctionDefinition azureFunction = null, System.Collections.Generic.IDictionary toolConfigs = null) { throw null; } public static Azure.AI.Projects.Agents.BingCustomSearchConfiguration BingCustomSearchConfiguration(string projectConnectionId = null, string instanceName = null, string market = null, string setLang = null, long? count = default(long?), string freshness = null) { throw null; } public static Azure.AI.Projects.Agents.BingCustomSearchPreviewTool BingCustomSearchPreviewTool(Azure.AI.Projects.Agents.BingCustomSearchToolOptions bingCustomSearchPreview) { throw null; } - public static Azure.AI.Projects.Agents.BingCustomSearchPreviewTool BingCustomSearchPreviewTool(string name = null, string description = null, Azure.AI.Projects.Agents.BingCustomSearchToolOptions bingCustomSearchPreview = null) { throw null; } + public static Azure.AI.Projects.Agents.BingCustomSearchPreviewTool BingCustomSearchPreviewTool(string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null, Azure.AI.Projects.Agents.BingCustomSearchToolOptions bingCustomSearchPreview = null) { throw null; } public static Azure.AI.Projects.Agents.BingCustomSearchToolOptions BingCustomSearchToolOptions(System.Collections.Generic.IEnumerable searchConfigurations = null) { throw null; } public static Azure.AI.Projects.Agents.BingGroundingSearchConfiguration BingGroundingSearchConfiguration(string projectConnectionId = null, string market = null, string bingUserInterfaceLanguage = null, long? count = default(long?), string freshness = null) { throw null; } public static Azure.AI.Projects.Agents.BingGroundingSearchToolOptions BingGroundingSearchToolOptions(System.Collections.Generic.IEnumerable searchConfigurations = null) { throw null; } public static Azure.AI.Projects.Agents.BingGroundingTool BingGroundingTool(Azure.AI.Projects.Agents.BingGroundingSearchToolOptions searchToolOptions) { throw null; } - public static Azure.AI.Projects.Agents.BingGroundingTool BingGroundingTool(string name = null, string description = null, Azure.AI.Projects.Agents.BingGroundingSearchToolOptions searchToolOptions = null) { throw null; } + public static Azure.AI.Projects.Agents.BingGroundingTool BingGroundingTool(string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null, Azure.AI.Projects.Agents.BingGroundingSearchToolOptions searchToolOptions = null) { throw null; } public static Azure.AI.Projects.Agents.BotServiceAuthorizationScheme BotServiceAuthorizationScheme() { throw null; } public static Azure.AI.Projects.Agents.BotServiceRbacAuthorizationScheme BotServiceRbacAuthorizationScheme() { throw null; } public static Azure.AI.Projects.Agents.BrowserAutomationPreviewTool BrowserAutomationPreviewTool(Azure.AI.Projects.Agents.BrowserAutomationToolOptions toolParameters) { throw null; } - public static Azure.AI.Projects.Agents.BrowserAutomationPreviewTool BrowserAutomationPreviewTool(string name = null, string description = null, Azure.AI.Projects.Agents.BrowserAutomationToolOptions toolParameters = null) { throw null; } + public static Azure.AI.Projects.Agents.BrowserAutomationPreviewTool BrowserAutomationPreviewTool(string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null, Azure.AI.Projects.Agents.BrowserAutomationToolOptions toolParameters = null) { throw null; } public static Azure.AI.Projects.Agents.BrowserAutomationToolConnectionParameters BrowserAutomationToolConnectionParameters(string projectConnectionId = null) { throw null; } public static Azure.AI.Projects.Agents.BrowserAutomationToolOptions BrowserAutomationToolOptions(Azure.AI.Projects.Agents.BrowserAutomationToolConnectionParameters toolConnectionParameters = null) { throw null; } public static Azure.AI.Projects.Agents.CaptureStructuredOutputsTool CaptureStructuredOutputsTool(Azure.AI.Projects.Agents.StructuredOutputDefinition outputDefinition) { throw null; } - public static Azure.AI.Projects.Agents.CaptureStructuredOutputsTool CaptureStructuredOutputsTool(string name = null, string description = null, Azure.AI.Projects.Agents.StructuredOutputDefinition outputDefinition = null) { throw null; } + public static Azure.AI.Projects.Agents.CaptureStructuredOutputsTool CaptureStructuredOutputsTool(string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null, Azure.AI.Projects.Agents.StructuredOutputDefinition outputDefinition = null) { throw null; } public static Azure.AI.Projects.Agents.CodeConfiguration CodeConfiguration(string runtime = null, System.Collections.Generic.IEnumerable entryPoint = null, Azure.AI.Projects.Agents.CodeDependencyResolution dependencyResolution = default(Azure.AI.Projects.Agents.CodeDependencyResolution), string contentHash = null) { throw null; } public static Azure.AI.Projects.Agents.ContainerConfiguration ContainerConfiguration(string image = null) { throw null; } public static Azure.AI.Projects.Agents.ContentFilterConfiguration ContentFilterConfiguration(string raiPolicyName = null) { throw null; } + public static Azure.AI.Projects.Agents.CreateAgentFromCodeOptions CreateAgentFromCodeOptions(Azure.AI.Projects.Agents.CreateAgentVersionFromCodeMetadata metadata = null, System.BinaryData code = null) { throw null; } + public static Azure.AI.Projects.Agents.CreateAgentVersionFromCodeMetadata CreateAgentVersionFromCodeMetadata(string description = null, System.Collections.Generic.IDictionary metadata = null, Azure.AI.Projects.Agents.HostedAgentDefinition definition = null) { throw null; } public static Azure.AI.Projects.Agents.CreateAgentVersionFromManifestRequest CreateAgentVersionFromManifestRequest(System.Collections.Generic.IDictionary metadata = null, string description = null, string manifestId = null, System.Collections.Generic.IDictionary parameterValues = null) { throw null; } public static Azure.AI.Projects.Agents.DeclarativeAgentDefinition DeclarativeAgentDefinition(Azure.AI.Projects.Agents.ContentFilterConfiguration contentFilterConfiguration = null, string model = null, string instructions = null, float? temperature = default(float?), float? topP = default(float?), OpenAI.Responses.ResponseReasoningOptions reasoningOptions = null, System.Collections.Generic.IEnumerable tools = null, System.BinaryData toolChoice = null, OpenAI.Responses.ResponseTextOptions textOptions = null, System.Collections.Generic.IDictionary structuredInputs = null) { throw null; } public static Azure.AI.Projects.Agents.DeleteSkillResponse DeleteSkillResponse(string name = null, bool deleted = false) { throw null; } public static OpenAI.EmptyModelParam EmptyModelParam() { throw null; } - public static Azure.AI.Projects.Agents.EntraAuthorizationScheme EntraAuthorizationScheme() { throw null; } + public static Azure.AI.Projects.Agents.EntraAuthorizationScheme EntraAuthorizationScheme(Azure.AI.Projects.Agents.IsolationKeySource isolationKeySource = null) { throw null; } + public static Azure.AI.Projects.Agents.EntraIsolationKeySource EntraIsolationKeySource() { throw null; } + public static Azure.AI.Projects.Agents.ExternalAgentDefinition ExternalAgentDefinition(Azure.AI.Projects.Agents.ContentFilterConfiguration contentFilterConfiguration = null, string otelAgentId = null) { throw null; } public static Azure.AI.Projects.Agents.FabricDataAgentToolOptions FabricDataAgentToolOptions(System.Collections.Generic.IEnumerable projectConnections = null) { throw null; } - public static Azure.AI.Projects.Agents.FabricIQPreviewTool FabricIQPreviewTool(string projectConnectionId = null, string serverLabel = null, System.Uri serverUrl = null, System.BinaryData requireApproval = null, string name = null, string description = null) { throw null; } + public static Azure.AI.Projects.Agents.FabricIQPreviewTool FabricIQPreviewTool(string projectConnectionId = null, string serverLabel = null, System.Uri serverUrl = null, System.BinaryData requireApproval = null, string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null) { throw null; } public static Azure.AI.Projects.Agents.FixedRatioVersionSelectionRule FixedRatioVersionSelectionRule(string agentVersion = null, int trafficPercentage = 0) { throw null; } + public static Azure.AI.Projects.Agents.HeaderIsolationKeySource HeaderIsolationKeySource() { throw null; } public static Azure.AI.Projects.Agents.HeaderTelemetryEndpointAuth HeaderTelemetryEndpointAuth(string headerName = null, string secretId = null, string secretKey = null) { throw null; } public static Azure.AI.Projects.Agents.HostedAgentDefinition HostedAgentDefinition(Azure.AI.Projects.Agents.ContentFilterConfiguration contentFilterConfiguration, System.Collections.Generic.IEnumerable tools, System.Collections.Generic.IEnumerable versions, string cpu, string memory, System.Collections.Generic.IDictionary environmentVariables, string image) { throw null; } public static Azure.AI.Projects.Agents.HostedAgentDefinition HostedAgentDefinition(Azure.AI.Projects.Agents.ContentFilterConfiguration contentFilterConfiguration = null, System.Collections.Generic.IEnumerable tools = null, System.Collections.Generic.IEnumerable versions = null, string cpu = null, string memory = null, System.Collections.Generic.IDictionary environmentVariables = null, string image = null, Azure.AI.Projects.Agents.ContainerConfiguration containerConfiguration = null, System.Collections.Generic.IEnumerable protocolVersions = null, Azure.AI.Projects.Agents.CodeConfiguration codeConfiguration = null, Azure.AI.Projects.Agents.TelemetryConfig telemetryConfig = null) { throw null; } + public static Azure.AI.Projects.Agents.IsolationKeySource IsolationKeySource(string kind = null) { throw null; } public static Azure.AI.Projects.Agents.ManagedAgentIdentityBlueprintReference ManagedAgentIdentityBlueprintReference(string blueprintId = null) { throw null; } public static Azure.AI.Projects.Agents.MemorySearchPreviewTool MemorySearchPreviewTool(string memoryStoreName, string scope, Azure.AI.Projects.Agents.MemorySearchToolOptions searchOptions, int? updateDelayInSecs) { throw null; } - public static Azure.AI.Projects.Agents.MemorySearchPreviewTool MemorySearchPreviewTool(string name = null, string description = null, string memoryStoreName = null, string scope = null, Azure.AI.Projects.Agents.MemorySearchToolOptions searchOptions = null, int? updateDelayInSecs = default(int?)) { throw null; } + public static Azure.AI.Projects.Agents.MemorySearchPreviewTool MemorySearchPreviewTool(string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null, string memoryStoreName = null, string scope = null, Azure.AI.Projects.Agents.MemorySearchToolOptions searchOptions = null, int? updateDelayInSecs = default(int?)) { throw null; } public static Azure.AI.Projects.Agents.MemorySearchToolOptions MemorySearchToolOptions(int? maxMemories = default(int?)) { throw null; } public static Azure.AI.Projects.Agents.MicrosoftFabricPreviewTool MicrosoftFabricPreviewTool(Azure.AI.Projects.Agents.FabricDataAgentToolOptions toolOptions) { throw null; } - public static Azure.AI.Projects.Agents.MicrosoftFabricPreviewTool MicrosoftFabricPreviewTool(string name = null, string description = null, Azure.AI.Projects.Agents.FabricDataAgentToolOptions toolOptions = null) { throw null; } + public static Azure.AI.Projects.Agents.MicrosoftFabricPreviewTool MicrosoftFabricPreviewTool(string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null, Azure.AI.Projects.Agents.FabricDataAgentToolOptions toolOptions = null) { throw null; } public static Azure.AI.Projects.Agents.OpenAPIAnonymousAuthenticationDetails OpenAPIAnonymousAuthenticationDetails() { throw null; } public static Azure.AI.Projects.Agents.OpenApiAuthenticationDetails OpenApiAuthenticationDetails(string type = null) { throw null; } public static Azure.AI.Projects.Agents.OpenApiFunctionDefinition OpenApiFunctionDefinition(string name = null, string description = null, System.Collections.Generic.IDictionary spec = null, Azure.AI.Projects.Agents.OpenApiAuthenticationDetails authenticationDetails = null, System.Collections.Generic.IEnumerable defaultParams = null, System.Collections.Generic.IEnumerable functions = null) { throw null; } @@ -1394,7 +1505,8 @@ public static partial class ProjectsAgentsModelFactory public static Azure.AI.Projects.Agents.OpenAPIManagedSecurityScheme OpenAPIManagedSecurityScheme(string audience = null) { throw null; } public static Azure.AI.Projects.Agents.OpenApiProjectConnectionAuthenticationDetails OpenApiProjectConnectionAuthenticationDetails(Azure.AI.Projects.Agents.OpenApiProjectConnectionSecurityScheme securityScheme = null) { throw null; } public static Azure.AI.Projects.Agents.OpenApiProjectConnectionSecurityScheme OpenApiProjectConnectionSecurityScheme(string projectConnectionId = null) { throw null; } - public static Azure.AI.Projects.Agents.OpenAPITool OpenAPITool(Azure.AI.Projects.Agents.OpenApiFunctionDefinition functionDefinition = null) { throw null; } + public static Azure.AI.Projects.Agents.OpenAPITool OpenAPITool(Azure.AI.Projects.Agents.OpenApiFunctionDefinition functionDefinition) { throw null; } + public static Azure.AI.Projects.Agents.OpenAPITool OpenAPITool(Azure.AI.Projects.Agents.OpenApiFunctionDefinition functionDefinition = null, System.Collections.Generic.IDictionary toolConfigs = null) { throw null; } public static Azure.AI.Projects.Agents.OtlpTelemetryEndpoint OtlpTelemetryEndpoint(System.Collections.Generic.IEnumerable exportedDataTypes = null, Azure.AI.Projects.Agents.TelemetryEndpointAuthentication authentication = null, string endpoint = null, Azure.AI.Projects.Agents.TelemetryTransportProtocol protocol = default(Azure.AI.Projects.Agents.TelemetryTransportProtocol)) { throw null; } public static Azure.AI.Projects.Agents.PatchAgentOptions PatchAgentOptions(Azure.AI.Projects.Agents.AgentEndpointConfiguration agentEndpoint = null, Azure.AI.Projects.Agents.AgentCard agentCard = null) { throw null; } public static Azure.AI.Projects.Agents.ProjectAgentSession ProjectAgentSession(string agentSessionId = null, Azure.AI.Projects.Agents.VersionIndicator versionIndicator = null, Azure.AI.Projects.Agents.AgentSessionStatus status = default(Azure.AI.Projects.Agents.AgentSessionStatus), System.DateTimeOffset createdAt = default(System.DateTimeOffset), System.DateTimeOffset lastAccessedAt = default(System.DateTimeOffset), System.DateTimeOffset expiresAt = default(System.DateTimeOffset)) { throw null; } @@ -1413,7 +1525,7 @@ public static partial class ProjectsAgentsModelFactory public static Azure.AI.Projects.Agents.SessionLogEvent SessionLogEvent(Azure.AI.Projects.Agents.SessionLogEventType @event = default(Azure.AI.Projects.Agents.SessionLogEventType), string data = null) { throw null; } public static Azure.AI.Projects.Agents.SharePointGroundingToolOptions SharePointGroundingToolOptions(System.Collections.Generic.IEnumerable projectConnections = null) { throw null; } public static Azure.AI.Projects.Agents.SharepointPreviewTool SharepointPreviewTool(Azure.AI.Projects.Agents.SharePointGroundingToolOptions toolOptions) { throw null; } - public static Azure.AI.Projects.Agents.SharepointPreviewTool SharepointPreviewTool(string name = null, string description = null, Azure.AI.Projects.Agents.SharePointGroundingToolOptions toolOptions = null) { throw null; } + public static Azure.AI.Projects.Agents.SharepointPreviewTool SharepointPreviewTool(string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null, Azure.AI.Projects.Agents.SharePointGroundingToolOptions toolOptions = null) { throw null; } public static Azure.AI.Projects.Agents.StructuredInputDefinition StructuredInputDefinition(string description = null, System.BinaryData defaultValue = null, System.Collections.Generic.IDictionary schema = null, bool? isRequired = default(bool?)) { throw null; } public static Azure.AI.Projects.Agents.StructuredOutputDefinition StructuredOutputDefinition(string name = null, string description = null, System.Collections.Generic.IDictionary schema = null, bool? strict = default(bool?)) { throw null; } public static Azure.AI.Projects.Agents.TelemetryConfig TelemetryConfig(System.Collections.Generic.IEnumerable endpoints = null) { throw null; } @@ -1421,8 +1533,9 @@ public static partial class ProjectsAgentsModelFactory public static Azure.AI.Projects.Agents.TelemetryEndpointAuthentication TelemetryEndpointAuthentication(string type = null) { throw null; } public static Azure.AI.Projects.Agents.ToolboxPolicies ToolboxPolicies(Azure.AI.Projects.Agents.ContentFilterConfiguration raiConfig = null) { throw null; } public static Azure.AI.Projects.Agents.ToolboxRecord ToolboxRecord(string id = null, string name = null, string defaultVersion = null) { throw null; } - public static Azure.AI.Projects.Agents.ToolboxSearchPreviewTool ToolboxSearchPreviewTool(string name = null, string description = null) { throw null; } + public static Azure.AI.Projects.Agents.ToolboxSearchPreviewTool ToolboxSearchPreviewTool(string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null) { throw null; } public static Azure.AI.Projects.Agents.ToolboxVersion ToolboxVersion(System.Collections.Generic.IDictionary metadata = null, string id = null, string name = null, string version = null, string description = null, System.DateTimeOffset createdAt = default(System.DateTimeOffset), System.Collections.Generic.IEnumerable tools = null, Azure.AI.Projects.Agents.ToolboxPolicies policies = null) { throw null; } + public static Azure.AI.Projects.Agents.ToolConfig ToolConfig(bool? pin = default(bool?), string additionalSearchText = null) { throw null; } public static Azure.AI.Projects.Agents.ToolProjectConnection ToolProjectConnection(string projectConnectionId = null) { throw null; } public static Azure.AI.Projects.Agents.ToolSearchTool ToolSearchTool(OpenAI.ToolSearchExecutionType? execution = default(OpenAI.ToolSearchExecutionType?), string description = null, OpenAI.EmptyModelParam parameters = null) { throw null; } public static Azure.AI.Projects.Agents.UpdateToolboxRequest UpdateToolboxRequest(string name = null, string defaultVersion = null) { throw null; } @@ -1431,12 +1544,12 @@ public static partial class ProjectsAgentsModelFactory public static Azure.AI.Projects.Agents.VersionSelectionRule VersionSelectionRule(string type = null, string agentVersion = null) { throw null; } public static Azure.AI.Projects.Agents.VersionSelector VersionSelector(System.Collections.Generic.IEnumerable versionSelectionRules = null) { throw null; } public static Azure.AI.Projects.Agents.WorkflowAgentDefinition WorkflowAgentDefinition(Azure.AI.Projects.Agents.ContentFilterConfiguration contentFilterConfiguration = null, string workflowYaml = null) { throw null; } - public static Azure.AI.Projects.Agents.WorkIQPreviewTool WorkIQPreviewTool(string projectConnectionId = null, string name = null, string description = null) { throw null; } + public static Azure.AI.Projects.Agents.WorkIQPreviewTool WorkIQPreviewTool(string projectConnectionId = null, string name = null, string description = null, System.Collections.Generic.IDictionary toolConfigs = null) { throw null; } } public abstract partial class ProjectsAgentTool : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ProjectsAgentTool() { } - public static Azure.AI.Projects.Agents.ProjectsAgentTool AsProjectTool(OpenAI.Responses.ResponseTool tool) { throw null; } + public static Azure.AI.Projects.Agents.ProjectsAgentTool AsProjectTool(T tool) { throw null; } public static OpenAI.Responses.ResponseTool CreateA2ATool(System.Uri baseUri, string agentCardPath = null) { throw null; } public static Azure.AI.Projects.Agents.AzureAISearchTool CreateAzureAISearchTool(Azure.AI.Projects.Agents.AzureAISearchToolOptions options = null) { throw null; } public static Azure.AI.Projects.Agents.BingCustomSearchPreviewTool CreateBingCustomSearchTool(Azure.AI.Projects.Agents.BingCustomSearchToolOptions parameters) { throw null; } @@ -1634,6 +1747,7 @@ public partial class SharepointPreviewTool : Azure.AI.Projects.Agents.ProjectsAg public SharepointPreviewTool(Azure.AI.Projects.Agents.SharePointGroundingToolOptions toolOptions) { } public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } public Azure.AI.Projects.Agents.SharePointGroundingToolOptions ToolOptions { get { throw null; } set { } } protected override Azure.AI.Projects.Agents.ProjectsAgentTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1774,6 +1888,7 @@ public partial class ToolboxSearchPreviewTool : Azure.AI.Projects.Agents.Project public ToolboxSearchPreviewTool() { } public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Projects.Agents.ProjectsAgentTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Projects.Agents.ProjectsAgentTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } @@ -1806,6 +1921,21 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class ToolConfig : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ToolConfig() { } + public string AdditionalSearchText { get { throw null; } set { } } + public bool? Pin { get { throw null; } set { } } + protected virtual Azure.AI.Projects.Agents.ToolConfig JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.Agents.ToolConfig PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.Agents.ToolConfig System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.Agents.ToolConfig System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ToolProjectConnection : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ToolProjectConnection(string projectConnectionId) { } @@ -1940,6 +2070,7 @@ public WorkIQPreviewTool(string projectConnectionId) { } public string Description { get { throw null; } set { } } public string Name { get { throw null; } set { } } public string ProjectConnectionId { get { throw null; } set { } } + public System.Collections.Generic.IDictionary ToolConfigs { get { throw null; } } protected override Azure.AI.Projects.Agents.ProjectsAgentTool JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } protected override Azure.AI.Projects.Agents.ProjectsAgentTool PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } diff --git a/sdk/ai/Azure.AI.Projects.Agents/assets.json b/sdk/ai/Azure.AI.Projects.Agents/assets.json index 60fdf4a10901..6a8e58013bba 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/assets.json +++ b/sdk/ai/Azure.AI.Projects.Agents/assets.json @@ -1,7 +1,7 @@ { "AssetsFileName": "assets.json", "AssetsRepo": "Azure/azure-sdk-assets", - "Tag": "net/ai/Azure.AI.Projects.Agents_0c94bb310b", + "Tag": "net/ai/Azure.AI.Projects.Agents_f5c8356b0f", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/ai/Azure.AI.Projects.Agents", "AssetsRepoLocation": {}, diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Custom/AgentAdministration.RestClient.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Custom/AgentAdministration.RestClient.cs index c9c554292214..b3cef321634e 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/src/Custom/AgentAdministration.RestClient.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Custom/AgentAdministration.RestClient.cs @@ -541,10 +541,31 @@ public virtual async Task GetAgentAsync(string agentName, RequestO /// The response returned from the service. [EditorBrowsable(EditorBrowsableState.Never)] public virtual ClientResult DeleteAgent(string agentName, RequestOptions options) + { + return DeleteAgent(agentName: agentName, force: null, options: options); + } + + /// + /// [Protocol Method] Deletes an agent. + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// The name of the agent to delete. + /// For Hosted Agents, if true, force-deletes the agent even if its versions have active sessions, cascading deletion to all associated sessions. This value is not relevant for other Agent types. Defaults to false. + /// The request options, 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. + /// Service returned a non-success status code. + /// The response returned from the service. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual ClientResult DeleteAgent(string agentName, bool? force, RequestOptions options) { Argument.AssertNotNullOrEmpty(agentName, nameof(agentName)); - using PipelineMessage message = CreateDeleteAgentRequest(agentName, options); + using PipelineMessage message = CreateDeleteAgentRequest(agentName, force, options); return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } @@ -564,10 +585,31 @@ public virtual ClientResult DeleteAgent(string agentName, RequestOptions options /// The response returned from the service. [EditorBrowsable(EditorBrowsableState.Never)] public virtual async Task DeleteAgentAsync(string agentName, RequestOptions options) + { + return await DeleteAgentAsync(agentName:agentName, force: null, options: options).ConfigureAwait(false); + } + + /// + /// [Protocol Method] Deletes an agent. + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// The name of the agent to delete. + /// For Hosted Agents, if true, force-deletes the agent even if its versions have active sessions, cascading deletion to all associated sessions. This value is not relevant for other Agent types. Defaults to false. + /// The request options, 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. + /// Service returned a non-success status code. + /// The response returned from the service. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task DeleteAgentAsync(string agentName, bool? force, RequestOptions options) { Argument.AssertNotNullOrEmpty(agentName, nameof(agentName)); - using PipelineMessage message = CreateDeleteAgentRequest(agentName, options); + using PipelineMessage message = CreateDeleteAgentRequest(agentName, force, options); return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } @@ -638,11 +680,38 @@ public virtual async Task GetAgentVersionAsync(string agentName, s /// The response returned from the service. [EditorBrowsable(EditorBrowsableState.Never)] public virtual ClientResult DeleteAgentVersion(string agentName, string agentVersion, RequestOptions options) + { + return DeleteAgentVersion( + agentName: agentName, + agentVersion: agentVersion, + force: null, + options + ); + } + + /// + /// [Protocol Method] Deletes a specific version of an agent. + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// The name of the agent to delete. + /// The version of the agent to delete. + /// For Hosted Agents, if true, force-deletes the version even if it has active sessions, cascading deletion to all associated sessions. This value is not relevant for other Agent types. Defaults to false. + /// The request options, 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. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual ClientResult DeleteAgentVersion(string agentName, string agentVersion, bool? force, RequestOptions options) { Argument.AssertNotNullOrEmpty(agentName, nameof(agentName)); Argument.AssertNotNullOrEmpty(agentVersion, nameof(agentVersion)); - using PipelineMessage message = CreateDeleteAgentVersionRequest(agentName, agentVersion, options); + using PipelineMessage message = CreateDeleteAgentVersionRequest(agentName, agentVersion, force, options); return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } @@ -663,11 +732,38 @@ public virtual ClientResult DeleteAgentVersion(string agentName, string agentVer /// The response returned from the service. [EditorBrowsable(EditorBrowsableState.Never)] public virtual async Task DeleteAgentVersionAsync(string agentName, string agentVersion, RequestOptions options) + { + return await DeleteAgentVersionAsync( + agentName: agentName, + agentVersion: agentVersion, + force: null, + options: options + ).ConfigureAwait(false); + } + + /// + /// [Protocol Method] Deletes a specific version of an agent. + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// The name of the agent to delete. + /// The version of the agent to delete. + /// For Hosted Agents, if true, force-deletes the version even if it has active sessions, cascading deletion to all associated sessions. This value is not relevant for other Agent types. Defaults to false. + /// The request options, 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. + [EditorBrowsable(EditorBrowsableState.Never)] + public virtual async Task DeleteAgentVersionAsync(string agentName, string agentVersion, bool? force, RequestOptions options) { Argument.AssertNotNullOrEmpty(agentName, nameof(agentName)); Argument.AssertNotNullOrEmpty(agentVersion, nameof(agentVersion)); - using PipelineMessage message = CreateDeleteAgentVersionRequest(agentName, agentVersion, options); + using PipelineMessage message = CreateDeleteAgentVersionRequest(agentName, agentVersion, force, options); return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } } diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Custom/AgentAdministrationClient.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Custom/AgentAdministrationClient.cs index 7c7e1c660879..052a5c767c6d 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/src/Custom/AgentAdministrationClient.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Custom/AgentAdministrationClient.cs @@ -9,6 +9,7 @@ using System.ComponentModel; using System.IO; using System.IO.Compression; +using System.Linq; using System.Threading; using System.Threading.Tasks; using Azure.AI.Projects.Agents; @@ -38,18 +39,16 @@ namespace Azure.AI.Projects.Agents; [CodeGenSuppress("UpdateAgentAsync", typeof(string), typeof(ProjectsAgentDefinition), typeof(IDictionary), typeof(string), typeof(AgentBlueprintReference), typeof(AgentDefinitionOptInKeys), typeof(CancellationToken))] [CodeGenSuppress("UpdateAgentFromManifest", typeof(string), typeof(string), typeof(IDictionary), typeof(IDictionary), typeof(string), typeof(CancellationToken))] [CodeGenSuppress("UpdateAgentFromManifestAsync", typeof(string), typeof(string), typeof(IDictionary), typeof(IDictionary), typeof(string), typeof(CancellationToken))] -[CodeGenSuppress("GetSessions", typeof(string), typeof(AgentDefinitionOptInKeys), typeof(int?), typeof(AgentListOrder?), typeof(string), typeof(string), typeof(CancellationToken))] -[CodeGenSuppress("GetSessionsAsync", typeof(string), typeof(AgentDefinitionOptInKeys), typeof(int?), typeof(AgentListOrder?), typeof(string), typeof(string), typeof(CancellationToken))] -[CodeGenSuppress("GetSessions", typeof(string), typeof(AgentDefinitionOptInKeys), typeof(int?), typeof(AgentListOrder?), typeof(string), typeof(string), typeof(CancellationToken))] -[CodeGenSuppress("GetSessionsAsync", typeof(string), typeof(AgentDefinitionOptInKeys), typeof(int?), typeof(AgentListOrder?), typeof(string), typeof(string), typeof(CancellationToken))] -[CodeGenSuppress("GetSessions", typeof(string), typeof(string), typeof(int?), typeof(string), typeof(string), typeof(string), typeof(RequestOptions))] -[CodeGenSuppress("GetSessionsAsync", typeof(string), typeof(string), typeof(int?), typeof(string), typeof(string), typeof(string), typeof(RequestOptions))] -[CodeGenSuppress("CreateSession", typeof(string), typeof(VersionIndicator), typeof(string), typeof(AgentDefinitionOptInKeys?), typeof(CancellationToken))] -[CodeGenSuppress("CreateSessionAsync", typeof(string), typeof(VersionIndicator), typeof(string), typeof(AgentDefinitionOptInKeys?), typeof(CancellationToken))] -[CodeGenSuppress("GetSession", typeof(string), typeof(string), typeof(AgentDefinitionOptInKeys?), typeof(CancellationToken))] -[CodeGenSuppress("GetSessionAsync", typeof(string), typeof(string), typeof(AgentDefinitionOptInKeys?), typeof(CancellationToken))] -[CodeGenSuppress("DeleteSession", typeof(string), typeof(string), typeof(AgentDefinitionOptInKeys?), typeof(CancellationToken))] -[CodeGenSuppress("DeleteSessionAsync", typeof(string), typeof(string), typeof(AgentDefinitionOptInKeys?), typeof(CancellationToken))] +[CodeGenSuppress("GetSessions", typeof(string), typeof(AgentDefinitionOptInKeys), typeof(string), typeof(int?), typeof(AgentListOrder?), typeof(string), typeof(string), typeof(CancellationToken))] +[CodeGenSuppress("GetSessionsAsync", typeof(string), typeof(AgentDefinitionOptInKeys), typeof(string), typeof(int?), typeof(AgentListOrder?), typeof(string), typeof(string), typeof(CancellationToken))] +[CodeGenSuppress("GetSessions", typeof(string), typeof(string), typeof(string), typeof(int?), typeof(string), typeof(string), typeof(string), typeof(RequestOptions))] +[CodeGenSuppress("GetSessionsAsync", typeof(string), typeof(string), typeof(string), typeof(int?), typeof(string), typeof(string), typeof(string), typeof(RequestOptions))] +[CodeGenSuppress("CreateSession", typeof(string), typeof(VersionIndicator), typeof(string), typeof(AgentDefinitionOptInKeys?), typeof(string), typeof(CancellationToken))] +[CodeGenSuppress("CreateSessionAsync", typeof(string), typeof(VersionIndicator), typeof(string), typeof(AgentDefinitionOptInKeys?), typeof(string), typeof(CancellationToken))] +[CodeGenSuppress("GetSession", typeof(string), typeof(string), typeof(AgentDefinitionOptInKeys?), typeof(string), typeof(CancellationToken))] +[CodeGenSuppress("GetSessionAsync", typeof(string), typeof(string), typeof(AgentDefinitionOptInKeys?), typeof(string), typeof(CancellationToken))] +[CodeGenSuppress("DeleteSession", typeof(string), typeof(string), typeof(AgentDefinitionOptInKeys?), typeof(string), typeof(CancellationToken))] +[CodeGenSuppress("DeleteSessionAsync", typeof(string), typeof(string), typeof(AgentDefinitionOptInKeys?), typeof(string), typeof(CancellationToken))] [CodeGenSuppress("GetSessionLogStream", typeof(string), typeof(string), typeof(string), typeof(AgentDefinitionOptInKeys?), typeof(CancellationToken))] [CodeGenSuppress("GetSessionLogStreamAsync", typeof(string), typeof(string), typeof(string), typeof(AgentDefinitionOptInKeys?), typeof(CancellationToken))] public partial class AgentAdministrationClient @@ -362,10 +361,26 @@ public virtual AsyncCollectionResult GetAgentVersionsAsync /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. public virtual ClientResult DeleteAgent(string agentName, CancellationToken cancellationToken = default) + { + return DeleteAgent( + agentName: agentName, + force: null, + cancellationToken: cancellationToken + ); + } + + /// Deletes an agent. + /// The name of the agent to delete. + /// For Hosted Agents, if true, force-deletes the agent even if its versions have active sessions, cascading deletion to all associated sessions. This value is not relevant for other Agent types. Defaults to false. + /// The cancellation token that can be used to cancel the operation. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + public virtual ClientResult DeleteAgent(string agentName, bool? force, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(agentName, nameof(agentName)); - ClientResult result = DeleteAgent(agentName, cancellationToken.ToRequestOptions()); + ClientResult result = DeleteAgent(agentName, force, cancellationToken.ToRequestOptions()); return result; } @@ -376,10 +391,26 @@ public virtual ClientResult DeleteAgent(string agentName, CancellationToken canc /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. public virtual async Task DeleteAgentAsync(string agentName, CancellationToken cancellationToken = default) + { + return await DeleteAgentAsync( + agentName: agentName, + force: null, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + + /// Deletes an agent. + /// The name of the agent to delete. + /// For Hosted Agents, if true, force-deletes the agent even if its versions have active sessions, cascading deletion to all associated sessions. This value is not relevant for other Agent types. Defaults to false. + /// The cancellation token that can be used to cancel the operation. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + public virtual async Task DeleteAgentAsync(string agentName, bool? force, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(agentName, nameof(agentName)); - ClientResult result = await DeleteAgentAsync(agentName, cancellationToken.ToRequestOptions()).ConfigureAwait(false); + ClientResult result = await DeleteAgentAsync(agentName, force, cancellationToken.ToRequestOptions()).ConfigureAwait(false); return result; } @@ -391,11 +422,29 @@ public virtual async Task DeleteAgentAsync(string agentName, Cance /// or is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. public virtual ClientResult DeleteAgentVersion(string agentName, string agentVersion, CancellationToken cancellationToken = default) + { + return DeleteAgentVersion( + agentName: agentName, + agentVersion: agentVersion, + force: null, + cancellationToken: cancellationToken + ); + } + + /// Deletes a specific version of an agent. + /// The name of the agent to delete. + /// The version of the agent to delete. + /// For Hosted Agents, if true, force-deletes the version even if it has active sessions, cascading deletion to all associated sessions. This value is not relevant for other Agent types. Defaults to false. + /// The cancellation token that can be used to cancel the operation. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + public virtual ClientResult DeleteAgentVersion(string agentName, string agentVersion, bool? force, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(agentName, nameof(agentName)); Argument.AssertNotNullOrEmpty(agentVersion, nameof(agentVersion)); - ClientResult result = DeleteAgentVersion(agentName, agentVersion, cancellationToken.ToRequestOptions()); + ClientResult result = DeleteAgentVersion(agentName, agentVersion, force, cancellationToken.ToRequestOptions()); return result; } @@ -407,11 +456,29 @@ public virtual ClientResult DeleteAgentVersion(string agentName, string agentVer /// or is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. public virtual async Task DeleteAgentVersionAsync(string agentName, string agentVersion, CancellationToken cancellationToken = default) + { + return await DeleteAgentVersionAsync( + agentName: agentName, + agentVersion: agentVersion, + force: null, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + + /// Deletes a specific version of an agent. + /// The name of the agent to delete. + /// The version of the agent to delete. + /// For Hosted Agents, if true, force-deletes the version even if it has active sessions, cascading deletion to all associated sessions. This value is not relevant for other Agent types. Defaults to false. + /// The cancellation token that can be used to cancel the operation. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + public virtual async Task DeleteAgentVersionAsync(string agentName, string agentVersion, bool? force, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(agentName, nameof(agentName)); Argument.AssertNotNullOrEmpty(agentVersion, nameof(agentVersion)); - ClientResult result = await DeleteAgentVersionAsync(agentName, agentVersion, cancellationToken.ToRequestOptions()).ConfigureAwait(false); + ClientResult result = await DeleteAgentVersionAsync(agentName, agentVersion, force, cancellationToken.ToRequestOptions()).ConfigureAwait(false); return result; } @@ -423,16 +490,17 @@ public virtual async Task DeleteAgentVersionAsync(string agentName /// The name of the agent to create a session for. /// Determines which agent version backs the session. /// Optional caller-provided session ID. If specified, it must be unique within the agent endpoint. Auto-generated if omitted. + /// Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user. /// The cancellation token that can be used to cancel the operation. /// or is null. /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. - public virtual ClientResult CreateSession(string agentName, VersionIndicator versionIndicator, string agentSessionId = default, CancellationToken cancellationToken = default) + public virtual ClientResult CreateSession(string agentName, VersionIndicator versionIndicator, string agentSessionId = default, string userIsolationKey = default, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(agentName, nameof(agentName)); CreateSessionRequest spreadModel = new CreateSessionRequest(agentSessionId, versionIndicator, default); - ClientResult result = CreateSession(agentName, spreadModel, default, cancellationToken.ToRequestOptions()); + ClientResult result = CreateSession(agentName, spreadModel, default, userIsolationKey, cancellationToken.ToRequestOptions()); return ClientResult.FromValue((ProjectAgentSession)result, result.GetRawResponse()); } @@ -444,21 +512,23 @@ public virtual ClientResult CreateSession(string agentName, /// The name of the agent to create a session for. /// Determines which agent version backs the session. /// Optional caller-provided session ID. If specified, it must be unique within the agent endpoint. Auto-generated if omitted. + /// Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user. /// The cancellation token that can be used to cancel the operation. /// or is null. /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. - public virtual async Task> CreateSessionAsync(string agentName, VersionIndicator versionIndicator, string agentSessionId = default, CancellationToken cancellationToken = default) + public virtual async Task> CreateSessionAsync(string agentName, VersionIndicator versionIndicator, string agentSessionId = default, string userIsolationKey=default, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(agentName, nameof(agentName)); CreateSessionRequest spreadModel = new CreateSessionRequest(agentSessionId, versionIndicator, default); - ClientResult result = await CreateSessionAsync(agentName, spreadModel, default, cancellationToken.ToRequestOptions()).ConfigureAwait(false); + ClientResult result = await CreateSessionAsync(agentName, spreadModel, default, userIsolationKey, cancellationToken.ToRequestOptions()).ConfigureAwait(false); return ClientResult.FromValue((ProjectAgentSession)result, result.GetRawResponse()); } /// Returns a list of sessions for the specified agent. /// The name of the agent. + /// Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user. /// /// A limit on the number of objects to be returned. Limit can range between 1 and 100, and the /// default is 20. @@ -481,13 +551,14 @@ public virtual async Task> CreateSessionAsync( /// is null. /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. - public virtual CollectionResult GetSessions(string agentName, int? limit = default, AgentListOrder? order = default, string after = default, string before = default, CancellationToken cancellationToken = default) + public virtual CollectionResult GetSessions(string agentName, string userIsolationKey = default, int? limit = default, AgentListOrder? order = default, string after = default, string before = default, CancellationToken cancellationToken = default) { return new InternalOpenAICollectionResultOfT( Pipeline, messageGenerator: (localCollectionOptions, localRequestOptions) => CreateGetSessionsRequest( localCollectionOptions.Filters[0], + localCollectionOptions.Filters.Count > 1 ? localCollectionOptions.Filters[1] : default, default, localCollectionOptions.Limit, localCollectionOptions.Order, @@ -495,12 +566,13 @@ public virtual CollectionResult GetSessions(string agentNam localCollectionOptions.BeforeId, localRequestOptions), dataItemDeserializer: (e, o) => CustomSerializationHelpers.DeserializeProjectOpenAIType(e, o), - new InternalOpenAICollectionResultOptions(limit, order?.ToString(), after, before, filters: [agentName]), + new InternalOpenAICollectionResultOptions(limit, order?.ToString(), after, before, filters: [agentName, userIsolationKey]), cancellationToken.ToRequestOptions()); } /// Returns a list of sessions for the specified agent. /// The name of the agent. + /// Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user. /// /// A limit on the number of objects to be returned. Limit can range between 1 and 100, and the /// default is 20. @@ -523,13 +595,14 @@ public virtual CollectionResult GetSessions(string agentNam /// is null. /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. - public virtual AsyncCollectionResult GetSessionsAsync(string agentName, int? limit = default, AgentListOrder? order = default, string after = default, string before = default, CancellationToken cancellationToken = default) + public virtual AsyncCollectionResult GetSessionsAsync(string agentName, string userIsolationKey = default, int? limit = default, AgentListOrder? order = default, string after = default, string before = default, CancellationToken cancellationToken = default) { return new InternalOpenAIAsyncCollectionResultOfT( Pipeline, messageGenerator: (localCollectionOptions, localRequestOptions) => CreateGetSessionsRequest( localCollectionOptions.Filters[0], + localCollectionOptions.Filters.Count > 1 ? localCollectionOptions.Filters[1] : default, default, localCollectionOptions.Limit, localCollectionOptions.Order, @@ -537,7 +610,7 @@ public virtual AsyncCollectionResult GetSessionsAsync(strin localCollectionOptions.BeforeId, localRequestOptions), dataItemDeserializer: (e, o) => CustomSerializationHelpers.DeserializeProjectOpenAIType(e, o), - new InternalOpenAICollectionResultOptions(limit, order?.ToString(), after, before, filters: [agentName]), + new InternalOpenAICollectionResultOptions(limit, order?.ToString(), after, before, filters: [agentName, userIsolationKey]), cancellationToken.ToRequestOptions()); } @@ -547,17 +620,18 @@ public virtual AsyncCollectionResult GetSessionsAsync(strin /// /// The name of the agent. /// The session identifier. + /// Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user. /// The cancellation token that can be used to cancel the operation. /// or /> is null. /// or /> is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. - public virtual ClientResult DeleteSession(string agentName, string sessionId, CancellationToken cancellationToken = default) + public virtual ClientResult DeleteSession(string agentName, string sessionId, string userIsolationKey = default, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(agentName, nameof(agentName)); Argument.AssertNotNullOrEmpty(sessionId, nameof(sessionId)); RequestOptions options = cancellationToken.ToRequestOptions(); - using PipelineMessage message = CreateDeleteSessionRequest(agentName, sessionId, default, options); + using PipelineMessage message = CreateDeleteSessionRequest(agentName, sessionId, default, userIsolationKey, options); return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } @@ -567,33 +641,52 @@ public virtual ClientResult DeleteSession(string agentName, string sessionId, Ca /// /// The name of the agent. /// The session identifier. + /// Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user. /// The cancellation token that can be used to cancel the operation. /// or is null. /// or is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. - public virtual async Task DeleteSessionAsync(string agentName, string sessionId, CancellationToken cancellationToken = default) + public virtual async Task DeleteSessionAsync(string agentName, string sessionId, string userIsolationKey = default, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(agentName, nameof(agentName)); Argument.AssertNotNullOrEmpty(sessionId, nameof(sessionId)); RequestOptions options = cancellationToken.ToRequestOptions(); - using PipelineMessage message = CreateDeleteSessionRequest(agentName, sessionId, default, options); + using PipelineMessage message = CreateDeleteSessionRequest(agentName, sessionId, default, userIsolationKey, options); return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } /// Retrieves a session by ID. /// The name of the agent. /// The session identifier. + /// Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user. + /// The cancellation token that can be used to cancel the operation. + /// or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + public virtual ClientResult GetSession(string agentName, string sessionId, string userIsolationKey = default, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(agentName, nameof(agentName)); + Argument.AssertNotNullOrEmpty(sessionId, nameof(sessionId)); + + ClientResult result = GetSession(agentName, sessionId, default, userIsolationKey, cancellationToken.ToRequestOptions()); + return ClientResult.FromValue((ProjectAgentSession)result, result.GetRawResponse()); + } + + /// Retrieves a session by ID. + /// The name of the agent. + /// The session identifier. + /// Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user. /// The cancellation token that can be used to cancel the operation. /// or is null. /// or is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. - public virtual ClientResult GetSession(string agentName, string sessionId, CancellationToken cancellationToken = default) + public virtual async Task> GetSessionAsync(string agentName, string sessionId, string userIsolationKey = default, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(agentName, nameof(agentName)); Argument.AssertNotNullOrEmpty(sessionId, nameof(sessionId)); - ClientResult result = GetSession(agentName, sessionId, default, cancellationToken.ToRequestOptions()); + ClientResult result = await GetSessionAsync(agentName, sessionId, default, userIsolationKey, cancellationToken.ToRequestOptions()).ConfigureAwait(false); return ClientResult.FromValue((ProjectAgentSession)result, result.GetRawResponse()); } @@ -653,22 +746,6 @@ public virtual async Task> PatchAgentObjectAsy return ClientResult.FromValue((ProjectsAgentRecord)result, result.GetRawResponse()); } - /// Retrieves a session by ID. - /// The name of the agent. - /// The session identifier. - /// The cancellation token that can be used to cancel the operation. - /// or is null. - /// or is an empty string, and was expected to be non-empty. - /// Service returned a non-success status code. - public virtual async Task> GetSessionAsync(string agentName, string sessionId, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(agentName, nameof(agentName)); - Argument.AssertNotNullOrEmpty(sessionId, nameof(sessionId)); - - ClientResult result = await GetSessionAsync(agentName, sessionId, default, cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return ClientResult.FromValue((ProjectAgentSession)result, result.GetRawResponse()); - } - /// /// Streams console logs (stdout / stderr) for a specific hosted agent session /// as a Server-Sent Events (SSE) stream. @@ -747,31 +824,27 @@ public virtual async Task> GetSessionLogStreamAsyn /// /// CreateAgentVersionFromCode - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// /// /// /// The unique name that identifies the agent. Name can be used to retrieve/update/delete the agent. /// Must start and end with alphanumeric characters,Can contain hyphens in the middleMust not exceed 63 characters. /// /// The path to the entry point file. + /// Metadata, including metadata itself, hosted agent definition and agent description. /// The contentType to use which has the multipart/form-data boundary. - /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. /// The cancellation token that can be used to cancel the operation. /// , 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 ClientResult CreateAgentVersionFromCode(string agentName, string filePath, string contentType, string foundryFeatures = default, CancellationToken cancellationToken = default) + public virtual ClientResult CreateAgentVersionFromCode(string agentName, string filePath, CreateAgentVersionFromCodeMetadata metadata, string contentType, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(agentName, nameof(agentName)); Argument.AssertNotNullOrEmpty(filePath, nameof(filePath)); - (BinaryData data, string codeZipSha256) = FileHelper.CreateAndReadZipFile(filePath); - using BinaryContent content = BinaryContent.Create(data); + BinaryData data = FileHelper.CreateAndReadZipFileFromDirectory(filePath); + string codeZipSha256 = FileHelper.GetSha256Sum(data); + CreateAgentFromCodeOptions content = new(metadata, data); ClientResult result = CreateAgentVersionFromCode( agentName: agentName, codeZipSha256: codeZipSha256, @@ -784,31 +857,27 @@ public virtual ClientResult CreateAgentVersionFromCode(str /// /// CreateAgentVersionFromCode - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// /// /// /// The unique name that identifies the agent. Name can be used to retrieve/update/delete the agent. /// Must start and end with alphanumeric characters,Can contain hyphens in the middleMust not exceed 63 characters. /// /// The path to the entry point file. + /// Metadata, including metadata itself, hosted agent definition and agent description. /// The contentType to use which has the multipart/form-data boundary. - /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. /// The cancellation token that can be used to cancel the operation. /// , 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> CreateAgentVersionFromCodeAsync(string agentName, string filePath, string contentType, string foundryFeatures = default, CancellationToken cancellationToken = default) + public virtual async Task> CreateAgentVersionFromCodeAsync(string agentName, string filePath, CreateAgentVersionFromCodeMetadata metadata, string contentType, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(agentName, nameof(agentName)); Argument.AssertNotNullOrEmpty(filePath, nameof(filePath)); - (BinaryData data, string codeZipSha256) = FileHelper.CreateAndReadZipFile(filePath); - using BinaryContent content = BinaryContent.Create(data); + BinaryData data = FileHelper.CreateAndReadZipFileFromDirectory(filePath); + string codeZipSha256 = FileHelper.GetSha256Sum(data); + CreateAgentFromCodeOptions content = new(metadata, data); ClientResult result = await CreateAgentVersionFromCodeAsync( agentName: agentName, codeZipSha256: codeZipSha256, @@ -879,56 +948,6 @@ public virtual async Task DownloadAgentCodeAsync(string agentName, s return result; } - /// - /// Download the code zip for a specific version of a code-based hosted agent and unpacks it to the user directory; returns the zip content as a binary data. - /// Returns the previously-uploaded zip (`application/zip`). - /// The SHA-256 digest of the returned bytes matches the `content_hash` on the agent version's `code_configuration`. - /// - /// The name of the agent. - /// The version of the agent whose code zip should be downloaded. - /// The path to save the agent code. - /// The cancellation token that can be used to cancel the operation. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - /// Service returned a non-success status code. - public virtual BinaryData DownloadAgentVersionCode(string agentName, string agentVersion, string path, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(path, nameof(path)); - - BinaryData result = DownloadAgentVersionCode( - agentName: agentName, - agentVersion: agentVersion, - foundryFeatures: default, - cancellationToken: cancellationToken); - FileHelper.SaveAndUnzipData(path, result); - return result; - } - - /// - /// Download the code zip for a specific version of a code-based hosted agent and unpacks it to the user directory; returns the zip content as a binary data. - /// Returns the previously-uploaded zip (`application/zip`). - /// The SHA-256 digest of the returned bytes matches the `content_hash` on the agent version's `code_configuration`. - /// - /// The name of the agent. - /// The version of the agent whose code zip should be downloaded. - /// The path to save the agent code. - /// The cancellation token that can be used to cancel the operation. - /// , or is null. - /// , or is an empty string, and was expected to be non-empty. - /// Service returned a non-success status code. - public virtual async Task DownloadAgentVersionCodeAsync(string agentName, string agentVersion, string path, CancellationToken cancellationToken = default) - { - Argument.AssertNotNullOrEmpty(path, nameof(path)); - - BinaryData result = await DownloadAgentVersionCodeAsync( - agentName: agentName, - agentVersion: agentVersion, - foundryFeatures: default, - cancellationToken: cancellationToken).ConfigureAwait(false); - FileHelper.SaveAndUnzipData(path, result); - return result; - } - public virtual AgentToolboxes GetAgentToolboxes() { return Volatile.Read(ref _cachedAgentsToolboxes) ?? Interlocked.CompareExchange(ref _cachedAgentsToolboxes, new AgentToolboxes(Pipeline, _endpoint, _apiVersion), null) ?? _cachedAgentsToolboxes; diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Custom/AgentSessionFiles.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Custom/AgentSessionFiles.cs index 0dbc34b1a1b5..a7e5699b20ee 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/src/Custom/AgentSessionFiles.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Custom/AgentSessionFiles.cs @@ -26,12 +26,13 @@ public partial class AgentSessionFiles /// The session ID. /// The destination file path within the sandbox, relative to the session home directory. /// The path to the local file to be uploaded. + /// Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user. /// The cancellation token that can be used to cancel the operation. /// , , 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> UploadSessionFileAsync(string agentName, string sessionId, string sessionStoragePath, string localPath, CancellationToken cancellationToken=default) + public virtual async Task> UploadSessionFileAsync(string agentName, string sessionId, string sessionStoragePath, string localPath, string userIsolationKey=default, CancellationToken cancellationToken=default) { Argument.AssertNotNullOrEmpty(agentName, nameof(agentName)); Argument.AssertNotNullOrEmpty(sessionId, nameof(sessionId)); @@ -39,7 +40,7 @@ public virtual async Task> UploadSessionF Argument.AssertNotNullOrEmpty(sessionStoragePath, nameof(sessionStoragePath)); using BinaryContent content = BinaryContent.Create(new BinaryData(File.ReadAllBytes(localPath))); - ClientResult result = await UploadSessionFileAsync(agentName, sessionId, sessionStoragePath, content, default, cancellationToken.ToRequestOptions()).ConfigureAwait(false); + ClientResult result = await UploadSessionFileAsync(agentName, sessionId, sessionStoragePath, content, default, userIsolationKey, cancellationToken.ToRequestOptions()).ConfigureAwait(false); return ClientResult.FromValue((SessionFileWriteResponse)result, result.GetRawResponse()); } @@ -56,12 +57,13 @@ public virtual async Task> UploadSessionF /// The session ID. /// The destination file path within the sandbox, relative to the session home directory. /// The path to the local file to be uploaded. + /// Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user. /// /// , , 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 ClientResult UploadSessionFile(string agentName, string sessionId, string sessionStoragePath, string localPath, CancellationToken cancellationToken = default) + public ClientResult UploadSessionFile(string agentName, string sessionId, string sessionStoragePath, string localPath, string userIsolationKey=default, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(agentName, nameof(agentName)); Argument.AssertNotNullOrEmpty(sessionId, nameof(sessionId)); @@ -69,7 +71,7 @@ public ClientResult UploadSessionFile(string agentName Argument.AssertNotNullOrEmpty(sessionStoragePath, nameof(sessionStoragePath)); using BinaryContent content = BinaryContent.Create(new BinaryData(File.ReadAllBytes(localPath))); - ClientResult result = UploadSessionFile(agentName, sessionId, sessionStoragePath, content, default, cancellationToken.ToRequestOptions()); + ClientResult result = UploadSessionFile(agentName, sessionId, sessionStoragePath, content, default, userIsolationKey, cancellationToken.ToRequestOptions()); return ClientResult.FromValue((SessionFileWriteResponse)result, result.GetRawResponse()); } @@ -85,18 +87,19 @@ public ClientResult UploadSessionFile(string agentName /// The name of the agent. /// The session ID. /// The directory path to list, relative to the session home directory. + /// Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user. /// The cancellation token that can be used to cancel the operation. /// , 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> GetSessionFilesAsync(string agentName, string sessionId, string sessionStoragePath, CancellationToken cancellationToken = default) + public virtual async Task> GetSessionFilesAsync(string agentName, string sessionId, string sessionStoragePath, string userIsolationKey=default, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(agentName, nameof(agentName)); Argument.AssertNotNullOrEmpty(sessionId, nameof(sessionId)); Argument.AssertNotNullOrEmpty(sessionStoragePath, nameof(sessionStoragePath)); - ClientResult result = await GetSessionFilesAsync(agentName, sessionId, sessionStoragePath, default, cancellationToken.ToRequestOptions()).ConfigureAwait(false); + ClientResult result = await GetSessionFilesAsync(agentName, sessionId, sessionStoragePath, default, userIsolationKey, cancellationToken.ToRequestOptions()).ConfigureAwait(false); return ClientResult.FromValue((SessionDirectoryListResponse)result, result.GetRawResponse()); } @@ -112,18 +115,19 @@ public virtual async Task> GetSession /// The name of the agent. /// The session ID. /// The directory path to list, relative to the session home directory. + /// Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user. /// The cancellation token that can be used to cancel the operation. /// , 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 ClientResult GetSessionFiles(string agentName, string sessionId, string sessionStoragePath, CancellationToken cancellationToken = default) + public virtual ClientResult GetSessionFiles(string agentName, string sessionId, string sessionStoragePath, string userIsolationKey=default, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(agentName, nameof(agentName)); Argument.AssertNotNullOrEmpty(sessionId, nameof(sessionId)); Argument.AssertNotNullOrEmpty(sessionStoragePath, nameof(sessionStoragePath)); - ClientResult result = GetSessionFiles(agentName, sessionId, sessionStoragePath, default, cancellationToken.ToRequestOptions()); + ClientResult result = GetSessionFiles(agentName, sessionId, sessionStoragePath, default, userIsolationKey, cancellationToken.ToRequestOptions()); return ClientResult.FromValue((SessionDirectoryListResponse)result, result.GetRawResponse()); } @@ -132,18 +136,19 @@ public virtual ClientResult GetSessionFiles(string /// The session ID. /// The destination file path within the sandbox, relative to the session home directory. /// The path to the local file to save the data to. + /// Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user. /// The cancellation token that can be used to cancel the operation. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. - public virtual async Task DownloadSessionFileAsync(string agentName, string sessionId, string sessionStoragePath, string localPath, CancellationToken cancellationToken = default) + public virtual async Task DownloadSessionFileAsync(string agentName, string sessionId, string sessionStoragePath, string localPath, string userIsolationKey=default, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(agentName, nameof(agentName)); Argument.AssertNotNullOrEmpty(sessionId, nameof(sessionId)); Argument.AssertNotNullOrEmpty(sessionStoragePath, nameof(sessionStoragePath)); Argument.AssertNotNullOrEmpty(localPath, nameof(localPath)); - ClientResult result = await DownloadSessionFileAsync(agentName, sessionId, sessionStoragePath, default, cancellationToken.ToRequestOptions()).ConfigureAwait(false); + ClientResult result = await DownloadSessionFileAsync(agentName, sessionId, sessionStoragePath, default, userIsolationKey, cancellationToken.ToRequestOptions()).ConfigureAwait(false); File.WriteAllBytes(localPath, result.GetRawResponse().Content.ToArray()); return result.GetRawResponse().Content; } @@ -153,18 +158,19 @@ public virtual async Task DownloadSessionFileAsync(string agentName, /// The session ID. /// The destination file path within the sandbox, relative to the session home directory. /// The path to the local file to save the data to. + /// Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user. /// The cancellation token that can be used to cancel the operation. /// , , or is null. /// , , or is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. - public virtual BinaryData DownloadSessionFile(string agentName, string sessionId, string sessionStoragePath, string localPath, CancellationToken cancellationToken = default) + public virtual BinaryData DownloadSessionFile(string agentName, string sessionId, string sessionStoragePath, string localPath, string userIsolationKey=default, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(agentName, nameof(agentName)); Argument.AssertNotNullOrEmpty(sessionId, nameof(sessionId)); Argument.AssertNotNullOrEmpty(sessionStoragePath, nameof(sessionStoragePath)); Argument.AssertNotNullOrEmpty(localPath, nameof(localPath)); - ClientResult result = DownloadSessionFile(agentName, sessionId, sessionStoragePath, default, cancellationToken.ToRequestOptions()); + ClientResult result = DownloadSessionFile(agentName, sessionId, sessionStoragePath, userIsolationKey, default, cancellationToken.ToRequestOptions()); File.WriteAllBytes(localPath, result.GetRawResponse().Content.ToArray()); return result.GetRawResponse().Content; } @@ -177,17 +183,18 @@ public virtual BinaryData DownloadSessionFile(string agentName, string sessionId /// The session ID. /// The file or directory path to delete, relative to the session home directory. /// Whether to recursively delete directory contents. Defaults to false. + /// Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user. /// The cancellation token that can be used to cancel the operation. /// , or is null. /// , or is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. - public virtual ClientResult DeleteSessionFile(string agentName, string sessionId, string path, bool? recursive = default, CancellationToken cancellationToken = default) + public virtual ClientResult DeleteSessionFile(string agentName, string sessionId, string path, bool? recursive = default, string userIsolationKey=default, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(agentName, nameof(agentName)); Argument.AssertNotNullOrEmpty(sessionId, nameof(sessionId)); Argument.AssertNotNullOrEmpty(path, nameof(path)); - return DeleteSessionFile(agentName, sessionId, path, default, recursive, cancellationToken.ToRequestOptions()); + return DeleteSessionFile(agentName, sessionId, path, default, recursive, userIsolationKey, cancellationToken.ToRequestOptions()); } /// @@ -198,16 +205,17 @@ public virtual ClientResult DeleteSessionFile(string agentName, string sessionId /// The session ID. /// The file or directory path to delete, relative to the session home directory. /// Whether to recursively delete directory contents. Defaults to false. + /// Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user. /// The cancellation token that can be used to cancel the operation. /// , or is null. /// , or is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. - public virtual async Task DeleteSessionFileAsync(string agentName, string sessionId, string path, bool? recursive = default, CancellationToken cancellationToken = default) + public virtual async Task DeleteSessionFileAsync(string agentName, string sessionId, string path, bool? recursive = default, string userIsolationKey=default, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(agentName, nameof(agentName)); Argument.AssertNotNullOrEmpty(sessionId, nameof(sessionId)); Argument.AssertNotNullOrEmpty(path, nameof(path)); - return await DeleteSessionFileAsync(agentName, sessionId, path, default, recursive, cancellationToken.ToRequestOptions()).ConfigureAwait(false); + return await DeleteSessionFileAsync(agentName, sessionId, path, default, recursive, userIsolationKey, cancellationToken.ToRequestOptions()).ConfigureAwait(false); } } diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Custom/AzureAISearchTool.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Custom/AzureAISearchTool.cs index 45d0ece3630c..0a853ef39e3e 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/src/Custom/AzureAISearchTool.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Custom/AzureAISearchTool.cs @@ -24,6 +24,7 @@ public AzureAISearchTool(AzureAISearchToolOptions options) : base(ToolType.Azure Argument.AssertNotNull(options, nameof(options)); Options = options; + ToolConfigs = new ChangeTrackingDictionary(); } internal AzureAISearchTool() diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Custom/ProjectsAgentTool.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Custom/ProjectsAgentTool.cs index c320bf42fff8..fe3ecc18f4de 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/src/Custom/ProjectsAgentTool.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Custom/ProjectsAgentTool.cs @@ -38,7 +38,7 @@ public static implicit operator ResponseTool(ProjectsAgentTool agentTool) ModelSerializationExtensions.WireOptions, OpenAIContext.Default); } - public static ProjectsAgentTool AsProjectTool(ResponseTool tool) + public static ProjectsAgentTool AsProjectTool(T tool) { Argument.AssertNotNull(tool, nameof(tool)); // ProjectTool is an alias of ResponseTool in a Azure.AI.Projects namespace, so we can reinterpret ResponseTool. diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Custom/Suppressions.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Custom/Suppressions.cs index cafbc63ac314..f01bddaaf37d 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/src/Custom/Suppressions.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Custom/Suppressions.cs @@ -22,8 +22,8 @@ [assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns Task.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.DeleteAgentVersionAsync(System.String,System.String,System.Threading.CancellationToken)")] [assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns ClientResult.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.DeleteAgentVersion(System.String,System.String,System.Threading.CancellationToken)")] -[assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns Task.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.DeleteAgentAsync(System.String,System.Threading.CancellationToken)")] -[assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns ClientResult.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.DeleteAgent(System.String,System.Threading.CancellationToken)")] +[assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns Task.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.DeleteAgentAsync(System.String,System.Nullable{System.Boolean},System.Threading.CancellationToken)")] +[assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns ClientResult.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.DeleteAgent(System.String,System.Nullable{System.Boolean},System.Threading.CancellationToken)")] // AgentsClient.RestClient [assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns Task.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.CreateAgentAsync(System.ClientModel.BinaryContent,System.String,System.ClientModel.Primitives.RequestOptions)")] @@ -56,50 +56,47 @@ [assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns Task.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.UpdateAgentFromManifestAsync(System.String,System.ClientModel.BinaryContent,System.ClientModel.Primitives.RequestOptions)")] [assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns ClientResult.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.UpdateAgentFromManifest(System.String,System.ClientModel.BinaryContent,System.ClientModel.Primitives.RequestOptions)")] -[assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns Task.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.DeleteAgentAsync(System.String,System.Threading.CancellationToken)")] -[assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns ClientResult.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.DeleteAgent(System.String,System.Threading.CancellationToken)")] - -[assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns Task.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.DeleteAgentVersionAsync(System.String,System.String,System.Threading.CancellationToken)")] -[assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns ClientResult.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.DeleteAgentVersion(System.String,System.String,System.Threading.CancellationToken)")] +[assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns Task.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.DeleteAgentVersionAsync(System.String,System.String,System.Nullable{System.Boolean},System.Threading.CancellationToken)")] +[assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns ClientResult.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.DeleteAgentVersion(System.String,System.String,System.Nullable{System.Boolean},System.Threading.CancellationToken)")] +[assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns Task.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.DeleteAgentAsync(System.String,System.Nullable{System.Boolean},System.ClientModel.Primitives.RequestOptions)")] +[assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns ClientResult.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.DeleteAgent(System.String,System.Nullable{System.Boolean},System.ClientModel.Primitives.RequestOptions)")] [assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns Task.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.DeleteAgentAsync(System.String,System.ClientModel.Primitives.RequestOptions)")] [assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns ClientResult.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.DeleteAgent(System.String,System.ClientModel.Primitives.RequestOptions)")] +[assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns Task.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.DeleteAgentAsync(System.String,System.Threading.CancellationToken)")] +[assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns ClientResult.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.DeleteAgent(System.String,System.Threading.CancellationToken)")] +[assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns Task.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.DeleteAgentVersionAsync(System.String,System.String,System.Nullable{System.Boolean},System.ClientModel.Primitives.RequestOptions)")] +[assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns ClientResult.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.DeleteAgentVersion(System.String,System.String,System.Nullable{System.Boolean},System.ClientModel.Primitives.RequestOptions)")] [assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns Task.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.DeleteAgentVersionAsync(System.String,System.String,System.ClientModel.Primitives.RequestOptions)")] [assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns ClientResult.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.DeleteAgentVersion(System.String,System.String,System.ClientModel.Primitives.RequestOptions)")] [assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns ClientResult.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.PatchAgentObject(System.String,Azure.AI.Projects.Agents.PatchAgentOptions,System.Threading.CancellationToken)")] [assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns Task.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.PatchAgentObjectAsync(System.String,Azure.AI.Projects.Agents.PatchAgentOptions,System.Threading.CancellationToken)")] -[assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns ClientResult.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.CreateSession(System.String,System.ClientModel.BinaryContent,System.String,System.ClientModel.Primitives.RequestOptions)")] -[assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns Task.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.CreateSessionAsync(System.String,System.ClientModel.BinaryContent,System.String,System.ClientModel.Primitives.RequestOptions)")] -[assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns ClientResult.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.CreateSession(System.String,Azure.AI.Projects.Agents.VersionIndicator,System.String,System.Nullable{Azure.AI.Projects.Agents.AgentDefinitionOptInKeys},System.Threading.CancellationToken)")] -[assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns Task>.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.CreateSessionAsync(System.String,Azure.AI.Projects.Agents.VersionIndicator,System.String,System.Nullable{Azure.AI.Projects.Agents.AgentDefinitionOptInKeys},System.Threading.CancellationToken)")] -[assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns ClientResult.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.CreateSession(System.String,Azure.AI.Projects.Agents.VersionIndicator,System.String,System.Threading.CancellationToken)")] -[assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns Task>.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.CreateSessionAsync(System.String,Azure.AI.Projects.Agents.VersionIndicator,System.String,System.Threading.CancellationToken)")] - -[assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns ClientResult.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.GetSession(System.String,System.String,System.String,System.ClientModel.Primitives.RequestOptions)")] -[assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns Task.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.GetSessionAsync(System.String,System.String,System.String,System.ClientModel.Primitives.RequestOptions)")] -[assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns ClientResult.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.GetSession(System.String,System.String,System.Nullable{Azure.AI.Projects.Agents.AgentDefinitionOptInKeys},System.Threading.CancellationToken)")] -[assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns Task>.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.GetSessionAsync(System.String,System.String,System.Nullable{Azure.AI.Projects.Agents.AgentDefinitionOptInKeys},System.Threading.CancellationToken)")] -[assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns ClientResult.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.GetSession(System.String,System.String,System.Threading.CancellationToken)")] -[assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns Task>.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.GetSessionAsync(System.String,System.String,System.Threading.CancellationToken)")] - -[assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns Task.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.DeleteSessionAsync(System.String,System.String,System.String,System.ClientModel.Primitives.RequestOptions)")] -[assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns ClientResult.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.DeleteSession(System.String,System.String,System.String,System.ClientModel.Primitives.RequestOptions)")] -[assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns ClientResult.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.DeleteSession(System.String,System.String,System.Nullable{Azure.AI.Projects.Agents.AgentDefinitionOptInKeys},System.Threading.CancellationToken)")] -[assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns Task.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.DeleteSessionAsync(System.String,System.String,System.Nullable{Azure.AI.Projects.Agents.AgentDefinitionOptInKeys},System.Threading.CancellationToken)")] -[assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns ClientResult.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.DeleteSession(System.String,System.String,System.Threading.CancellationToken)")] -[assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns Task.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.DeleteSessionAsync(System.String,System.String,System.Threading.CancellationToken)")] - -[assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns CollectionResult.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.GetSessions(System.String,System.Nullable{System.Int32},System.Nullable{Azure.AI.Projects.Agents.AgentListOrder},System.String,System.String,System.Threading.CancellationToken)")] -[assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns AsyncCollectionResult.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.GetSessionsAsync(System.String,System.Nullable{System.Int32},System.Nullable{Azure.AI.Projects.Agents.AgentListOrder},System.String,System.String,System.Threading.CancellationToken)")] +[assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns ClientResult.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.CreateSession(System.String,System.ClientModel.BinaryContent,System.String,System.String,System.ClientModel.Primitives.RequestOptions)")] +[assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns Task.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.CreateSessionAsync(System.String,System.ClientModel.BinaryContent,System.String,System.String,System.ClientModel.Primitives.RequestOptions)")] +[assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns ClientResult.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.CreateSession(System.String,Azure.AI.Projects.Agents.VersionIndicator,System.String,System.String,System.Threading.CancellationToken)")] +[assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns Task>.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.CreateSessionAsync(System.String,Azure.AI.Projects.Agents.VersionIndicator,System.String,System.String,System.Threading.CancellationToken)")] + +[assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns ClientResult.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.GetSession(System.String,System.String,System.String,System.String,System.ClientModel.Primitives.RequestOptions)")] +[assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns Task.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.GetSessionAsync(System.String,System.String,System.String,System.String,System.ClientModel.Primitives.RequestOptions)")] +[assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns ClientResult.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.GetSession(System.String,System.String,System.String,System.Threading.CancellationToken)")] +[assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns Task>.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.GetSessionAsync(System.String,System.String,System.String,System.Threading.CancellationToken)")] + +[assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns Task.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.DeleteSessionAsync(System.String,System.String,System.String,System.String,System.ClientModel.Primitives.RequestOptions)")] +[assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns ClientResult.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.DeleteSession(System.String,System.String,System.String,System.String,System.ClientModel.Primitives.RequestOptions)")] +[assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns ClientResult.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.DeleteSession(System.String,System.String,System.String,System.Threading.CancellationToken)")] +[assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns Task.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.DeleteSessionAsync(System.String,System.String,System.String,System.Threading.CancellationToken)")] + +[assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns CollectionResult.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.GetSessions(System.String,System.String,System.Nullable{System.Int32},System.Nullable{Azure.AI.Projects.Agents.AgentListOrder},System.String,System.String,System.Threading.CancellationToken)")] +[assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns AsyncCollectionResult.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.GetSessionsAsync(System.String,System.String,System.Nullable{System.Int32},System.Nullable{Azure.AI.Projects.Agents.AgentListOrder},System.String,System.String,System.Threading.CancellationToken)")] [assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns Task>.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.GetSessionLogStreamAsync(System.String,System.String,System.String,System.Threading.CancellationToken)")] [assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns ClientResult.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.GetSessionLogStream(System.String,System.String,System.String,System.Threading.CancellationToken)")] -[assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns Task>.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.CreateAgentVersionFromCodeAsync(System.String,System.String,System.String,System.String,System.Threading.CancellationToken)")] -[assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns ClientResult.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.CreateAgentVersionFromCode(System.String,System.String,System.String,System.String,System.Threading.CancellationToken)")] +[assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns Task>.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.CreateAgentVersionFromCodeAsync(System.String,System.String,Azure.AI.Projects.Agents.CreateAgentVersionFromCodeMetadata,System.String,System.Threading.CancellationToken)")] +[assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns ClientResult.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.CreateAgentVersionFromCode(System.String,System.String,Azure.AI.Projects.Agents.CreateAgentVersionFromCodeMetadata,System.String,System.Threading.CancellationToken)")] [assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns BinaryData.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.DownloadAgentVersionCode(System.String,System.String,System.String,System.Threading.CancellationToken)")] [assembly: SuppressMessage("Usage", "AZC0015", Justification = "Returns Task.", Scope = "member", Target = "~M:Azure.AI.Projects.Agents.AgentAdministrationClient.DownloadAgentVersionCodeAsync(System.String,System.String,System.String,System.Threading.CancellationToken)")] diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/AgentAdministrationClient.RestClient.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/AgentAdministrationClient.RestClient.cs index 6577c30879d5..f1bc338fc91e 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/AgentAdministrationClient.RestClient.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/AgentAdministrationClient.RestClient.cs @@ -168,12 +168,16 @@ internal PipelineMessage CreateUpdateAgentFromManifestRequest(string agentName, return message; } - internal PipelineMessage CreateDeleteAgentRequest(string agentName, RequestOptions options) + internal PipelineMessage CreateDeleteAgentRequest(string agentName, bool? force, RequestOptions options) { ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/agents/", false); uri.AppendPath(agentName, true); + if (force != null) + { + uri.AppendQuery("force", TypeFormatters.ConvertToString(force), true); + } if (_apiVersion != null) { uri.AppendQuery("api-version", _apiVersion, true); @@ -284,7 +288,7 @@ internal PipelineMessage CreateGetAgentVersionRequest(string agentName, string a return message; } - internal PipelineMessage CreateDeleteAgentVersionRequest(string agentName, string agentVersion, RequestOptions options) + internal PipelineMessage CreateDeleteAgentVersionRequest(string agentName, string agentVersion, bool? force, RequestOptions options) { ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); @@ -292,6 +296,10 @@ internal PipelineMessage CreateDeleteAgentVersionRequest(string agentName, strin uri.AppendPath(agentName, true); uri.AppendPath("/versions/", false); uri.AppendPath(agentVersion, true); + if (force != null) + { + uri.AppendQuery("force", TypeFormatters.ConvertToString(force), true); + } if (_apiVersion != null) { uri.AppendQuery("api-version", _apiVersion, true); @@ -385,37 +393,17 @@ internal PipelineMessage CreateCreateAgentVersionFromCodeRequest(string agentNam return message; } - internal PipelineMessage CreateDownloadAgentVersionCodeRequest(string agentName, string agentVersion, string foundryFeatures, RequestOptions options) + internal PipelineMessage CreateDownloadAgentCodeRequest(string agentName, string foundryFeatures, string agentVersion, RequestOptions options) { ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/agents/", false); uri.AppendPath(agentName, true); - uri.AppendPath("/versions/", false); - uri.AppendPath(agentVersion, true); uri.AppendPath("/code:download", false); - if (_apiVersion != null) + if (agentVersion != null) { - uri.AppendQuery("api-version", _apiVersion, true); + uri.AppendQuery("agent_version", agentVersion, true); } - PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200); - PipelineRequest request = message.Request; - if (foundryFeatures != null) - { - request.Headers.Set("Foundry-Features", foundryFeatures); - } - request.Headers.Set("Accept", "application/zip"); - message.Apply(options); - return message; - } - - internal PipelineMessage CreateDownloadAgentCodeRequest(string agentName, string foundryFeatures, RequestOptions options) - { - ClientUriBuilder uri = new ClientUriBuilder(); - uri.Reset(_endpoint); - uri.AppendPath("/agents/", false); - uri.AppendPath(agentName, true); - uri.AppendPath("/code:download", false); if (_apiVersion != null) { uri.AppendQuery("api-version", _apiVersion, true); @@ -431,7 +419,7 @@ internal PipelineMessage CreateDownloadAgentCodeRequest(string agentName, string return message; } - internal PipelineMessage CreateCreateSessionRequest(string agentName, BinaryContent content, string foundryFeatures, RequestOptions options) + internal PipelineMessage CreateCreateSessionRequest(string agentName, BinaryContent content, string foundryFeatures, string userIsolationKey, RequestOptions options) { ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); @@ -448,6 +436,10 @@ internal PipelineMessage CreateCreateSessionRequest(string agentName, BinaryCont { request.Headers.Set("Foundry-Features", foundryFeatures); } + if (userIsolationKey != null) + { + request.Headers.Set("x-ms-user-isolation-key", userIsolationKey); + } request.Headers.Set("Content-Type", "application/json"); request.Headers.Set("Accept", "application/json"); request.Content = content; @@ -455,7 +447,7 @@ internal PipelineMessage CreateCreateSessionRequest(string agentName, BinaryCont return message; } - internal PipelineMessage CreateGetSessionRequest(string agentName, string sessionId, string foundryFeatures, RequestOptions options) + internal PipelineMessage CreateGetSessionRequest(string agentName, string sessionId, string foundryFeatures, string userIsolationKey, RequestOptions options) { ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); @@ -473,12 +465,16 @@ internal PipelineMessage CreateGetSessionRequest(string agentName, string sessio { request.Headers.Set("Foundry-Features", foundryFeatures); } + if (userIsolationKey != null) + { + request.Headers.Set("x-ms-user-isolation-key", userIsolationKey); + } request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; } - internal PipelineMessage CreateDeleteSessionRequest(string agentName, string sessionId, string foundryFeatures, RequestOptions options) + internal PipelineMessage CreateDeleteSessionRequest(string agentName, string sessionId, string foundryFeatures, string userIsolationKey, RequestOptions options) { ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); @@ -496,11 +492,15 @@ internal PipelineMessage CreateDeleteSessionRequest(string agentName, string ses { request.Headers.Set("Foundry-Features", foundryFeatures); } + if (userIsolationKey != null) + { + request.Headers.Set("x-ms-user-isolation-key", userIsolationKey); + } message.Apply(options); return message; } - internal PipelineMessage CreateGetSessionsRequest(string agentName, string foundryFeatures, int? limit, string order, string after, string before, RequestOptions options) + internal PipelineMessage CreateGetSessionsRequest(string agentName, string foundryFeatures, string userIsolationKey, int? limit, string order, string after, string before, RequestOptions options) { ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); @@ -533,6 +533,10 @@ internal PipelineMessage CreateGetSessionsRequest(string agentName, string found { request.Headers.Set("Foundry-Features", foundryFeatures); } + if (userIsolationKey != null) + { + request.Headers.Set("x-ms-user-isolation-key", userIsolationKey); + } request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/AgentAdministrationClient.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/AgentAdministrationClient.cs index d0a62c2c068b..ff80811c97ed 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/AgentAdministrationClient.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/AgentAdministrationClient.cs @@ -173,9 +173,12 @@ internal virtual async Task CreateAgentVersionFromCodeAsync(string } /// - /// [Protocol Method] Download the code zip for a specific version of a code-based hosted agent. + /// [Protocol Method] Download the code zip for a code-based hosted agent. /// Returns the previously-uploaded zip (`application/zip`). - /// The SHA-256 digest of the returned bytes matches the `content_hash` on the agent version's `code_configuration`. + /// If `agent_version` is supplied, returns that version's code zip; otherwise + /// returns the latest version's code zip. + /// The SHA-256 digest of the returned bytes matches the `content_hash` on the + /// resolved version's `code_configuration`. /// /// /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. @@ -183,21 +186,27 @@ internal virtual async Task CreateAgentVersionFromCodeAsync(string /// /// /// The name of the agent. - /// The version of the agent whose code zip should be downloaded. /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// + /// The version of the agent whose code zip should be downloaded. + /// If omitted, the latest version's code zip is returned. + /// /// The request options, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. - internal virtual ClientResult DownloadAgentVersionCode(string agentName, string agentVersion, string foundryFeatures, RequestOptions options) + internal virtual ClientResult DownloadAgentCode(string agentName, string foundryFeatures, string agentVersion, RequestOptions options) { - using PipelineMessage message = CreateDownloadAgentVersionCodeRequest(agentName, agentVersion, foundryFeatures, options); + using PipelineMessage message = CreateDownloadAgentCodeRequest(agentName, foundryFeatures, agentVersion, options); return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } /// - /// [Protocol Method] Download the code zip for a specific version of a code-based hosted agent. + /// [Protocol Method] Download the code zip for a code-based hosted agent. /// Returns the previously-uploaded zip (`application/zip`). - /// The SHA-256 digest of the returned bytes matches the `content_hash` on the agent version's `code_configuration`. + /// If `agent_version` is supplied, returns that version's code zip; otherwise + /// returns the latest version's code zip. + /// The SHA-256 digest of the returned bytes matches the `content_hash` on the + /// resolved version's `code_configuration`. /// /// /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. @@ -205,118 +214,61 @@ internal virtual ClientResult DownloadAgentVersionCode(string agentName, string /// /// /// The name of the agent. - /// The version of the agent whose code zip should be downloaded. /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// + /// The version of the agent whose code zip should be downloaded. + /// If omitted, the latest version's code zip is returned. + /// /// The request options, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. - internal virtual async Task DownloadAgentVersionCodeAsync(string agentName, string agentVersion, string foundryFeatures, RequestOptions options) + internal virtual async Task DownloadAgentCodeAsync(string agentName, string foundryFeatures, string agentVersion, RequestOptions options) { - using PipelineMessage message = CreateDownloadAgentVersionCodeRequest(agentName, agentVersion, foundryFeatures, options); + using PipelineMessage message = CreateDownloadAgentCodeRequest(agentName, foundryFeatures, agentVersion, options); return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } /// - /// Download the code zip for a specific version of a code-based hosted agent. + /// Download the code zip for a code-based hosted agent. /// Returns the previously-uploaded zip (`application/zip`). - /// The SHA-256 digest of the returned bytes matches the `content_hash` on the agent version's `code_configuration`. + /// If `agent_version` is supplied, returns that version's code zip; otherwise + /// returns the latest version's code zip. + /// The SHA-256 digest of the returned bytes matches the `content_hash` on the + /// resolved version's `code_configuration`. /// /// The name of the agent. - /// The version of the agent whose code zip should be downloaded. /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// + /// The version of the agent whose code zip should be downloaded. + /// If omitted, the latest version's code zip is returned. + /// /// The cancellation token that can be used to cancel the operation. /// Service returned a non-success status code. - internal virtual ClientResult DownloadAgentVersionCode(string agentName, string agentVersion, AgentDefinitionOptInKeys? foundryFeatures = default, CancellationToken cancellationToken = default) + internal virtual ClientResult DownloadAgentCode(string agentName, AgentDefinitionOptInKeys? foundryFeatures = default, string agentVersion = default, CancellationToken cancellationToken = default) { - ClientResult result = DownloadAgentVersionCode(agentName, agentVersion, foundryFeatures?.ToSerialString(), cancellationToken.ToRequestOptions()); + ClientResult result = DownloadAgentCode(agentName, foundryFeatures?.ToSerialString(), agentVersion, cancellationToken.ToRequestOptions()); return ClientResult.FromValue(result.GetRawResponse().Content, result.GetRawResponse()); } /// - /// Download the code zip for a specific version of a code-based hosted agent. + /// Download the code zip for a code-based hosted agent. /// Returns the previously-uploaded zip (`application/zip`). - /// The SHA-256 digest of the returned bytes matches the `content_hash` on the agent version's `code_configuration`. + /// If `agent_version` is supplied, returns that version's code zip; otherwise + /// returns the latest version's code zip. + /// The SHA-256 digest of the returned bytes matches the `content_hash` on the + /// resolved version's `code_configuration`. /// /// The name of the agent. - /// The version of the agent whose code zip should be downloaded. - /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. - /// The cancellation token that can be used to cancel the operation. - /// Service returned a non-success status code. - internal virtual async Task> DownloadAgentVersionCodeAsync(string agentName, string agentVersion, AgentDefinitionOptInKeys? foundryFeatures = default, CancellationToken cancellationToken = default) - { - ClientResult result = await DownloadAgentVersionCodeAsync(agentName, agentVersion, foundryFeatures?.ToSerialString(), cancellationToken.ToRequestOptions()).ConfigureAwait(false); - return ClientResult.FromValue(result.GetRawResponse().Content, result.GetRawResponse()); - } - - /// - /// [Protocol Method] Download the code zip for the latest version of a code-based hosted agent. - /// Returns the previously-uploaded zip (`application/zip`). - /// The SHA-256 digest of the returned bytes matches the `content_hash` on the latest version's `code_configuration`. - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// The name of the agent whose latest-version code zip should be downloaded. - /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. - /// The request options, which can override default behaviors of the client pipeline on a per-call basis. - /// Service returned a non-success status code. - /// The response returned from the service. - internal virtual ClientResult DownloadAgentCode(string agentName, string foundryFeatures, RequestOptions options) - { - using PipelineMessage message = CreateDownloadAgentCodeRequest(agentName, foundryFeatures, options); - return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); - } - - /// - /// [Protocol Method] Download the code zip for the latest version of a code-based hosted agent. - /// Returns the previously-uploaded zip (`application/zip`). - /// The SHA-256 digest of the returned bytes matches the `content_hash` on the latest version's `code_configuration`. - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// The name of the agent whose latest-version code zip should be downloaded. - /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. - /// The request options, which can override default behaviors of the client pipeline on a per-call basis. - /// Service returned a non-success status code. - /// The response returned from the service. - internal virtual async Task DownloadAgentCodeAsync(string agentName, string foundryFeatures, RequestOptions options) - { - using PipelineMessage message = CreateDownloadAgentCodeRequest(agentName, foundryFeatures, options); - return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); - } - - /// - /// Download the code zip for the latest version of a code-based hosted agent. - /// Returns the previously-uploaded zip (`application/zip`). - /// The SHA-256 digest of the returned bytes matches the `content_hash` on the latest version's `code_configuration`. - /// - /// The name of the agent whose latest-version code zip should be downloaded. - /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. - /// The cancellation token that can be used to cancel the operation. - /// Service returned a non-success status code. - internal virtual ClientResult DownloadAgentCode(string agentName, AgentDefinitionOptInKeys? foundryFeatures = default, CancellationToken cancellationToken = default) - { - ClientResult result = DownloadAgentCode(agentName, foundryFeatures?.ToSerialString(), cancellationToken.ToRequestOptions()); - return ClientResult.FromValue(result.GetRawResponse().Content, result.GetRawResponse()); - } - - /// - /// Download the code zip for the latest version of a code-based hosted agent. - /// Returns the previously-uploaded zip (`application/zip`). - /// The SHA-256 digest of the returned bytes matches the `content_hash` on the latest version's `code_configuration`. - /// - /// The name of the agent whose latest-version code zip should be downloaded. /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// + /// The version of the agent whose code zip should be downloaded. + /// If omitted, the latest version's code zip is returned. + /// /// The cancellation token that can be used to cancel the operation. /// Service returned a non-success status code. - internal virtual async Task> DownloadAgentCodeAsync(string agentName, AgentDefinitionOptInKeys? foundryFeatures = default, CancellationToken cancellationToken = default) + internal virtual async Task> DownloadAgentCodeAsync(string agentName, AgentDefinitionOptInKeys? foundryFeatures = default, string agentVersion = default, CancellationToken cancellationToken = default) { - ClientResult result = await DownloadAgentCodeAsync(agentName, foundryFeatures?.ToSerialString(), cancellationToken.ToRequestOptions()).ConfigureAwait(false); + ClientResult result = await DownloadAgentCodeAsync(agentName, foundryFeatures?.ToSerialString(), agentVersion, cancellationToken.ToRequestOptions()).ConfigureAwait(false); return ClientResult.FromValue(result.GetRawResponse().Content, result.GetRawResponse()); } @@ -333,12 +285,13 @@ internal virtual async Task> DownloadAgentCodeAsync(str /// The name of the agent to create a session for. /// The content to send as the body of the request. /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user. /// The request options, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. - internal virtual ClientResult CreateSession(string agentName, BinaryContent content, string foundryFeatures = default, RequestOptions options = null) + internal virtual ClientResult CreateSession(string agentName, BinaryContent content, string foundryFeatures = default, string userIsolationKey = default, RequestOptions options = null) { - using PipelineMessage message = CreateCreateSessionRequest(agentName, content, foundryFeatures, options); + using PipelineMessage message = CreateCreateSessionRequest(agentName, content, foundryFeatures, userIsolationKey, options); return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } @@ -355,12 +308,13 @@ internal virtual ClientResult CreateSession(string agentName, BinaryContent cont /// The name of the agent to create a session for. /// The content to send as the body of the request. /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user. /// The request options, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. - internal virtual async Task CreateSessionAsync(string agentName, BinaryContent content, string foundryFeatures = default, RequestOptions options = null) + internal virtual async Task CreateSessionAsync(string agentName, BinaryContent content, string foundryFeatures = default, string userIsolationKey = default, RequestOptions options = null) { - using PipelineMessage message = CreateCreateSessionRequest(agentName, content, foundryFeatures, options); + using PipelineMessage message = CreateCreateSessionRequest(agentName, content, foundryFeatures, userIsolationKey, options); return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } @@ -375,12 +329,13 @@ internal virtual async Task CreateSessionAsync(string agentName, B /// The name of the agent. /// The session identifier. /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user. /// The request options, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. - internal virtual ClientResult GetSession(string agentName, string sessionId, string foundryFeatures, RequestOptions options) + internal virtual ClientResult GetSession(string agentName, string sessionId, string foundryFeatures, string userIsolationKey, RequestOptions options) { - using PipelineMessage message = CreateGetSessionRequest(agentName, sessionId, foundryFeatures, options); + using PipelineMessage message = CreateGetSessionRequest(agentName, sessionId, foundryFeatures, userIsolationKey, options); return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } @@ -395,12 +350,13 @@ internal virtual ClientResult GetSession(string agentName, string sessionId, str /// The name of the agent. /// The session identifier. /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user. /// The request options, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. - internal virtual async Task GetSessionAsync(string agentName, string sessionId, string foundryFeatures, RequestOptions options) + internal virtual async Task GetSessionAsync(string agentName, string sessionId, string foundryFeatures, string userIsolationKey, RequestOptions options) { - using PipelineMessage message = CreateGetSessionRequest(agentName, sessionId, foundryFeatures, options); + using PipelineMessage message = CreateGetSessionRequest(agentName, sessionId, foundryFeatures, userIsolationKey, options); return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } @@ -416,12 +372,13 @@ internal virtual async Task GetSessionAsync(string agentName, stri /// The name of the agent. /// The session identifier. /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user. /// The request options, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. - internal virtual ClientResult DeleteSession(string agentName, string sessionId, string foundryFeatures, RequestOptions options) + internal virtual ClientResult DeleteSession(string agentName, string sessionId, string foundryFeatures, string userIsolationKey, RequestOptions options) { - using PipelineMessage message = CreateDeleteSessionRequest(agentName, sessionId, foundryFeatures, options); + using PipelineMessage message = CreateDeleteSessionRequest(agentName, sessionId, foundryFeatures, userIsolationKey, options); return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } @@ -437,12 +394,13 @@ internal virtual ClientResult DeleteSession(string agentName, string sessionId, /// The name of the agent. /// The session identifier. /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user. /// The request options, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. - internal virtual async Task DeleteSessionAsync(string agentName, string sessionId, string foundryFeatures, RequestOptions options) + internal virtual async Task DeleteSessionAsync(string agentName, string sessionId, string foundryFeatures, string userIsolationKey, RequestOptions options) { - using PipelineMessage message = CreateDeleteSessionRequest(agentName, sessionId, foundryFeatures, options); + using PipelineMessage message = CreateDeleteSessionRequest(agentName, sessionId, foundryFeatures, userIsolationKey, options); return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/AgentSessionFiles.RestClient.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/AgentSessionFiles.RestClient.cs index f02f1ee3165f..4c00d3a98bbf 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/AgentSessionFiles.RestClient.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/AgentSessionFiles.RestClient.cs @@ -20,7 +20,7 @@ public partial class AgentSessionFiles private static PipelineMessageClassifier PipelineMessageClassifier204 => _pipelineMessageClassifier204 ??= PipelineMessageClassifier.Create(stackalloc ushort[] { 204 }); - internal PipelineMessage CreateUploadSessionFileRequest(string agentName, string agentSessionId, string path, BinaryContent content, string foundryFeatures, RequestOptions options) + internal PipelineMessage CreateUploadSessionFileRequest(string agentName, string agentSessionId, string path, BinaryContent content, string foundryFeatures, string userIsolationKey, RequestOptions options) { ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); @@ -41,13 +41,17 @@ internal PipelineMessage CreateUploadSessionFileRequest(string agentName, string request.Headers.Set("Foundry-Features", foundryFeatures); } request.Headers.Set("Content-Type", "application/octet-stream"); + if (userIsolationKey != null) + { + request.Headers.Set("x-ms-user-isolation-key", userIsolationKey); + } request.Headers.Set("Accept", "application/json"); request.Content = content; message.Apply(options); return message; } - internal PipelineMessage CreateDownloadSessionFileRequest(string agentName, string agentSessionId, string path, string foundryFeatures, RequestOptions options) + internal PipelineMessage CreateDownloadSessionFileRequest(string agentName, string agentSessionId, string path, string foundryFeatures, string userIsolationKey, RequestOptions options) { ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); @@ -67,12 +71,16 @@ internal PipelineMessage CreateDownloadSessionFileRequest(string agentName, stri { request.Headers.Set("Foundry-Features", foundryFeatures); } + if (userIsolationKey != null) + { + request.Headers.Set("x-ms-user-isolation-key", userIsolationKey); + } request.Headers.Set("Accept", "application/octet-stream"); message.Apply(options); return message; } - internal PipelineMessage CreateGetSessionFilesRequest(string agentName, string agentSessionId, string path, string foundryFeatures, RequestOptions options) + internal PipelineMessage CreateGetSessionFilesRequest(string agentName, string agentSessionId, string path, string foundryFeatures, string userIsolationKey, RequestOptions options) { ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); @@ -92,12 +100,16 @@ internal PipelineMessage CreateGetSessionFilesRequest(string agentName, string a { request.Headers.Set("Foundry-Features", foundryFeatures); } + if (userIsolationKey != null) + { + request.Headers.Set("x-ms-user-isolation-key", userIsolationKey); + } request.Headers.Set("Accept", "application/json"); message.Apply(options); return message; } - internal PipelineMessage CreateDeleteSessionFileRequest(string agentName, string agentSessionId, string path, string foundryFeatures, bool? recursive, RequestOptions options) + internal PipelineMessage CreateDeleteSessionFileRequest(string agentName, string agentSessionId, string path, string foundryFeatures, bool? recursive, string userIsolationKey, RequestOptions options) { ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); @@ -121,6 +133,10 @@ internal PipelineMessage CreateDeleteSessionFileRequest(string agentName, string { request.Headers.Set("Foundry-Features", foundryFeatures); } + if (userIsolationKey != null) + { + request.Headers.Set("x-ms-user-isolation-key", userIsolationKey); + } message.Apply(options); return message; } diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/AgentSessionFiles.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/AgentSessionFiles.cs index a829a88e11ab..600968ca0f41 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/AgentSessionFiles.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/AgentSessionFiles.cs @@ -56,12 +56,13 @@ internal AgentSessionFiles(ClientPipeline pipeline, Uri endpoint, string apiVers /// The destination file path within the sandbox, relative to the session home directory. /// The content to send as the body of the request. /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user. /// The request options, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. - internal virtual ClientResult UploadSessionFile(string agentName, string agentSessionId, string path, BinaryContent content, string foundryFeatures = default, RequestOptions options = null) + internal virtual ClientResult UploadSessionFile(string agentName, string agentSessionId, string path, BinaryContent content, string foundryFeatures = default, string userIsolationKey = default, RequestOptions options = null) { - using PipelineMessage message = CreateUploadSessionFileRequest(agentName, agentSessionId, path, content, foundryFeatures, options); + using PipelineMessage message = CreateUploadSessionFileRequest(agentName, agentSessionId, path, content, foundryFeatures, userIsolationKey, options); return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } @@ -79,12 +80,13 @@ internal virtual ClientResult UploadSessionFile(string agentName, string agentSe /// The destination file path within the sandbox, relative to the session home directory. /// The content to send as the body of the request. /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user. /// The request options, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. - internal virtual async Task UploadSessionFileAsync(string agentName, string agentSessionId, string path, BinaryContent content, string foundryFeatures = default, RequestOptions options = null) + internal virtual async Task UploadSessionFileAsync(string agentName, string agentSessionId, string path, BinaryContent content, string foundryFeatures = default, string userIsolationKey = default, RequestOptions options = null) { - using PipelineMessage message = CreateUploadSessionFileRequest(agentName, agentSessionId, path, content, foundryFeatures, options); + using PipelineMessage message = CreateUploadSessionFileRequest(agentName, agentSessionId, path, content, foundryFeatures, userIsolationKey, options); return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } @@ -97,11 +99,12 @@ internal virtual async Task UploadSessionFileAsync(string agentNam /// The destination file path within the sandbox, relative to the session home directory. /// /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user. /// The cancellation token that can be used to cancel the operation. /// Service returned a non-success status code. - internal virtual ClientResult UploadSessionFile(string agentName, string agentSessionId, string path, BinaryData content, AgentDefinitionOptInKeys? foundryFeatures = default, CancellationToken cancellationToken = default) + internal virtual ClientResult UploadSessionFile(string agentName, string agentSessionId, string path, BinaryData content, AgentDefinitionOptInKeys? foundryFeatures = default, string userIsolationKey = default, CancellationToken cancellationToken = default) { - ClientResult result = UploadSessionFile(agentName, agentSessionId, path, BinaryContent.Create(content), foundryFeatures?.ToSerialString(), cancellationToken.ToRequestOptions()); + ClientResult result = UploadSessionFile(agentName, agentSessionId, path, BinaryContent.Create(content), foundryFeatures?.ToSerialString(), userIsolationKey, cancellationToken.ToRequestOptions()); return ClientResult.FromValue((SessionFileWriteResponse)result, result.GetRawResponse()); } @@ -114,11 +117,12 @@ internal virtual ClientResult UploadSessionFile(string /// The destination file path within the sandbox, relative to the session home directory. /// /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user. /// The cancellation token that can be used to cancel the operation. /// Service returned a non-success status code. - internal virtual async Task> UploadSessionFileAsync(string agentName, string agentSessionId, string path, BinaryData content, AgentDefinitionOptInKeys? foundryFeatures = default, CancellationToken cancellationToken = default) + internal virtual async Task> UploadSessionFileAsync(string agentName, string agentSessionId, string path, BinaryData content, AgentDefinitionOptInKeys? foundryFeatures = default, string userIsolationKey = default, CancellationToken cancellationToken = default) { - ClientResult result = await UploadSessionFileAsync(agentName, agentSessionId, path, BinaryContent.Create(content), foundryFeatures?.ToSerialString(), cancellationToken.ToRequestOptions()).ConfigureAwait(false); + ClientResult result = await UploadSessionFileAsync(agentName, agentSessionId, path, BinaryContent.Create(content), foundryFeatures?.ToSerialString(), userIsolationKey, cancellationToken.ToRequestOptions()).ConfigureAwait(false); return ClientResult.FromValue((SessionFileWriteResponse)result, result.GetRawResponse()); } @@ -134,12 +138,13 @@ internal virtual async Task> UploadSessio /// The session ID. /// The file path to download from the sandbox, relative to the session home directory. /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user. /// The request options, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. - internal virtual ClientResult DownloadSessionFile(string agentName, string agentSessionId, string path, string foundryFeatures, RequestOptions options) + internal virtual ClientResult DownloadSessionFile(string agentName, string agentSessionId, string path, string foundryFeatures, string userIsolationKey, RequestOptions options) { - using PipelineMessage message = CreateDownloadSessionFileRequest(agentName, agentSessionId, path, foundryFeatures, options); + using PipelineMessage message = CreateDownloadSessionFileRequest(agentName, agentSessionId, path, foundryFeatures, userIsolationKey, options); return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } @@ -155,12 +160,13 @@ internal virtual ClientResult DownloadSessionFile(string agentName, string agent /// The session ID. /// The file path to download from the sandbox, relative to the session home directory. /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user. /// The request options, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. - internal virtual async Task DownloadSessionFileAsync(string agentName, string agentSessionId, string path, string foundryFeatures, RequestOptions options) + internal virtual async Task DownloadSessionFileAsync(string agentName, string agentSessionId, string path, string foundryFeatures, string userIsolationKey, RequestOptions options) { - using PipelineMessage message = CreateDownloadSessionFileRequest(agentName, agentSessionId, path, foundryFeatures, options); + using PipelineMessage message = CreateDownloadSessionFileRequest(agentName, agentSessionId, path, foundryFeatures, userIsolationKey, options); return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } @@ -169,11 +175,12 @@ internal virtual async Task DownloadSessionFileAsync(string agentN /// The session ID. /// The file path to download from the sandbox, relative to the session home directory. /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user. /// The cancellation token that can be used to cancel the operation. /// Service returned a non-success status code. - internal virtual ClientResult DownloadSessionFile(string agentName, string agentSessionId, string path, AgentDefinitionOptInKeys? foundryFeatures = default, CancellationToken cancellationToken = default) + internal virtual ClientResult DownloadSessionFile(string agentName, string agentSessionId, string path, AgentDefinitionOptInKeys? foundryFeatures = default, string userIsolationKey = default, CancellationToken cancellationToken = default) { - ClientResult result = DownloadSessionFile(agentName, agentSessionId, path, foundryFeatures?.ToSerialString(), cancellationToken.ToRequestOptions()); + ClientResult result = DownloadSessionFile(agentName, agentSessionId, path, foundryFeatures?.ToSerialString(), userIsolationKey, cancellationToken.ToRequestOptions()); return ClientResult.FromValue(result.GetRawResponse().Content, result.GetRawResponse()); } @@ -182,11 +189,12 @@ internal virtual ClientResult DownloadSessionFile(string agentName, /// The session ID. /// The file path to download from the sandbox, relative to the session home directory. /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user. /// The cancellation token that can be used to cancel the operation. /// Service returned a non-success status code. - internal virtual async Task> DownloadSessionFileAsync(string agentName, string agentSessionId, string path, AgentDefinitionOptInKeys? foundryFeatures = default, CancellationToken cancellationToken = default) + internal virtual async Task> DownloadSessionFileAsync(string agentName, string agentSessionId, string path, AgentDefinitionOptInKeys? foundryFeatures = default, string userIsolationKey = default, CancellationToken cancellationToken = default) { - ClientResult result = await DownloadSessionFileAsync(agentName, agentSessionId, path, foundryFeatures?.ToSerialString(), cancellationToken.ToRequestOptions()).ConfigureAwait(false); + ClientResult result = await DownloadSessionFileAsync(agentName, agentSessionId, path, foundryFeatures?.ToSerialString(), userIsolationKey, cancellationToken.ToRequestOptions()).ConfigureAwait(false); return ClientResult.FromValue(result.GetRawResponse().Content, result.GetRawResponse()); } @@ -203,12 +211,13 @@ internal virtual async Task> DownloadSessionFileAsync(s /// The session ID. /// The directory path to list, relative to the session home directory. /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user. /// The request options, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. - internal virtual ClientResult GetSessionFiles(string agentName, string agentSessionId, string path, string foundryFeatures, RequestOptions options) + internal virtual ClientResult GetSessionFiles(string agentName, string agentSessionId, string path, string foundryFeatures, string userIsolationKey, RequestOptions options) { - using PipelineMessage message = CreateGetSessionFilesRequest(agentName, agentSessionId, path, foundryFeatures, options); + using PipelineMessage message = CreateGetSessionFilesRequest(agentName, agentSessionId, path, foundryFeatures, userIsolationKey, options); return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } @@ -225,12 +234,13 @@ internal virtual ClientResult GetSessionFiles(string agentName, string agentSess /// The session ID. /// The directory path to list, relative to the session home directory. /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user. /// The request options, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. - internal virtual async Task GetSessionFilesAsync(string agentName, string agentSessionId, string path, string foundryFeatures, RequestOptions options) + internal virtual async Task GetSessionFilesAsync(string agentName, string agentSessionId, string path, string foundryFeatures, string userIsolationKey, RequestOptions options) { - using PipelineMessage message = CreateGetSessionFilesRequest(agentName, agentSessionId, path, foundryFeatures, options); + using PipelineMessage message = CreateGetSessionFilesRequest(agentName, agentSessionId, path, foundryFeatures, userIsolationKey, options); return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } @@ -242,11 +252,12 @@ internal virtual async Task GetSessionFilesAsync(string agentName, /// The session ID. /// The directory path to list, relative to the session home directory. /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user. /// The cancellation token that can be used to cancel the operation. /// Service returned a non-success status code. - internal virtual ClientResult GetSessionFiles(string agentName, string agentSessionId, string path, AgentDefinitionOptInKeys? foundryFeatures = default, CancellationToken cancellationToken = default) + internal virtual ClientResult GetSessionFiles(string agentName, string agentSessionId, string path, AgentDefinitionOptInKeys? foundryFeatures = default, string userIsolationKey = default, CancellationToken cancellationToken = default) { - ClientResult result = GetSessionFiles(agentName, agentSessionId, path, foundryFeatures?.ToSerialString(), cancellationToken.ToRequestOptions()); + ClientResult result = GetSessionFiles(agentName, agentSessionId, path, foundryFeatures?.ToSerialString(), userIsolationKey, cancellationToken.ToRequestOptions()); return ClientResult.FromValue((SessionDirectoryListResponse)result, result.GetRawResponse()); } @@ -258,11 +269,12 @@ internal virtual ClientResult GetSessionFiles(stri /// The session ID. /// The directory path to list, relative to the session home directory. /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user. /// The cancellation token that can be used to cancel the operation. /// Service returned a non-success status code. - internal virtual async Task> GetSessionFilesAsync(string agentName, string agentSessionId, string path, AgentDefinitionOptInKeys? foundryFeatures = default, CancellationToken cancellationToken = default) + internal virtual async Task> GetSessionFilesAsync(string agentName, string agentSessionId, string path, AgentDefinitionOptInKeys? foundryFeatures = default, string userIsolationKey = default, CancellationToken cancellationToken = default) { - ClientResult result = await GetSessionFilesAsync(agentName, agentSessionId, path, foundryFeatures?.ToSerialString(), cancellationToken.ToRequestOptions()).ConfigureAwait(false); + ClientResult result = await GetSessionFilesAsync(agentName, agentSessionId, path, foundryFeatures?.ToSerialString(), userIsolationKey, cancellationToken.ToRequestOptions()).ConfigureAwait(false); return ClientResult.FromValue((SessionDirectoryListResponse)result, result.GetRawResponse()); } @@ -280,12 +292,13 @@ internal virtual async Task> GetSessi /// The file or directory path to delete, relative to the session home directory. /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. /// Whether to recursively delete directory contents. Defaults to false. + /// Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user. /// The request options, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. - internal virtual ClientResult DeleteSessionFile(string agentName, string agentSessionId, string path, string foundryFeatures, bool? recursive, RequestOptions options) + internal virtual ClientResult DeleteSessionFile(string agentName, string agentSessionId, string path, string foundryFeatures, bool? recursive, string userIsolationKey, RequestOptions options) { - using PipelineMessage message = CreateDeleteSessionFileRequest(agentName, agentSessionId, path, foundryFeatures, recursive, options); + using PipelineMessage message = CreateDeleteSessionFileRequest(agentName, agentSessionId, path, foundryFeatures, recursive, userIsolationKey, options); return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); } @@ -303,12 +316,13 @@ internal virtual ClientResult DeleteSessionFile(string agentName, string agentSe /// The file or directory path to delete, relative to the session home directory. /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. /// Whether to recursively delete directory contents. Defaults to false. + /// Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user. /// The request options, which can override default behaviors of the client pipeline on a per-call basis. /// Service returned a non-success status code. /// The response returned from the service. - internal virtual async Task DeleteSessionFileAsync(string agentName, string agentSessionId, string path, string foundryFeatures, bool? recursive, RequestOptions options) + internal virtual async Task DeleteSessionFileAsync(string agentName, string agentSessionId, string path, string foundryFeatures, bool? recursive, string userIsolationKey, RequestOptions options) { - using PipelineMessage message = CreateDeleteSessionFileRequest(agentName, agentSessionId, path, foundryFeatures, recursive, options); + using PipelineMessage message = CreateDeleteSessionFileRequest(agentName, agentSessionId, path, foundryFeatures, recursive, userIsolationKey, options); return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } @@ -321,11 +335,12 @@ internal virtual async Task DeleteSessionFileAsync(string agentNam /// The file or directory path to delete, relative to the session home directory. /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. /// Whether to recursively delete directory contents. Defaults to false. + /// Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user. /// The cancellation token that can be used to cancel the operation. /// Service returned a non-success status code. - internal virtual ClientResult DeleteSessionFile(string agentName, string agentSessionId, string path, AgentDefinitionOptInKeys? foundryFeatures = default, bool? recursive = default, CancellationToken cancellationToken = default) + internal virtual ClientResult DeleteSessionFile(string agentName, string agentSessionId, string path, AgentDefinitionOptInKeys? foundryFeatures = default, bool? recursive = default, string userIsolationKey = default, CancellationToken cancellationToken = default) { - return DeleteSessionFile(agentName, agentSessionId, path, foundryFeatures?.ToSerialString(), recursive, cancellationToken.ToRequestOptions()); + return DeleteSessionFile(agentName, agentSessionId, path, foundryFeatures?.ToSerialString(), recursive, userIsolationKey, cancellationToken.ToRequestOptions()); } /// @@ -337,11 +352,12 @@ internal virtual ClientResult DeleteSessionFile(string agentName, string agentSe /// The file or directory path to delete, relative to the session home directory. /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. /// Whether to recursively delete directory contents. Defaults to false. + /// Opaque per-user isolation key used to scope endpoint-scoped data (responses, conversations, sessions) to a specific end user. /// The cancellation token that can be used to cancel the operation. /// Service returned a non-success status code. - internal virtual async Task DeleteSessionFileAsync(string agentName, string agentSessionId, string path, AgentDefinitionOptInKeys? foundryFeatures = default, bool? recursive = default, CancellationToken cancellationToken = default) + internal virtual async Task DeleteSessionFileAsync(string agentName, string agentSessionId, string path, AgentDefinitionOptInKeys? foundryFeatures = default, bool? recursive = default, string userIsolationKey = default, CancellationToken cancellationToken = default) { - return await DeleteSessionFileAsync(agentName, agentSessionId, path, foundryFeatures?.ToSerialString(), recursive, cancellationToken.ToRequestOptions()).ConfigureAwait(false); + return await DeleteSessionFileAsync(agentName, agentSessionId, path, foundryFeatures?.ToSerialString(), recursive, userIsolationKey, cancellationToken.ToRequestOptions()).ConfigureAwait(false); } } } diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/A2APreviewTool.Serialization.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/A2APreviewTool.Serialization.cs index 2fa5b6b74431..abcc3f2f8630 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/A2APreviewTool.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/A2APreviewTool.Serialization.cs @@ -82,6 +82,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsCollectionDefined(ToolConfigs)) + { + writer.WritePropertyName("tool_configs"u8); + writer.WriteStartObject(); + foreach (var item in ToolConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } if (Optional.IsDefined(BaseUri)) { writer.WritePropertyName("base_url"u8); @@ -128,6 +139,7 @@ internal static A2APreviewTool DeserializeA2APreviewTool(JsonElement element, Mo IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); string name = default; string description = default; + IDictionary toolConfigs = default; Uri baseUri = default; string agentCardPath = default; string projectConnectionId = default; @@ -148,6 +160,20 @@ internal static A2APreviewTool DeserializeA2APreviewTool(JsonElement element, Mo description = prop.Value.GetString(); continue; } + if (prop.NameEquals("tool_configs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, ToolConfig.DeserializeToolConfig(prop0.Value, options)); + } + toolConfigs = dictionary; + continue; + } if (prop.NameEquals("base_url"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -177,6 +203,7 @@ internal static A2APreviewTool DeserializeA2APreviewTool(JsonElement element, Mo additionalBinaryDataProperties, name, description, + toolConfigs ?? new ChangeTrackingDictionary(), baseUri, agentCardPath, projectConnectionId); diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/A2APreviewTool.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/A2APreviewTool.cs index e83342413ea7..502cc71830fa 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/A2APreviewTool.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/A2APreviewTool.cs @@ -14,6 +14,7 @@ public partial class A2APreviewTool : ProjectsAgentTool /// Initializes a new instance of . public A2APreviewTool() : base(ToolType.A2aPreview) { + ToolConfigs = new ChangeTrackingDictionary(); } /// Initializes a new instance of . @@ -21,6 +22,11 @@ public A2APreviewTool() : base(ToolType.A2aPreview) /// Keeps track of any properties unknown to the library. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// /// Base URL of the agent. /// /// The path to the agent card relative to the `base_url`. @@ -30,10 +36,11 @@ public A2APreviewTool() : base(ToolType.A2aPreview) /// The connection ID in the project for the A2A server. /// The connection stores authentication and other connection details needed to connect to the A2A server. /// - internal A2APreviewTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, Uri baseUri, string agentCardPath, string projectConnectionId) : base(@type, additionalBinaryDataProperties) + internal A2APreviewTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, IDictionary toolConfigs, Uri baseUri, string agentCardPath, string projectConnectionId) : base(@type, additionalBinaryDataProperties) { Name = name; Description = description; + ToolConfigs = toolConfigs; BaseUri = baseUri; AgentCardPath = agentCardPath; ProjectConnectionId = projectConnectionId; @@ -45,6 +52,13 @@ internal A2APreviewTool(ToolType @type, IDictionary addition /// Optional user-defined description for this tool or configuration. public string Description { get; set; } + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + public IDictionary ToolConfigs { get; } + /// /// The connection ID in the project for the A2A server. /// The connection stores authentication and other connection details needed to connect to the A2A server. diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/AgentDefinitionOptInKeys.Serialization.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/AgentDefinitionOptInKeys.Serialization.cs index 24f3d6404cf9..98bea95f9ce1 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/AgentDefinitionOptInKeys.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/AgentDefinitionOptInKeys.Serialization.cs @@ -13,9 +13,9 @@ internal static partial class AgentDefinitionOptInKeysExtensions { AgentDefinitionOptInKeys.HostedAgentsV1Preview => "HostedAgents=V1Preview", AgentDefinitionOptInKeys.WorkflowAgentsV1Preview => "WorkflowAgents=V1Preview", - AgentDefinitionOptInKeys.ContainerAgentsV1Preview => "ContainerAgents=V1Preview", AgentDefinitionOptInKeys.AgentEndpointV1Preview => "AgentEndpoints=V1Preview", AgentDefinitionOptInKeys.CodeAgentsV1Preview => "CodeAgents=V1Preview", + AgentDefinitionOptInKeys.ExternalAgentsV1Preview => "ExternalAgents=V1Preview", _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown AgentDefinitionOptInKeys value.") }; @@ -30,10 +30,6 @@ public static AgentDefinitionOptInKeys ToAgentDefinitionOptInKeys(this string va { return AgentDefinitionOptInKeys.WorkflowAgentsV1Preview; } - if (StringComparer.OrdinalIgnoreCase.Equals(value, "ContainerAgents=V1Preview")) - { - return AgentDefinitionOptInKeys.ContainerAgentsV1Preview; - } if (StringComparer.OrdinalIgnoreCase.Equals(value, "AgentEndpoints=V1Preview")) { return AgentDefinitionOptInKeys.AgentEndpointV1Preview; @@ -42,6 +38,10 @@ public static AgentDefinitionOptInKeys ToAgentDefinitionOptInKeys(this string va { return AgentDefinitionOptInKeys.CodeAgentsV1Preview; } + if (StringComparer.OrdinalIgnoreCase.Equals(value, "ExternalAgents=V1Preview")) + { + return AgentDefinitionOptInKeys.ExternalAgentsV1Preview; + } throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown AgentDefinitionOptInKeys value."); } } diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/AgentDefinitionOptInKeys.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/AgentDefinitionOptInKeys.cs index 5f2da718aa2a..77d36263f658 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/AgentDefinitionOptInKeys.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/AgentDefinitionOptInKeys.cs @@ -11,11 +11,11 @@ public enum AgentDefinitionOptInKeys HostedAgentsV1Preview, /// WorkflowAgentsV1Preview. WorkflowAgentsV1Preview, - /// ContainerAgentsV1Preview. - ContainerAgentsV1Preview, /// AgentEndpointV1Preview. AgentEndpointV1Preview, /// CodeAgentsV1Preview. - CodeAgentsV1Preview + CodeAgentsV1Preview, + /// ExternalAgentsV1Preview. + ExternalAgentsV1Preview } } diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/AzureAIProjectsAgentsContext.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/AzureAIProjectsAgentsContext.cs index 5908696dddcc..b93745b604ec 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/AzureAIProjectsAgentsContext.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/AzureAIProjectsAgentsContext.cs @@ -53,6 +53,8 @@ namespace Azure.AI.Projects.Agents [ModelReaderWriterBuildable(typeof(ContainerNetworkPolicyParam))] [ModelReaderWriterBuildable(typeof(ContainerSkill))] [ModelReaderWriterBuildable(typeof(ContentFilterConfiguration))] + [ModelReaderWriterBuildable(typeof(CreateAgentFromCodeOptions))] + [ModelReaderWriterBuildable(typeof(CreateAgentVersionFromCodeMetadata))] [ModelReaderWriterBuildable(typeof(CreateAgentVersionFromManifestRequest))] [ModelReaderWriterBuildable(typeof(CreateSessionRequest))] [ModelReaderWriterBuildable(typeof(CreateSkillRequest))] @@ -64,6 +66,8 @@ namespace Azure.AI.Projects.Agents [ModelReaderWriterBuildable(typeof(DeleteSkillResponse))] [ModelReaderWriterBuildable(typeof(EmptyModelParam))] [ModelReaderWriterBuildable(typeof(EntraAuthorizationScheme))] + [ModelReaderWriterBuildable(typeof(EntraIsolationKeySource))] + [ModelReaderWriterBuildable(typeof(ExternalAgentDefinition))] [ModelReaderWriterBuildable(typeof(FabricDataAgentToolOptions))] [ModelReaderWriterBuildable(typeof(FabricIQPreviewTool))] [ModelReaderWriterBuildable(typeof(FixedRatioVersionSelectionRule))] @@ -71,6 +75,7 @@ namespace Azure.AI.Projects.Agents [ModelReaderWriterBuildable(typeof(FunctionShellToolParamEnvironment))] [ModelReaderWriterBuildable(typeof(FunctionShellToolParamEnvironmentContainerReferenceParam))] [ModelReaderWriterBuildable(typeof(FunctionShellToolParamEnvironmentLocalEnvironmentParam))] + [ModelReaderWriterBuildable(typeof(HeaderIsolationKeySource))] [ModelReaderWriterBuildable(typeof(HeaderTelemetryEndpointAuth))] #pragma warning disable AAIP001 // global::Azure.AI.Projects.Agents.HostedAgentDefinition is experimental and may change in future versions. [ModelReaderWriterBuildable(typeof(HostedAgentDefinition))] @@ -104,6 +109,7 @@ namespace Azure.AI.Projects.Agents [ModelReaderWriterBuildable(typeof(InternalUpdateAgentRequest))] [ModelReaderWriterBuildable(typeof(InternalWebSearchPreviewTool))] [ModelReaderWriterBuildable(typeof(InternalWebSearchTool))] + [ModelReaderWriterBuildable(typeof(IsolationKeySource))] [ModelReaderWriterBuildable(typeof(LocalSkillParam))] [ModelReaderWriterBuildable(typeof(ManagedAgentIdentityBlueprintReference))] [ModelReaderWriterBuildable(typeof(MemorySearchPreviewTool))] @@ -158,6 +164,7 @@ namespace Azure.AI.Projects.Agents [ModelReaderWriterBuildable(typeof(ToolChoiceMCP))] [ModelReaderWriterBuildable(typeof(ToolChoiceWebSearchPreview))] [ModelReaderWriterBuildable(typeof(ToolChoiceWebSearchPreview20250311))] + [ModelReaderWriterBuildable(typeof(ToolConfig))] [ModelReaderWriterBuildable(typeof(ToolProjectConnection))] [ModelReaderWriterBuildable(typeof(ToolSearchTool))] [ModelReaderWriterBuildable(typeof(UnknownAgentBlueprintReference))] @@ -168,6 +175,7 @@ namespace Azure.AI.Projects.Agents [ModelReaderWriterBuildable(typeof(UnknownCustomToolParamFormat))] [ModelReaderWriterBuildable(typeof(UnknownFunctionShellToolParamEnvironment))] [ModelReaderWriterBuildable(typeof(UnknownInternalToolChoiceParam))] + [ModelReaderWriterBuildable(typeof(UnknownIsolationKeySource))] [ModelReaderWriterBuildable(typeof(UnknownOpenApiAuthenticationDetails))] [ModelReaderWriterBuildable(typeof(UnknownTelemetryEndpoint))] [ModelReaderWriterBuildable(typeof(UnknownTelemetryEndpointAuthentication))] diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/AzureAISearchTool.Serialization.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/AzureAISearchTool.Serialization.cs index 50497da8306f..537fb83bf7a4 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/AzureAISearchTool.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/AzureAISearchTool.Serialization.cs @@ -82,6 +82,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsCollectionDefined(ToolConfigs)) + { + writer.WritePropertyName("tool_configs"u8); + writer.WriteStartObject(); + foreach (var item in ToolConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } writer.WritePropertyName("azure_ai_search"u8); writer.WriteObjectValue(Options, options); } @@ -115,6 +126,7 @@ internal static AzureAISearchTool DeserializeAzureAISearchTool(JsonElement eleme IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); string name = default; string description = default; + IDictionary toolConfigs = default; AzureAISearchToolOptions options0 = default; foreach (var prop in element.EnumerateObject()) { @@ -133,6 +145,20 @@ internal static AzureAISearchTool DeserializeAzureAISearchTool(JsonElement eleme description = prop.Value.GetString(); continue; } + if (prop.NameEquals("tool_configs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, ToolConfig.DeserializeToolConfig(prop0.Value, options)); + } + toolConfigs = dictionary; + continue; + } if (prop.NameEquals("azure_ai_search"u8)) { options0 = AzureAISearchToolOptions.DeserializeAzureAISearchToolOptions(prop.Value, options); @@ -143,7 +169,13 @@ internal static AzureAISearchTool DeserializeAzureAISearchTool(JsonElement eleme additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new AzureAISearchTool(@type, additionalBinaryDataProperties, name, description, options0); + return new AzureAISearchTool( + @type, + additionalBinaryDataProperties, + name, + description, + toolConfigs ?? new ChangeTrackingDictionary(), + options0); } } } diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/AzureAISearchTool.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/AzureAISearchTool.cs index f4a03ada6b04..b4eb6476fd68 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/AzureAISearchTool.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/AzureAISearchTool.cs @@ -16,11 +16,17 @@ public partial class AzureAISearchTool : ProjectsAgentTool /// Keeps track of any properties unknown to the library. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// /// The azure ai search index resource. - internal AzureAISearchTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, AzureAISearchToolOptions options) : base(@type, additionalBinaryDataProperties) + internal AzureAISearchTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, IDictionary toolConfigs, AzureAISearchToolOptions options) : base(@type, additionalBinaryDataProperties) { Name = name; Description = description; + ToolConfigs = toolConfigs; Options = options; } @@ -29,5 +35,12 @@ internal AzureAISearchTool(ToolType @type, IDictionary addit /// Optional user-defined description for this tool or configuration. public string Description { get; set; } + + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + public IDictionary ToolConfigs { get; } } } diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/AzureFunctionTool.Serialization.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/AzureFunctionTool.Serialization.cs index 597222c16610..1b358b5b72b9 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/AzureFunctionTool.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/AzureFunctionTool.Serialization.cs @@ -79,6 +79,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); writer.WritePropertyName("azure_function"u8); writer.WriteObjectValue(AzureFunction, options); + if (Optional.IsCollectionDefined(ToolConfigs)) + { + writer.WritePropertyName("tool_configs"u8); + writer.WriteStartObject(); + foreach (var item in ToolConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } } /// The JSON reader. @@ -109,6 +120,7 @@ internal static AzureFunctionTool DeserializeAzureFunctionTool(JsonElement eleme ToolType @type = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); AzureFunctionDefinition azureFunction = default; + IDictionary toolConfigs = default; foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("type"u8)) @@ -121,12 +133,26 @@ internal static AzureFunctionTool DeserializeAzureFunctionTool(JsonElement eleme azureFunction = AzureFunctionDefinition.DeserializeAzureFunctionDefinition(prop.Value, options); continue; } + if (prop.NameEquals("tool_configs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, ToolConfig.DeserializeToolConfig(prop0.Value, options)); + } + toolConfigs = dictionary; + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new AzureFunctionTool(@type, additionalBinaryDataProperties, azureFunction); + return new AzureFunctionTool(@type, additionalBinaryDataProperties, azureFunction, toolConfigs ?? new ChangeTrackingDictionary()); } } } diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/AzureFunctionTool.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/AzureFunctionTool.cs index 2cd76a6fa30b..31e98f331000 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/AzureFunctionTool.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/AzureFunctionTool.cs @@ -19,18 +19,32 @@ public AzureFunctionTool(AzureFunctionDefinition azureFunction) : base(ToolType. Argument.AssertNotNull(azureFunction, nameof(azureFunction)); AzureFunction = azureFunction; + ToolConfigs = new ChangeTrackingDictionary(); } /// Initializes a new instance of . /// /// Keeps track of any properties unknown to the library. /// The Azure Function Tool definition. - internal AzureFunctionTool(ToolType @type, IDictionary additionalBinaryDataProperties, AzureFunctionDefinition azureFunction) : base(@type, additionalBinaryDataProperties) + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + internal AzureFunctionTool(ToolType @type, IDictionary additionalBinaryDataProperties, AzureFunctionDefinition azureFunction, IDictionary toolConfigs) : base(@type, additionalBinaryDataProperties) { AzureFunction = azureFunction; + ToolConfigs = toolConfigs; } /// The Azure Function Tool definition. public AzureFunctionDefinition AzureFunction { get; set; } + + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + public IDictionary ToolConfigs { get; } } } diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/BingCustomSearchPreviewTool.Serialization.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/BingCustomSearchPreviewTool.Serialization.cs index 40e1193efcc6..0182f97b0244 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/BingCustomSearchPreviewTool.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/BingCustomSearchPreviewTool.Serialization.cs @@ -87,6 +87,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsCollectionDefined(ToolConfigs)) + { + writer.WritePropertyName("tool_configs"u8); + writer.WriteStartObject(); + foreach (var item in ToolConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } writer.WritePropertyName("bing_custom_search_preview"u8); writer.WriteObjectValue(BingCustomSearchPreview, options); } @@ -120,6 +131,7 @@ internal static BingCustomSearchPreviewTool DeserializeBingCustomSearchPreviewTo IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); string name = default; string description = default; + IDictionary toolConfigs = default; BingCustomSearchToolOptions bingCustomSearchPreview = default; foreach (var prop in element.EnumerateObject()) { @@ -138,6 +150,20 @@ internal static BingCustomSearchPreviewTool DeserializeBingCustomSearchPreviewTo description = prop.Value.GetString(); continue; } + if (prop.NameEquals("tool_configs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, ToolConfig.DeserializeToolConfig(prop0.Value, options)); + } + toolConfigs = dictionary; + continue; + } if (prop.NameEquals("bing_custom_search_preview"u8)) { bingCustomSearchPreview = BingCustomSearchToolOptions.DeserializeBingCustomSearchToolOptions(prop.Value, options); @@ -148,7 +174,13 @@ internal static BingCustomSearchPreviewTool DeserializeBingCustomSearchPreviewTo additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new BingCustomSearchPreviewTool(@type, additionalBinaryDataProperties, name, description, bingCustomSearchPreview); + return new BingCustomSearchPreviewTool( + @type, + additionalBinaryDataProperties, + name, + description, + toolConfigs ?? new ChangeTrackingDictionary(), + bingCustomSearchPreview); } } } diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/BingCustomSearchPreviewTool.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/BingCustomSearchPreviewTool.cs index cdb9cd0252bf..450058f244b0 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/BingCustomSearchPreviewTool.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/BingCustomSearchPreviewTool.cs @@ -18,6 +18,7 @@ public BingCustomSearchPreviewTool(BingCustomSearchToolOptions bingCustomSearchP { Argument.AssertNotNull(bingCustomSearchPreview, nameof(bingCustomSearchPreview)); + ToolConfigs = new ChangeTrackingDictionary(); BingCustomSearchPreview = bingCustomSearchPreview; } @@ -26,11 +27,17 @@ public BingCustomSearchPreviewTool(BingCustomSearchToolOptions bingCustomSearchP /// Keeps track of any properties unknown to the library. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// /// The bing custom search tool parameters. - internal BingCustomSearchPreviewTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, BingCustomSearchToolOptions bingCustomSearchPreview) : base(@type, additionalBinaryDataProperties) + internal BingCustomSearchPreviewTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, IDictionary toolConfigs, BingCustomSearchToolOptions bingCustomSearchPreview) : base(@type, additionalBinaryDataProperties) { Name = name; Description = description; + ToolConfigs = toolConfigs; BingCustomSearchPreview = bingCustomSearchPreview; } @@ -40,6 +47,13 @@ internal BingCustomSearchPreviewTool(ToolType @type, IDictionary Optional user-defined description for this tool or configuration. public string Description { get; set; } + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + public IDictionary ToolConfigs { get; } + /// The bing custom search tool parameters. public BingCustomSearchToolOptions BingCustomSearchPreview { get; set; } } diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/BingGroundingTool.Serialization.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/BingGroundingTool.Serialization.cs index 58c8fd6488a1..7e9906db9bc6 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/BingGroundingTool.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/BingGroundingTool.Serialization.cs @@ -87,6 +87,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsCollectionDefined(ToolConfigs)) + { + writer.WritePropertyName("tool_configs"u8); + writer.WriteStartObject(); + foreach (var item in ToolConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } writer.WritePropertyName("bing_grounding"u8); writer.WriteObjectValue(SearchToolOptions, options); } @@ -120,6 +131,7 @@ internal static BingGroundingTool DeserializeBingGroundingTool(JsonElement eleme IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); string name = default; string description = default; + IDictionary toolConfigs = default; BingGroundingSearchToolOptions searchToolOptions = default; foreach (var prop in element.EnumerateObject()) { @@ -138,6 +150,20 @@ internal static BingGroundingTool DeserializeBingGroundingTool(JsonElement eleme description = prop.Value.GetString(); continue; } + if (prop.NameEquals("tool_configs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, ToolConfig.DeserializeToolConfig(prop0.Value, options)); + } + toolConfigs = dictionary; + continue; + } if (prop.NameEquals("bing_grounding"u8)) { searchToolOptions = BingGroundingSearchToolOptions.DeserializeBingGroundingSearchToolOptions(prop.Value, options); @@ -148,7 +174,13 @@ internal static BingGroundingTool DeserializeBingGroundingTool(JsonElement eleme additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new BingGroundingTool(@type, additionalBinaryDataProperties, name, description, searchToolOptions); + return new BingGroundingTool( + @type, + additionalBinaryDataProperties, + name, + description, + toolConfigs ?? new ChangeTrackingDictionary(), + searchToolOptions); } } } diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/BingGroundingTool.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/BingGroundingTool.cs index 5333b1ef2047..cf15238e2d4a 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/BingGroundingTool.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/BingGroundingTool.cs @@ -18,6 +18,7 @@ public BingGroundingTool(BingGroundingSearchToolOptions searchToolOptions) : bas { Argument.AssertNotNull(searchToolOptions, nameof(searchToolOptions)); + ToolConfigs = new ChangeTrackingDictionary(); SearchToolOptions = searchToolOptions; } @@ -26,11 +27,17 @@ public BingGroundingTool(BingGroundingSearchToolOptions searchToolOptions) : bas /// Keeps track of any properties unknown to the library. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// /// The bing grounding search tool parameters. - internal BingGroundingTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, BingGroundingSearchToolOptions searchToolOptions) : base(@type, additionalBinaryDataProperties) + internal BingGroundingTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, IDictionary toolConfigs, BingGroundingSearchToolOptions searchToolOptions) : base(@type, additionalBinaryDataProperties) { Name = name; Description = description; + ToolConfigs = toolConfigs; SearchToolOptions = searchToolOptions; } @@ -40,6 +47,13 @@ internal BingGroundingTool(ToolType @type, IDictionary addit /// Optional user-defined description for this tool or configuration. public string Description { get; set; } + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + public IDictionary ToolConfigs { get; } + /// The bing grounding search tool parameters. public BingGroundingSearchToolOptions SearchToolOptions { get; set; } } diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/BrowserAutomationPreviewTool.Serialization.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/BrowserAutomationPreviewTool.Serialization.cs index b26736c1f229..a992c217a205 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/BrowserAutomationPreviewTool.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/BrowserAutomationPreviewTool.Serialization.cs @@ -87,6 +87,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsCollectionDefined(ToolConfigs)) + { + writer.WritePropertyName("tool_configs"u8); + writer.WriteStartObject(); + foreach (var item in ToolConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } writer.WritePropertyName("browser_automation_preview"u8); writer.WriteObjectValue(ToolParameters, options); } @@ -120,6 +131,7 @@ internal static BrowserAutomationPreviewTool DeserializeBrowserAutomationPreview IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); string name = default; string description = default; + IDictionary toolConfigs = default; BrowserAutomationToolOptions toolParameters = default; foreach (var prop in element.EnumerateObject()) { @@ -138,6 +150,20 @@ internal static BrowserAutomationPreviewTool DeserializeBrowserAutomationPreview description = prop.Value.GetString(); continue; } + if (prop.NameEquals("tool_configs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, ToolConfig.DeserializeToolConfig(prop0.Value, options)); + } + toolConfigs = dictionary; + continue; + } if (prop.NameEquals("browser_automation_preview"u8)) { toolParameters = BrowserAutomationToolOptions.DeserializeBrowserAutomationToolOptions(prop.Value, options); @@ -148,7 +174,13 @@ internal static BrowserAutomationPreviewTool DeserializeBrowserAutomationPreview additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new BrowserAutomationPreviewTool(@type, additionalBinaryDataProperties, name, description, toolParameters); + return new BrowserAutomationPreviewTool( + @type, + additionalBinaryDataProperties, + name, + description, + toolConfigs ?? new ChangeTrackingDictionary(), + toolParameters); } } } diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/BrowserAutomationPreviewTool.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/BrowserAutomationPreviewTool.cs index eea803c06003..7789b08b9feb 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/BrowserAutomationPreviewTool.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/BrowserAutomationPreviewTool.cs @@ -18,6 +18,7 @@ public BrowserAutomationPreviewTool(BrowserAutomationToolOptions toolParameters) { Argument.AssertNotNull(toolParameters, nameof(toolParameters)); + ToolConfigs = new ChangeTrackingDictionary(); ToolParameters = toolParameters; } @@ -26,11 +27,17 @@ public BrowserAutomationPreviewTool(BrowserAutomationToolOptions toolParameters) /// Keeps track of any properties unknown to the library. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// /// The Browser Automation Tool parameters. - internal BrowserAutomationPreviewTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, BrowserAutomationToolOptions toolParameters) : base(@type, additionalBinaryDataProperties) + internal BrowserAutomationPreviewTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, IDictionary toolConfigs, BrowserAutomationToolOptions toolParameters) : base(@type, additionalBinaryDataProperties) { Name = name; Description = description; + ToolConfigs = toolConfigs; ToolParameters = toolParameters; } @@ -40,6 +47,13 @@ internal BrowserAutomationPreviewTool(ToolType @type, IDictionary Optional user-defined description for this tool or configuration. public string Description { get; set; } + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + public IDictionary ToolConfigs { get; } + /// The Browser Automation Tool parameters. public BrowserAutomationToolOptions ToolParameters { get; set; } } diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/CaptureStructuredOutputsTool.Serialization.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/CaptureStructuredOutputsTool.Serialization.cs index c933bf4e4f2a..1a0e4de91a09 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/CaptureStructuredOutputsTool.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/CaptureStructuredOutputsTool.Serialization.cs @@ -87,6 +87,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsCollectionDefined(ToolConfigs)) + { + writer.WritePropertyName("tool_configs"u8); + writer.WriteStartObject(); + foreach (var item in ToolConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } writer.WritePropertyName("outputs"u8); writer.WriteObjectValue(OutputDefinition, options); } @@ -120,6 +131,7 @@ internal static CaptureStructuredOutputsTool DeserializeCaptureStructuredOutputs IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); string name = default; string description = default; + IDictionary toolConfigs = default; StructuredOutputDefinition outputDefinition = default; foreach (var prop in element.EnumerateObject()) { @@ -138,6 +150,20 @@ internal static CaptureStructuredOutputsTool DeserializeCaptureStructuredOutputs description = prop.Value.GetString(); continue; } + if (prop.NameEquals("tool_configs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, ToolConfig.DeserializeToolConfig(prop0.Value, options)); + } + toolConfigs = dictionary; + continue; + } if (prop.NameEquals("outputs"u8)) { outputDefinition = StructuredOutputDefinition.DeserializeStructuredOutputDefinition(prop.Value, options); @@ -148,7 +174,13 @@ internal static CaptureStructuredOutputsTool DeserializeCaptureStructuredOutputs additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new CaptureStructuredOutputsTool(@type, additionalBinaryDataProperties, name, description, outputDefinition); + return new CaptureStructuredOutputsTool( + @type, + additionalBinaryDataProperties, + name, + description, + toolConfigs ?? new ChangeTrackingDictionary(), + outputDefinition); } } } diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/CaptureStructuredOutputsTool.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/CaptureStructuredOutputsTool.cs index 8b758419b31d..78e42a70eab5 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/CaptureStructuredOutputsTool.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/CaptureStructuredOutputsTool.cs @@ -18,6 +18,7 @@ public CaptureStructuredOutputsTool(StructuredOutputDefinition outputDefinition) { Argument.AssertNotNull(outputDefinition, nameof(outputDefinition)); + ToolConfigs = new ChangeTrackingDictionary(); OutputDefinition = outputDefinition; } @@ -26,11 +27,17 @@ public CaptureStructuredOutputsTool(StructuredOutputDefinition outputDefinition) /// Keeps track of any properties unknown to the library. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// /// The structured outputs to capture from the model. - internal CaptureStructuredOutputsTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, StructuredOutputDefinition outputDefinition) : base(@type, additionalBinaryDataProperties) + internal CaptureStructuredOutputsTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, IDictionary toolConfigs, StructuredOutputDefinition outputDefinition) : base(@type, additionalBinaryDataProperties) { Name = name; Description = description; + ToolConfigs = toolConfigs; OutputDefinition = outputDefinition; } @@ -40,6 +47,13 @@ internal CaptureStructuredOutputsTool(ToolType @type, IDictionary Optional user-defined description for this tool or configuration. public string Description { get; set; } + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + public IDictionary ToolConfigs { get; } + /// The structured outputs to capture from the model. public StructuredOutputDefinition OutputDefinition { get; set; } } diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/CreateAgentFromCodeOptions.Serialization.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/CreateAgentFromCodeOptions.Serialization.cs new file mode 100644 index 000000000000..30367bce3966 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/CreateAgentFromCodeOptions.Serialization.cs @@ -0,0 +1,165 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.AI.Projects.Agents +{ + /// Multipart request body for creating a new code-based agent (POST /agents). Inherits from CreateAgentVersionFromCodeContent for future extensibility. + public partial class CreateAgentFromCodeOptions : IJsonModel + { + /// Initializes a new instance of for deserialization. + internal CreateAgentFromCodeOptions() + { + } + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual CreateAgentFromCodeOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeCreateAgentFromCodeOptions(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CreateAgentFromCodeOptions)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsAgentsContext.Default); + default: + throw new FormatException($"The model {nameof(CreateAgentFromCodeOptions)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + CreateAgentFromCodeOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The to serialize into . + public static implicit operator BinaryContent(CreateAgentFromCodeOptions createAgentFromCodeOptions) + { + if (createAgentFromCodeOptions == null) + { + return null; + } + return BinaryContent.Create(createAgentFromCodeOptions, ModelSerializationExtensions.WireOptions); + } + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CreateAgentFromCodeOptions)} does not support writing '{format}' format."); + } + writer.WritePropertyName("metadata"u8); + writer.WriteObjectValue(Metadata, options); + writer.WritePropertyName("code"u8); +#if NET6_0_OR_GREATER + writer.WriteRawValue(Code); +#else + using (JsonDocument document = JsonDocument.Parse(Code)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + CreateAgentFromCodeOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual CreateAgentFromCodeOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CreateAgentFromCodeOptions)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCreateAgentFromCodeOptions(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static CreateAgentFromCodeOptions DeserializeCreateAgentFromCodeOptions(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + CreateAgentVersionFromCodeMetadata metadata = default; + BinaryData code = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("metadata"u8)) + { + metadata = CreateAgentVersionFromCodeMetadata.DeserializeCreateAgentVersionFromCodeMetadata(prop.Value, options); + continue; + } + if (prop.NameEquals("code"u8)) + { + code = BinaryData.FromString(prop.Value.GetRawText()); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new CreateAgentFromCodeOptions(metadata, code, additionalBinaryDataProperties); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/CreateAgentFromCodeOptions.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/CreateAgentFromCodeOptions.cs new file mode 100644 index 000000000000..06ea9f9ac17e --- /dev/null +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/CreateAgentFromCodeOptions.cs @@ -0,0 +1,72 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.AI.Projects.Agents +{ + /// Multipart request body for creating a new code-based agent (POST /agents). Inherits from CreateAgentVersionFromCodeContent for future extensibility. + public partial class CreateAgentFromCodeOptions + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + /// JSON metadata including description and hosted definition. + /// The code zip file (max 250 MB). + /// or is null. + public CreateAgentFromCodeOptions(CreateAgentVersionFromCodeMetadata metadata, BinaryData code) + { + Argument.AssertNotNull(metadata, nameof(metadata)); + Argument.AssertNotNull(code, nameof(code)); + + Metadata = metadata; + Code = code; + } + + /// Initializes a new instance of . + /// JSON metadata including description and hosted definition. + /// The code zip file (max 250 MB). + /// Keeps track of any properties unknown to the library. + internal CreateAgentFromCodeOptions(CreateAgentVersionFromCodeMetadata metadata, BinaryData code, IDictionary additionalBinaryDataProperties) + { + Metadata = metadata; + Code = code; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// JSON metadata including description and hosted definition. + public CreateAgentVersionFromCodeMetadata Metadata { get; } + + /// + /// The code zip file (max 250 MB). + /// To assign an object to this property use . + /// To assign an already formatted json string to this property use . + /// + /// Examples: + /// + /// + /// BinaryData.FromObjectAsJson("foo"). + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromString("\"foo\""). + /// Creates a payload of "foo". + /// + /// + /// BinaryData.FromObjectAsJson(new { key = "value" }). + /// Creates a payload of { "key": "value" }. + /// + /// + /// BinaryData.FromString("{\"key\": \"value\"}"). + /// Creates a payload of { "key": "value" }. + /// + /// + /// + /// + public BinaryData Code { get; } + } +} diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/CreateAgentVersionFromCodeMetadata.Serialization.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/CreateAgentVersionFromCodeMetadata.Serialization.cs new file mode 100644 index 000000000000..49a58312eef4 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/CreateAgentVersionFromCodeMetadata.Serialization.cs @@ -0,0 +1,193 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.AI.Projects.Agents +{ + /// + /// JSON metadata for code-based agent operations (create, update, create version). + /// The agent name comes from the URL path parameter or the `x-ms-agent-name` header, + /// so it is not included in this model. + /// The content hash (SHA-256 of the zip) is carried in the `x-ms-code-zip-sha256` header. + /// + public partial class CreateAgentVersionFromCodeMetadata : IJsonModel + { + /// Initializes a new instance of for deserialization. + internal CreateAgentVersionFromCodeMetadata() + { + } + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual CreateAgentVersionFromCodeMetadata PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeCreateAgentVersionFromCodeMetadata(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CreateAgentVersionFromCodeMetadata)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsAgentsContext.Default); + default: + throw new FormatException($"The model {nameof(CreateAgentVersionFromCodeMetadata)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + CreateAgentVersionFromCodeMetadata IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CreateAgentVersionFromCodeMetadata)} does not support writing '{format}' format."); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (Optional.IsCollectionDefined(Metadata)) + { + writer.WritePropertyName("metadata"u8); + writer.WriteStartObject(); + foreach (var item in Metadata) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + writer.WritePropertyName("definition"u8); + writer.WriteObjectValue(Definition, options); + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + CreateAgentVersionFromCodeMetadata IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual CreateAgentVersionFromCodeMetadata JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CreateAgentVersionFromCodeMetadata)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCreateAgentVersionFromCodeMetadata(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static CreateAgentVersionFromCodeMetadata DeserializeCreateAgentVersionFromCodeMetadata(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string description = default; + IDictionary metadata = default; + HostedAgentDefinition definition = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("description"u8)) + { + description = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("metadata"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + if (prop0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(prop0.Name, null); + } + else + { + dictionary.Add(prop0.Name, prop0.Value.GetString()); + } + } + metadata = dictionary; + continue; + } + if (prop.NameEquals("definition"u8)) + { + definition = HostedAgentDefinition.DeserializeHostedAgentDefinition(prop.Value, options); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new CreateAgentVersionFromCodeMetadata(description, metadata ?? new ChangeTrackingDictionary(), definition, additionalBinaryDataProperties); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/CreateAgentVersionFromCodeMetadata.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/CreateAgentVersionFromCodeMetadata.cs new file mode 100644 index 000000000000..7db84379e4e7 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/CreateAgentVersionFromCodeMetadata.cs @@ -0,0 +1,66 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects.Agents +{ + /// + /// JSON metadata for code-based agent operations (create, update, create version). + /// The agent name comes from the URL path parameter or the `x-ms-agent-name` header, + /// so it is not included in this model. + /// The content hash (SHA-256 of the zip) is carried in the `x-ms-code-zip-sha256` header. + /// + public partial class CreateAgentVersionFromCodeMetadata + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + /// The hosted agent definition including code_configuration (runtime, entry_point), cpu, memory, and protocol_versions. + /// is null. + public CreateAgentVersionFromCodeMetadata(HostedAgentDefinition definition) + { + Argument.AssertNotNull(definition, nameof(definition)); + + Metadata = new ChangeTrackingDictionary(); + Definition = definition; + } + + /// Initializes a new instance of . + /// A human-readable description of the agent. + /// + /// Set of 16 key-value pairs that can be attached to an object. This can be + /// useful for storing additional information about the object in a structured + /// format, and querying for objects via API or the dashboard. + /// Keys are strings with a maximum length of 64 characters. Values are strings + /// with a maximum length of 512 characters. + /// + /// The hosted agent definition including code_configuration (runtime, entry_point), cpu, memory, and protocol_versions. + /// Keeps track of any properties unknown to the library. + internal CreateAgentVersionFromCodeMetadata(string description, IDictionary metadata, HostedAgentDefinition definition, IDictionary additionalBinaryDataProperties) + { + Description = description; + Metadata = metadata; + Definition = definition; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// A human-readable description of the agent. + public string Description { get; set; } + + /// + /// Set of 16 key-value pairs that can be attached to an object. This can be + /// useful for storing additional information about the object in a structured + /// format, and querying for objects via API or the dashboard. + /// Keys are strings with a maximum length of 64 characters. Values are strings + /// with a maximum length of 512 characters. + /// + public IDictionary Metadata { get; } + + /// The hosted agent definition including code_configuration (runtime, entry_point), cpu, memory, and protocol_versions. + public HostedAgentDefinition Definition { get; } + } +} diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/EntraAuthorizationScheme.Serialization.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/EntraAuthorizationScheme.Serialization.cs index fc1a24449646..76a18391ff16 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/EntraAuthorizationScheme.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/EntraAuthorizationScheme.Serialization.cs @@ -71,6 +71,11 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri throw new FormatException($"The model {nameof(EntraAuthorizationScheme)} does not support writing '{format}' format."); } base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(IsolationKeySource)) + { + writer.WritePropertyName("isolation_key_source"u8); + writer.WriteObjectValue(IsolationKeySource, options); + } } /// The JSON reader. @@ -100,6 +105,7 @@ internal static EntraAuthorizationScheme DeserializeEntraAuthorizationScheme(Jso } AgentEndpointAuthorizationSchemeType @type = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + IsolationKeySource isolationKeySource = default; foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("type"u8)) @@ -107,12 +113,21 @@ internal static EntraAuthorizationScheme DeserializeEntraAuthorizationScheme(Jso @type = new AgentEndpointAuthorizationSchemeType(prop.Value.GetString()); continue; } + if (prop.NameEquals("isolation_key_source"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + isolationKeySource = IsolationKeySource.DeserializeIsolationKeySource(prop.Value, options); + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new EntraAuthorizationScheme(@type, additionalBinaryDataProperties); + return new EntraAuthorizationScheme(@type, additionalBinaryDataProperties, isolationKeySource); } } } diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/EntraAuthorizationScheme.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/EntraAuthorizationScheme.cs index 0fe8460e5a92..1b5b303a45a6 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/EntraAuthorizationScheme.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/EntraAuthorizationScheme.cs @@ -18,8 +18,13 @@ public EntraAuthorizationScheme() : base(AgentEndpointAuthorizationSchemeType.En /// Initializes a new instance of . /// /// Keeps track of any properties unknown to the library. - internal EntraAuthorizationScheme(AgentEndpointAuthorizationSchemeType @type, IDictionary additionalBinaryDataProperties) : base(@type, additionalBinaryDataProperties) + /// The source from which the per-user isolation key is derived for requests authorized via this scheme. Defaults to Entra-based isolation when omitted. + internal EntraAuthorizationScheme(AgentEndpointAuthorizationSchemeType @type, IDictionary additionalBinaryDataProperties, IsolationKeySource isolationKeySource) : base(@type, additionalBinaryDataProperties) { + IsolationKeySource = isolationKeySource; } + + /// The source from which the per-user isolation key is derived for requests authorized via this scheme. Defaults to Entra-based isolation when omitted. + public IsolationKeySource IsolationKeySource { get; set; } } } diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/EntraIsolationKeySource.Serialization.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/EntraIsolationKeySource.Serialization.cs new file mode 100644 index 000000000000..8cc8c2d4c9f5 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/EntraIsolationKeySource.Serialization.cs @@ -0,0 +1,118 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.AI.Projects.Agents +{ + /// The EntraIsolationKeySource. + public partial class EntraIsolationKeySource : IsolationKeySource, IJsonModel + { + /// The data to parse. + /// The client options for reading and writing models. + protected override IsolationKeySource PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeEntraIsolationKeySource(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EntraIsolationKeySource)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsAgentsContext.Default); + default: + throw new FormatException($"The model {nameof(EntraIsolationKeySource)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + EntraIsolationKeySource IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (EntraIsolationKeySource)PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EntraIsolationKeySource)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + } + + /// The JSON reader. + /// The client options for reading and writing models. + EntraIsolationKeySource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (EntraIsolationKeySource)JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected override IsolationKeySource JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EntraIsolationKeySource)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEntraIsolationKeySource(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static EntraIsolationKeySource DeserializeEntraIsolationKeySource(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IsolationKeySourceKind kind = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("kind"u8)) + { + kind = new IsolationKeySourceKind(prop.Value.GetString()); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new EntraIsolationKeySource(kind, additionalBinaryDataProperties); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/EntraIsolationKeySource.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/EntraIsolationKeySource.cs new file mode 100644 index 000000000000..7c7b06041fb0 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/EntraIsolationKeySource.cs @@ -0,0 +1,25 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects.Agents +{ + /// The EntraIsolationKeySource. + public partial class EntraIsolationKeySource : IsolationKeySource + { + /// Initializes a new instance of . + public EntraIsolationKeySource() : base(IsolationKeySourceKind.Entra) + { + } + + /// Initializes a new instance of . + /// + /// Keeps track of any properties unknown to the library. + internal EntraIsolationKeySource(IsolationKeySourceKind kind, IDictionary additionalBinaryDataProperties) : base(kind, additionalBinaryDataProperties) + { + } + } +} diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/ExternalAgentDefinition.Serialization.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/ExternalAgentDefinition.Serialization.cs new file mode 100644 index 000000000000..d2f3a00eecc7 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/ExternalAgentDefinition.Serialization.cs @@ -0,0 +1,143 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.AI.Projects.Agents +{ + /// + /// The external agent definition. Represents a third-party agent hosted outside Foundry (for example, on GCP or AWS). + /// Registration is metadata-only: Foundry records the agent definition to light up observability experiences (traces, evaluations) + /// over customer-emitted OpenTelemetry data. + /// + public partial class ExternalAgentDefinition : ProjectsAgentDefinition, IJsonModel + { + /// The data to parse. + /// The client options for reading and writing models. + protected override ProjectsAgentDefinition PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeExternalAgentDefinition(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ExternalAgentDefinition)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsAgentsContext.Default); + default: + throw new FormatException($"The model {nameof(ExternalAgentDefinition)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + ExternalAgentDefinition IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (ExternalAgentDefinition)PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExternalAgentDefinition)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(OtelAgentId)) + { + writer.WritePropertyName("otel_agent_id"u8); + writer.WriteStringValue(OtelAgentId); + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + ExternalAgentDefinition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ExternalAgentDefinition)JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected override ProjectsAgentDefinition JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ExternalAgentDefinition)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeExternalAgentDefinition(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static ExternalAgentDefinition DeserializeExternalAgentDefinition(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + ProjectsAgentKind kind = default; + ContentFilterConfiguration contentFilterConfiguration = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + string otelAgentId = default; + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("kind"u8)) + { + kind = new ProjectsAgentKind(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("rai_config"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + contentFilterConfiguration = ContentFilterConfiguration.DeserializeContentFilterConfiguration(prop.Value, options); + continue; + } + if (prop.NameEquals("otel_agent_id"u8)) + { + otelAgentId = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new ExternalAgentDefinition(kind, contentFilterConfiguration, additionalBinaryDataProperties, otelAgentId); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/ExternalAgentDefinition.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/ExternalAgentDefinition.cs new file mode 100644 index 000000000000..820b0cb9fbef --- /dev/null +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/ExternalAgentDefinition.cs @@ -0,0 +1,47 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects.Agents +{ + /// + /// The external agent definition. Represents a third-party agent hosted outside Foundry (for example, on GCP or AWS). + /// Registration is metadata-only: Foundry records the agent definition to light up observability experiences (traces, evaluations) + /// over customer-emitted OpenTelemetry data. + /// + public partial class ExternalAgentDefinition : ProjectsAgentDefinition + { + /// Initializes a new instance of . + public ExternalAgentDefinition() : base(ProjectsAgentKind.External) + { + } + + /// Initializes a new instance of . + /// + /// Configuration for Responsible AI (RAI) content filtering and safety features. + /// Keeps track of any properties unknown to the library. + /// + /// The OpenTelemetry agent identifier used to attribute customer-emitted spans to this Foundry agent. + /// Spans must include the attribute `gen_ai.agent.id = <otel_agent_id>` to appear under this registration. + /// Defaults to the top-level agent name when omitted. Provide an explicit value only for migration scenarios + /// where the running external agent already emits a stable id that differs from the Foundry agent name. + /// The resolved value is always echoed on read. + /// + internal ExternalAgentDefinition(ProjectsAgentKind kind, ContentFilterConfiguration contentFilterConfiguration, IDictionary additionalBinaryDataProperties, string otelAgentId) : base(kind, contentFilterConfiguration, additionalBinaryDataProperties) + { + OtelAgentId = otelAgentId; + } + + /// + /// The OpenTelemetry agent identifier used to attribute customer-emitted spans to this Foundry agent. + /// Spans must include the attribute `gen_ai.agent.id = <otel_agent_id>` to appear under this registration. + /// Defaults to the top-level agent name when omitted. Provide an explicit value only for migration scenarios + /// where the running external agent already emits a stable id that differs from the Foundry agent name. + /// The resolved value is always echoed on read. + /// + public string OtelAgentId { get; set; } + } +} diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/FabricIQPreviewTool.Serialization.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/FabricIQPreviewTool.Serialization.cs index c85f81872b89..66a1832aead4 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/FabricIQPreviewTool.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/FabricIQPreviewTool.Serialization.cs @@ -111,6 +111,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsCollectionDefined(ToolConfigs)) + { + writer.WritePropertyName("tool_configs"u8); + writer.WriteStartObject(); + foreach (var item in ToolConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } } /// The JSON reader. @@ -146,6 +157,7 @@ internal static FabricIQPreviewTool DeserializeFabricIQPreviewTool(JsonElement e BinaryData requireApproval = default; string name = default; string description = default; + IDictionary toolConfigs = default; foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("type"u8)) @@ -192,6 +204,20 @@ internal static FabricIQPreviewTool DeserializeFabricIQPreviewTool(JsonElement e description = prop.Value.GetString(); continue; } + if (prop.NameEquals("tool_configs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, ToolConfig.DeserializeToolConfig(prop0.Value, options)); + } + toolConfigs = dictionary; + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); @@ -205,7 +231,8 @@ internal static FabricIQPreviewTool DeserializeFabricIQPreviewTool(JsonElement e serverUrl, requireApproval, name, - description); + description, + toolConfigs ?? new ChangeTrackingDictionary()); } } } diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/FabricIQPreviewTool.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/FabricIQPreviewTool.cs index 8dbcfefa6702..56637f05a463 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/FabricIQPreviewTool.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/FabricIQPreviewTool.cs @@ -20,6 +20,7 @@ public FabricIQPreviewTool(string projectConnectionId) : base(ToolType.FabricIqP Argument.AssertNotNull(projectConnectionId, nameof(projectConnectionId)); ProjectConnectionId = projectConnectionId; + ToolConfigs = new ChangeTrackingDictionary(); } /// Initializes a new instance of . @@ -31,7 +32,12 @@ public FabricIQPreviewTool(string projectConnectionId) : base(ToolType.FabricIqP /// (Optional) Whether the agent requires approval before executing actions. Default is always. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. - internal FabricIQPreviewTool(ToolType @type, IDictionary additionalBinaryDataProperties, string projectConnectionId, string serverLabel, Uri serverUrl, BinaryData requireApproval, string name, string description) : base(@type, additionalBinaryDataProperties) + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + internal FabricIQPreviewTool(ToolType @type, IDictionary additionalBinaryDataProperties, string projectConnectionId, string serverLabel, Uri serverUrl, BinaryData requireApproval, string name, string description, IDictionary toolConfigs) : base(@type, additionalBinaryDataProperties) { ProjectConnectionId = projectConnectionId; ServerLabel = serverLabel; @@ -39,6 +45,7 @@ internal FabricIQPreviewTool(ToolType @type, IDictionary add RequireApproval = requireApproval; Name = name; Description = description; + ToolConfigs = toolConfigs; } /// The ID of the FabricIQ project connection. @@ -96,5 +103,12 @@ internal FabricIQPreviewTool(ToolType @type, IDictionary add /// Optional user-defined description for this tool or configuration. public string Description { get; set; } + + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + public IDictionary ToolConfigs { get; } } } diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/FoundryFeaturesOptInKeys.Serialization.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/FoundryFeaturesOptInKeys.Serialization.cs index 7bb1d9d8f723..38624049ff41 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/FoundryFeaturesOptInKeys.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/FoundryFeaturesOptInKeys.Serialization.cs @@ -16,7 +16,7 @@ internal static partial class FoundryFeaturesOptInKeysExtensions FoundryFeaturesOptInKeys.RedTeamsV1Preview => "RedTeams=V1Preview", FoundryFeaturesOptInKeys.InsightsV1Preview => "Insights=V1Preview", FoundryFeaturesOptInKeys.MemoryStoresV1Preview => "MemoryStores=V1Preview", - FoundryFeaturesOptInKeys.ToolboxesV1Preview => "Toolboxes=V1Preview", + FoundryFeaturesOptInKeys.RoutinesV1Preview => "Routines=V1Preview", FoundryFeaturesOptInKeys.SkillsV1Preview => "Skills=V1Preview", FoundryFeaturesOptInKeys.DataGenerationJobsV1Preview => "DataGenerationJobs=V1Preview", FoundryFeaturesOptInKeys.ModelsV1Preview => "Models=V1Preview", @@ -47,9 +47,9 @@ public static FoundryFeaturesOptInKeys ToFoundryFeaturesOptInKeys(this string va { return FoundryFeaturesOptInKeys.MemoryStoresV1Preview; } - if (StringComparer.OrdinalIgnoreCase.Equals(value, "Toolboxes=V1Preview")) + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Routines=V1Preview")) { - return FoundryFeaturesOptInKeys.ToolboxesV1Preview; + return FoundryFeaturesOptInKeys.RoutinesV1Preview; } if (StringComparer.OrdinalIgnoreCase.Equals(value, "Skills=V1Preview")) { diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/FoundryFeaturesOptInKeys.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/FoundryFeaturesOptInKeys.cs index 9e46e34cdf5f..6d6d17716e69 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/FoundryFeaturesOptInKeys.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/FoundryFeaturesOptInKeys.cs @@ -17,8 +17,8 @@ public enum FoundryFeaturesOptInKeys InsightsV1Preview, /// MemoryStoresV1Preview. MemoryStoresV1Preview, - /// ToolboxesV1Preview. - ToolboxesV1Preview, + /// RoutinesV1Preview. + RoutinesV1Preview, /// SkillsV1Preview. SkillsV1Preview, /// DataGenerationJobsV1Preview. diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/HeaderIsolationKeySource.Serialization.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/HeaderIsolationKeySource.Serialization.cs new file mode 100644 index 000000000000..4a011318bfbe --- /dev/null +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/HeaderIsolationKeySource.Serialization.cs @@ -0,0 +1,118 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.AI.Projects.Agents +{ + /// The HeaderIsolationKeySource. + public partial class HeaderIsolationKeySource : IsolationKeySource, IJsonModel + { + /// The data to parse. + /// The client options for reading and writing models. + protected override IsolationKeySource PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeHeaderIsolationKeySource(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(HeaderIsolationKeySource)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsAgentsContext.Default); + default: + throw new FormatException($"The model {nameof(HeaderIsolationKeySource)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + HeaderIsolationKeySource IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (HeaderIsolationKeySource)PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HeaderIsolationKeySource)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + } + + /// The JSON reader. + /// The client options for reading and writing models. + HeaderIsolationKeySource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (HeaderIsolationKeySource)JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected override IsolationKeySource JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(HeaderIsolationKeySource)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeHeaderIsolationKeySource(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static HeaderIsolationKeySource DeserializeHeaderIsolationKeySource(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IsolationKeySourceKind kind = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("kind"u8)) + { + kind = new IsolationKeySourceKind(prop.Value.GetString()); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new HeaderIsolationKeySource(kind, additionalBinaryDataProperties); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/HeaderIsolationKeySource.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/HeaderIsolationKeySource.cs new file mode 100644 index 000000000000..076228754fbb --- /dev/null +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/HeaderIsolationKeySource.cs @@ -0,0 +1,25 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects.Agents +{ + /// The HeaderIsolationKeySource. + public partial class HeaderIsolationKeySource : IsolationKeySource + { + /// Initializes a new instance of . + public HeaderIsolationKeySource() : base(IsolationKeySourceKind.Header) + { + } + + /// Initializes a new instance of . + /// + /// Keeps track of any properties unknown to the library. + internal HeaderIsolationKeySource(IsolationKeySourceKind kind, IDictionary additionalBinaryDataProperties) : base(kind, additionalBinaryDataProperties) + { + } + } +} diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/InternalCodeInterpreterTool.Serialization.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/InternalCodeInterpreterTool.Serialization.cs index a0e7aff6e88c..06b495ff4b97 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/InternalCodeInterpreterTool.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/InternalCodeInterpreterTool.Serialization.cs @@ -81,6 +81,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsCollectionDefined(ToolConfigs)) + { + writer.WritePropertyName("tool_configs"u8); + writer.WriteStartObject(); + foreach (var item in ToolConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } if (Optional.IsDefined(Container)) { writer.WritePropertyName("container"u8); @@ -124,6 +135,7 @@ internal static InternalCodeInterpreterTool DeserializeInternalCodeInterpreterTo IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); string name = default; string description = default; + IDictionary toolConfigs = default; BinaryData container = default; foreach (var prop in element.EnumerateObject()) { @@ -142,6 +154,20 @@ internal static InternalCodeInterpreterTool DeserializeInternalCodeInterpreterTo description = prop.Value.GetString(); continue; } + if (prop.NameEquals("tool_configs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, ToolConfig.DeserializeToolConfig(prop0.Value, options)); + } + toolConfigs = dictionary; + continue; + } if (prop.NameEquals("container"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -156,7 +182,13 @@ internal static InternalCodeInterpreterTool DeserializeInternalCodeInterpreterTo additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalCodeInterpreterTool(@type, additionalBinaryDataProperties, name, description, container); + return new InternalCodeInterpreterTool( + @type, + additionalBinaryDataProperties, + name, + description, + toolConfigs ?? new ChangeTrackingDictionary(), + container); } } } diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/InternalCodeInterpreterTool.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/InternalCodeInterpreterTool.cs index 9dd3dea58444..5d208af1e761 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/InternalCodeInterpreterTool.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/InternalCodeInterpreterTool.cs @@ -14,6 +14,7 @@ internal partial class InternalCodeInterpreterTool : ProjectsAgentTool /// Initializes a new instance of . public InternalCodeInterpreterTool() : base(ToolType.CodeInterpreter) { + ToolConfigs = new ChangeTrackingDictionary(); } /// Initializes a new instance of . @@ -21,16 +22,22 @@ public InternalCodeInterpreterTool() : base(ToolType.CodeInterpreter) /// Keeps track of any properties unknown to the library. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// /// /// The code interpreter container. Can be a container ID or an object that /// specifies uploaded file IDs to make available to your code, along with an /// optional `memory_limit` setting. /// If not provided, the service assumes auto. /// - internal InternalCodeInterpreterTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, BinaryData container) : base(@type, additionalBinaryDataProperties) + internal InternalCodeInterpreterTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, IDictionary toolConfigs, BinaryData container) : base(@type, additionalBinaryDataProperties) { Name = name; Description = description; + ToolConfigs = toolConfigs; Container = container; } @@ -40,6 +47,13 @@ internal InternalCodeInterpreterTool(ToolType @type, IDictionary Optional user-defined description for this tool or configuration. public string Description { get; set; } + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + public IDictionary ToolConfigs { get; } + /// /// The code interpreter container. Can be a container ID or an object that /// specifies uploaded file IDs to make available to your code, along with an diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/InternalFileSearchTool.Serialization.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/InternalFileSearchTool.Serialization.cs index 1077752a92cd..b7319c10b538 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/InternalFileSearchTool.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/InternalFileSearchTool.Serialization.cs @@ -120,6 +120,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsCollectionDefined(ToolConfigs)) + { + writer.WritePropertyName("tool_configs"u8); + writer.WriteStartObject(); + foreach (var item in ToolConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } } /// The JSON reader. @@ -155,6 +166,7 @@ internal static InternalFileSearchTool DeserializeInternalFileSearchTool(JsonEle BinaryData filters = default; string name = default; string description = default; + IDictionary toolConfigs = default; foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("type"u8)) @@ -217,6 +229,20 @@ internal static InternalFileSearchTool DeserializeInternalFileSearchTool(JsonEle description = prop.Value.GetString(); continue; } + if (prop.NameEquals("tool_configs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, ToolConfig.DeserializeToolConfig(prop0.Value, options)); + } + toolConfigs = dictionary; + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); @@ -230,7 +256,8 @@ internal static InternalFileSearchTool DeserializeInternalFileSearchTool(JsonEle rankingOptions, filters, name, - description); + description, + toolConfigs ?? new ChangeTrackingDictionary()); } } } diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/InternalFileSearchTool.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/InternalFileSearchTool.cs index 07a31bd67fcb..b8bf364b90e7 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/InternalFileSearchTool.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/InternalFileSearchTool.cs @@ -17,6 +17,7 @@ internal partial class InternalFileSearchTool : ProjectsAgentTool public InternalFileSearchTool(IEnumerable vectorStoreIds) : base(ToolType.FileSearch) { VectorStoreIds = vectorStoreIds.ToList(); + ToolConfigs = new ChangeTrackingDictionary(); } /// Initializes a new instance of . @@ -28,7 +29,12 @@ public InternalFileSearchTool(IEnumerable vectorStoreIds) : base(ToolTyp /// /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. - internal InternalFileSearchTool(ToolType @type, IDictionary additionalBinaryDataProperties, IList vectorStoreIds, long? maxNumResults, InternalRankingOptions rankingOptions, BinaryData filters, string name, string description) : base(@type, additionalBinaryDataProperties) + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + internal InternalFileSearchTool(ToolType @type, IDictionary additionalBinaryDataProperties, IList vectorStoreIds, long? maxNumResults, InternalRankingOptions rankingOptions, BinaryData filters, string name, string description, IDictionary toolConfigs) : base(@type, additionalBinaryDataProperties) { VectorStoreIds = vectorStoreIds; MaxNumResults = maxNumResults; @@ -36,6 +42,7 @@ internal InternalFileSearchTool(ToolType @type, IDictionary Filters = filters; Name = name; Description = description; + ToolConfigs = toolConfigs; } /// The IDs of the vector stores to search. @@ -93,5 +100,12 @@ internal InternalFileSearchTool(ToolType @type, IDictionary /// Optional user-defined description for this tool or configuration. public string Description { get; set; } + + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + public IDictionary ToolConfigs { get; } } } diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/InternalFunctionShellToolParam.Serialization.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/InternalFunctionShellToolParam.Serialization.cs index c1179d2a7f38..cf3a52d6d8be 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/InternalFunctionShellToolParam.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/InternalFunctionShellToolParam.Serialization.cs @@ -86,6 +86,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsCollectionDefined(ToolConfigs)) + { + writer.WritePropertyName("tool_configs"u8); + writer.WriteStartObject(); + foreach (var item in ToolConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } } /// The JSON reader. @@ -118,6 +129,7 @@ internal static InternalFunctionShellToolParam DeserializeInternalFunctionShellT FunctionShellToolParamEnvironment environment = default; string name = default; string description = default; + IDictionary toolConfigs = default; foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("type"u8)) @@ -145,12 +157,32 @@ internal static InternalFunctionShellToolParam DeserializeInternalFunctionShellT description = prop.Value.GetString(); continue; } + if (prop.NameEquals("tool_configs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, ToolConfig.DeserializeToolConfig(prop0.Value, options)); + } + toolConfigs = dictionary; + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalFunctionShellToolParam(@type, additionalBinaryDataProperties, environment, name, description); + return new InternalFunctionShellToolParam( + @type, + additionalBinaryDataProperties, + environment, + name, + description, + toolConfigs ?? new ChangeTrackingDictionary()); } } } diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/InternalFunctionShellToolParam.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/InternalFunctionShellToolParam.cs index c9fd664bf333..fa40eb06a469 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/InternalFunctionShellToolParam.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/InternalFunctionShellToolParam.cs @@ -13,6 +13,7 @@ internal partial class InternalFunctionShellToolParam : ProjectsAgentTool /// Initializes a new instance of . public InternalFunctionShellToolParam() : base(ToolType.Shell) { + ToolConfigs = new ChangeTrackingDictionary(); } /// Initializes a new instance of . @@ -21,11 +22,17 @@ public InternalFunctionShellToolParam() : base(ToolType.Shell) /// /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. - internal InternalFunctionShellToolParam(ToolType @type, IDictionary additionalBinaryDataProperties, FunctionShellToolParamEnvironment environment, string name, string description) : base(@type, additionalBinaryDataProperties) + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + internal InternalFunctionShellToolParam(ToolType @type, IDictionary additionalBinaryDataProperties, FunctionShellToolParamEnvironment environment, string name, string description, IDictionary toolConfigs) : base(@type, additionalBinaryDataProperties) { Environment = environment; Name = name; Description = description; + ToolConfigs = toolConfigs; } /// Gets or sets the Environment. @@ -36,5 +43,12 @@ internal InternalFunctionShellToolParam(ToolType @type, IDictionary Optional user-defined description for this tool or configuration. public string Description { get; set; } + + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + public IDictionary ToolConfigs { get; } } } diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/InternalImageGenTool.Serialization.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/InternalImageGenTool.Serialization.cs index 17cac27182f2..8d1ac7207340 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/InternalImageGenTool.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/InternalImageGenTool.Serialization.cs @@ -136,6 +136,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsCollectionDefined(ToolConfigs)) + { + writer.WritePropertyName("tool_configs"u8); + writer.WriteStartObject(); + foreach (var item in ToolConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } } /// The JSON reader. @@ -178,6 +189,7 @@ internal static InternalImageGenTool DeserializeInternalImageGenTool(JsonElement ImageGenActionEnum? action = default; string name = default; string description = default; + IDictionary toolConfigs = default; foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("type"u8)) @@ -295,6 +307,20 @@ internal static InternalImageGenTool DeserializeInternalImageGenTool(JsonElement description = prop.Value.GetString(); continue; } + if (prop.NameEquals("tool_configs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, ToolConfig.DeserializeToolConfig(prop0.Value, options)); + } + toolConfigs = dictionary; + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); @@ -315,7 +341,8 @@ internal static InternalImageGenTool DeserializeInternalImageGenTool(JsonElement partialImages, action, name, - description); + description, + toolConfigs ?? new ChangeTrackingDictionary()); } } } diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/InternalImageGenTool.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/InternalImageGenTool.cs index 94b11e7f33b5..24879aa6c073 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/InternalImageGenTool.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/InternalImageGenTool.cs @@ -13,6 +13,7 @@ internal partial class InternalImageGenTool : ProjectsAgentTool /// Initializes a new instance of . public InternalImageGenTool() : base(ToolType.ImageGeneration) { + ToolConfigs = new ChangeTrackingDictionary(); } /// Initializes a new instance of . @@ -46,7 +47,12 @@ public InternalImageGenTool() : base(ToolType.ImageGeneration) /// Whether to generate a new image or edit an existing image. Default: `auto`. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. - internal InternalImageGenTool(ToolType @type, IDictionary additionalBinaryDataProperties, ImageGenToolModel? model, ImageGenToolQuality? quality, ImageGenToolSize? size, ImageGenToolOutputFormat? outputFormat, long? outputCompression, ImageGenToolModeration? moderation, ImageGenToolBackground? background, InputFidelity? inputFidelity, InternalImageGenToolInputImageMask inputImageMask, long? partialImages, ImageGenActionEnum? action, string name, string description) : base(@type, additionalBinaryDataProperties) + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + internal InternalImageGenTool(ToolType @type, IDictionary additionalBinaryDataProperties, ImageGenToolModel? model, ImageGenToolQuality? quality, ImageGenToolSize? size, ImageGenToolOutputFormat? outputFormat, long? outputCompression, ImageGenToolModeration? moderation, ImageGenToolBackground? background, InputFidelity? inputFidelity, InternalImageGenToolInputImageMask inputImageMask, long? partialImages, ImageGenActionEnum? action, string name, string description, IDictionary toolConfigs) : base(@type, additionalBinaryDataProperties) { Model = model; Quality = quality; @@ -61,6 +67,7 @@ internal InternalImageGenTool(ToolType @type, IDictionary ad Action = action; Name = name; Description = description; + ToolConfigs = toolConfigs; } /// Gets or sets the Model. @@ -116,5 +123,12 @@ internal InternalImageGenTool(ToolType @type, IDictionary ad /// Optional user-defined description for this tool or configuration. public string Description { get; set; } + + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + public IDictionary ToolConfigs { get; } } } diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/InternalLocalShellTool.Serialization.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/InternalLocalShellTool.Serialization.cs index 63ed608d6768..55a5e9daeafd 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/InternalLocalShellTool.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/InternalLocalShellTool.Serialization.cs @@ -81,6 +81,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsCollectionDefined(ToolConfigs)) + { + writer.WritePropertyName("tool_configs"u8); + writer.WriteStartObject(); + foreach (var item in ToolConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } } /// The JSON reader. @@ -112,6 +123,7 @@ internal static InternalLocalShellTool DeserializeInternalLocalShellTool(JsonEle IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); string name = default; string description = default; + IDictionary toolConfigs = default; foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("type"u8)) @@ -129,12 +141,26 @@ internal static InternalLocalShellTool DeserializeInternalLocalShellTool(JsonEle description = prop.Value.GetString(); continue; } + if (prop.NameEquals("tool_configs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, ToolConfig.DeserializeToolConfig(prop0.Value, options)); + } + toolConfigs = dictionary; + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalLocalShellTool(@type, additionalBinaryDataProperties, name, description); + return new InternalLocalShellTool(@type, additionalBinaryDataProperties, name, description, toolConfigs ?? new ChangeTrackingDictionary()); } } } diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/InternalLocalShellTool.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/InternalLocalShellTool.cs index 877018dbfdf0..47e182d5d997 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/InternalLocalShellTool.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/InternalLocalShellTool.cs @@ -13,6 +13,7 @@ internal partial class InternalLocalShellTool : ProjectsAgentTool /// Initializes a new instance of . public InternalLocalShellTool() : base(ToolType.LocalShell) { + ToolConfigs = new ChangeTrackingDictionary(); } /// Initializes a new instance of . @@ -20,10 +21,16 @@ public InternalLocalShellTool() : base(ToolType.LocalShell) /// Keeps track of any properties unknown to the library. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. - internal InternalLocalShellTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description) : base(@type, additionalBinaryDataProperties) + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + internal InternalLocalShellTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, IDictionary toolConfigs) : base(@type, additionalBinaryDataProperties) { Name = name; Description = description; + ToolConfigs = toolConfigs; } /// Optional user-defined name for this tool or configuration. @@ -31,5 +38,12 @@ internal InternalLocalShellTool(ToolType @type, IDictionary /// Optional user-defined description for this tool or configuration. public string Description { get; set; } + + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + public IDictionary ToolConfigs { get; } } } diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/InternalMCPTool.Serialization.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/InternalMCPTool.Serialization.cs index 35a5c6a686ee..df772672a31b 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/InternalMCPTool.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/InternalMCPTool.Serialization.cs @@ -148,6 +148,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("project_connection_id"u8); writer.WriteStringValue(ProjectConnectionId); } + if (Optional.IsCollectionDefined(ToolConfigs)) + { + writer.WritePropertyName("tool_configs"u8); + writer.WriteStartObject(); + foreach (var item in ToolConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } } /// The JSON reader. @@ -187,6 +198,7 @@ internal static InternalMCPTool DeserializeInternalMCPTool(JsonElement element, BinaryData requireApproval = default; bool? deferLoading = default; string projectConnectionId = default; + IDictionary toolConfigs = default; foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("type"u8)) @@ -282,6 +294,20 @@ internal static InternalMCPTool DeserializeInternalMCPTool(JsonElement element, projectConnectionId = prop.Value.GetString(); continue; } + if (prop.NameEquals("tool_configs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, ToolConfig.DeserializeToolConfig(prop0.Value, options)); + } + toolConfigs = dictionary; + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); @@ -299,7 +325,8 @@ internal static InternalMCPTool DeserializeInternalMCPTool(JsonElement element, allowedTools, requireApproval, deferLoading, - projectConnectionId); + projectConnectionId, + toolConfigs ?? new ChangeTrackingDictionary()); } } } diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/InternalMCPTool.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/InternalMCPTool.cs index 044fa2e27a1f..cf1b516ef9ed 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/InternalMCPTool.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/InternalMCPTool.cs @@ -17,6 +17,7 @@ public InternalMCPTool(string serverLabel) : base(ToolType.Mcp) { ServerLabel = serverLabel; Headers = new ChangeTrackingDictionary(); + ToolConfigs = new ChangeTrackingDictionary(); } /// Initializes a new instance of . @@ -45,7 +46,12 @@ public InternalMCPTool(string serverLabel) : base(ToolType.Mcp) /// /// Whether this MCP tool is deferred and discovered via tool search. /// The connection ID in the project for the MCP server. The connection stores authentication and other connection details needed to connect to the MCP server. - internal InternalMCPTool(ToolType @type, IDictionary additionalBinaryDataProperties, string serverLabel, Uri serverUrl, MCPToolConnectorId? connectorId, string authorization, string serverDescription, IDictionary headers, BinaryData allowedTools, BinaryData requireApproval, bool? deferLoading, string projectConnectionId) : base(@type, additionalBinaryDataProperties) + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + internal InternalMCPTool(ToolType @type, IDictionary additionalBinaryDataProperties, string serverLabel, Uri serverUrl, MCPToolConnectorId? connectorId, string authorization, string serverDescription, IDictionary headers, BinaryData allowedTools, BinaryData requireApproval, bool? deferLoading, string projectConnectionId, IDictionary toolConfigs) : base(@type, additionalBinaryDataProperties) { ServerLabel = serverLabel; ServerUrl = serverUrl; @@ -57,6 +63,7 @@ internal InternalMCPTool(ToolType @type, IDictionary additio RequireApproval = requireApproval; DeferLoading = deferLoading; ProjectConnectionId = projectConnectionId; + ToolConfigs = toolConfigs; } /// A label for this MCP server, used to identify it in tool calls. @@ -180,5 +187,12 @@ internal InternalMCPTool(ToolType @type, IDictionary additio /// The connection ID in the project for the MCP server. The connection stores authentication and other connection details needed to connect to the MCP server. public string ProjectConnectionId { get; set; } + + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + public IDictionary ToolConfigs { get; } } } diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/InternalWebSearchTool.Serialization.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/InternalWebSearchTool.Serialization.cs index bc86bb88d82e..9d9a47360752 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/InternalWebSearchTool.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/InternalWebSearchTool.Serialization.cs @@ -96,6 +96,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsCollectionDefined(ToolConfigs)) + { + writer.WritePropertyName("tool_configs"u8); + writer.WriteStartObject(); + foreach (var item in ToolConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } if (Optional.IsDefined(CustomSearchConfiguration)) { writer.WritePropertyName("custom_search_configuration"u8); @@ -135,6 +146,7 @@ internal static InternalWebSearchTool DeserializeInternalWebSearchTool(JsonEleme WebSearchToolSearchContextSize? searchContextSize = default; string name = default; string description = default; + IDictionary toolConfigs = default; ProjectWebSearchConfiguration customSearchConfiguration = default; foreach (var prop in element.EnumerateObject()) { @@ -182,6 +194,20 @@ internal static InternalWebSearchTool DeserializeInternalWebSearchTool(JsonEleme description = prop.Value.GetString(); continue; } + if (prop.NameEquals("tool_configs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, ToolConfig.DeserializeToolConfig(prop0.Value, options)); + } + toolConfigs = dictionary; + continue; + } if (prop.NameEquals("custom_search_configuration"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -204,6 +230,7 @@ internal static InternalWebSearchTool DeserializeInternalWebSearchTool(JsonEleme searchContextSize, name, description, + toolConfigs ?? new ChangeTrackingDictionary(), customSearchConfiguration); } } diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/InternalWebSearchTool.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/InternalWebSearchTool.cs index 408c31552248..9bf0446f97dc 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/InternalWebSearchTool.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/InternalWebSearchTool.cs @@ -13,6 +13,7 @@ internal partial class InternalWebSearchTool : ProjectsAgentTool /// Initializes a new instance of . public InternalWebSearchTool() : base(ToolType.WebSearch) { + ToolConfigs = new ChangeTrackingDictionary(); } /// Initializes a new instance of . @@ -23,17 +24,23 @@ public InternalWebSearchTool() : base(ToolType.WebSearch) /// High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// /// /// The project connections attached to this tool. There can be a maximum of 1 connection /// resource attached to the tool. /// - internal InternalWebSearchTool(ToolType @type, IDictionary additionalBinaryDataProperties, WebSearchToolFilters filters, WebSearchApproximateLocation userLocation, WebSearchToolSearchContextSize? searchContextSize, string name, string description, ProjectWebSearchConfiguration customSearchConfiguration) : base(@type, additionalBinaryDataProperties) + internal InternalWebSearchTool(ToolType @type, IDictionary additionalBinaryDataProperties, WebSearchToolFilters filters, WebSearchApproximateLocation userLocation, WebSearchToolSearchContextSize? searchContextSize, string name, string description, IDictionary toolConfigs, ProjectWebSearchConfiguration customSearchConfiguration) : base(@type, additionalBinaryDataProperties) { Filters = filters; UserLocation = userLocation; SearchContextSize = searchContextSize; Name = name; Description = description; + ToolConfigs = toolConfigs; CustomSearchConfiguration = customSearchConfiguration; } @@ -52,6 +59,13 @@ internal InternalWebSearchTool(ToolType @type, IDictionary a /// Optional user-defined description for this tool or configuration. public string Description { get; set; } + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + public IDictionary ToolConfigs { get; } + /// /// The project connections attached to this tool. There can be a maximum of 1 connection /// resource attached to the tool. diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/IsolationKeySource.Serialization.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/IsolationKeySource.Serialization.cs new file mode 100644 index 000000000000..b6778b025f90 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/IsolationKeySource.Serialization.cs @@ -0,0 +1,138 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.AI.Projects.Agents +{ + /// + /// The IsolationKeySource. + /// Please note this is the abstract base class. The derived classes available for instantiation are: and . + /// + [PersistableModelProxy(typeof(UnknownIsolationKeySource))] + public abstract partial class IsolationKeySource : IJsonModel + { + /// Initializes a new instance of for deserialization. + internal IsolationKeySource() + { + } + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual IsolationKeySource PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeIsolationKeySource(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(IsolationKeySource)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsAgentsContext.Default); + default: + throw new FormatException($"The model {nameof(IsolationKeySource)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + IsolationKeySource IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(IsolationKeySource)} does not support writing '{format}' format."); + } + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.ToString()); + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + IsolationKeySource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual IsolationKeySource JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(IsolationKeySource)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeIsolationKeySource(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static IsolationKeySource DeserializeIsolationKeySource(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("kind"u8, out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "Entra": + return EntraIsolationKeySource.DeserializeEntraIsolationKeySource(element, options); + case "Header": + return HeaderIsolationKeySource.DeserializeHeaderIsolationKeySource(element, options); + } + } + return UnknownIsolationKeySource.DeserializeUnknownIsolationKeySource(element, options); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/IsolationKeySource.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/IsolationKeySource.cs new file mode 100644 index 000000000000..047170f5f8c4 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/IsolationKeySource.cs @@ -0,0 +1,38 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects.Agents +{ + /// + /// The IsolationKeySource. + /// Please note this is the abstract base class. The derived classes available for instantiation are: and . + /// + public abstract partial class IsolationKeySource + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + /// + private protected IsolationKeySource(IsolationKeySourceKind kind) + { + Kind = kind; + } + + /// Initializes a new instance of . + /// + /// Keeps track of any properties unknown to the library. + internal IsolationKeySource(IsolationKeySourceKind kind, IDictionary additionalBinaryDataProperties) + { + Kind = kind; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// Gets or sets the Kind. + internal IsolationKeySourceKind Kind { get; set; } + } +} diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/IsolationKeySourceKind.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/IsolationKeySourceKind.cs new file mode 100644 index 000000000000..6fa5df9a6a9c --- /dev/null +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/IsolationKeySourceKind.cs @@ -0,0 +1,65 @@ +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.AI.Projects.Agents +{ + /// + internal readonly partial struct IsolationKeySourceKind : IEquatable + { + private readonly string _value; + private const string EntraValue = "Entra"; + private const string HeaderValue = "Header"; + + /// Initializes a new instance of . + /// The value. + /// is null. + public IsolationKeySourceKind(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + + /// Gets the Entra. + public static IsolationKeySourceKind Entra { get; } = new IsolationKeySourceKind(EntraValue); + + /// Gets the Header. + public static IsolationKeySourceKind Header { get; } = new IsolationKeySourceKind(HeaderValue); + + /// Determines if two values are the same. + /// The left value to compare. + /// The right value to compare. + public static bool operator ==(IsolationKeySourceKind left, IsolationKeySourceKind right) => left.Equals(right); + + /// Determines if two values are not the same. + /// The left value to compare. + /// The right value to compare. + public static bool operator !=(IsolationKeySourceKind left, IsolationKeySourceKind right) => !left.Equals(right); + + /// Converts a string to a . + /// The value. + public static implicit operator IsolationKeySourceKind(string value) => new IsolationKeySourceKind(value); + + /// Converts a string to a . + /// The value. + public static implicit operator IsolationKeySourceKind?(string value) => value == null ? null : new IsolationKeySourceKind(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is IsolationKeySourceKind other && Equals(other); + + /// + public bool Equals(IsolationKeySourceKind 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.Agents/src/Generated/Models/MemorySearchPreviewTool.Serialization.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/MemorySearchPreviewTool.Serialization.cs index bda33fab5c92..8a943a6d99cb 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/MemorySearchPreviewTool.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/MemorySearchPreviewTool.Serialization.cs @@ -87,6 +87,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsCollectionDefined(ToolConfigs)) + { + writer.WritePropertyName("tool_configs"u8); + writer.WriteStartObject(); + foreach (var item in ToolConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } writer.WritePropertyName("memory_store_name"u8); writer.WriteStringValue(MemoryStoreName); writer.WritePropertyName("scope"u8); @@ -132,6 +143,7 @@ internal static MemorySearchPreviewTool DeserializeMemorySearchPreviewTool(JsonE IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); string name = default; string description = default; + IDictionary toolConfigs = default; string memoryStoreName = default; string scope = default; MemorySearchToolOptions searchOptions = default; @@ -153,6 +165,20 @@ internal static MemorySearchPreviewTool DeserializeMemorySearchPreviewTool(JsonE description = prop.Value.GetString(); continue; } + if (prop.NameEquals("tool_configs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, ToolConfig.DeserializeToolConfig(prop0.Value, options)); + } + toolConfigs = dictionary; + continue; + } if (prop.NameEquals("memory_store_name"u8)) { memoryStoreName = prop.Value.GetString(); @@ -191,6 +217,7 @@ internal static MemorySearchPreviewTool DeserializeMemorySearchPreviewTool(JsonE additionalBinaryDataProperties, name, description, + toolConfigs ?? new ChangeTrackingDictionary(), memoryStoreName, scope, searchOptions, diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/MemorySearchPreviewTool.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/MemorySearchPreviewTool.cs index f4e17b0ed299..bf4ae64dae5b 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/MemorySearchPreviewTool.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/MemorySearchPreviewTool.cs @@ -24,6 +24,7 @@ public MemorySearchPreviewTool(string memoryStoreName, string scope) : base(Tool Argument.AssertNotNull(memoryStoreName, nameof(memoryStoreName)); Argument.AssertNotNull(scope, nameof(scope)); + ToolConfigs = new ChangeTrackingDictionary(); MemoryStoreName = memoryStoreName; Scope = scope; } @@ -33,6 +34,11 @@ public MemorySearchPreviewTool(string memoryStoreName, string scope) : base(Tool /// Keeps track of any properties unknown to the library. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// /// The name of the memory store to use. /// /// The namespace used to group and isolate memories, such as a user ID. @@ -41,10 +47,11 @@ public MemorySearchPreviewTool(string memoryStoreName, string scope) : base(Tool /// /// Options for searching the memory store. /// Time to wait before updating memories after inactivity (seconds). Default 300. - internal MemorySearchPreviewTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, string memoryStoreName, string scope, MemorySearchToolOptions searchOptions, int? updateDelayInSecs) : base(@type, additionalBinaryDataProperties) + internal MemorySearchPreviewTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, IDictionary toolConfigs, string memoryStoreName, string scope, MemorySearchToolOptions searchOptions, int? updateDelayInSecs) : base(@type, additionalBinaryDataProperties) { Name = name; Description = description; + ToolConfigs = toolConfigs; MemoryStoreName = memoryStoreName; Scope = scope; SearchOptions = searchOptions; @@ -57,6 +64,13 @@ internal MemorySearchPreviewTool(ToolType @type, IDictionary /// Optional user-defined description for this tool or configuration. public string Description { get; set; } + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + public IDictionary ToolConfigs { get; } + /// The name of the memory store to use. public string MemoryStoreName { get; set; } diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/MicrosoftFabricPreviewTool.Serialization.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/MicrosoftFabricPreviewTool.Serialization.cs index 8a7073bbdbf5..2b97ecdcbeff 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/MicrosoftFabricPreviewTool.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/MicrosoftFabricPreviewTool.Serialization.cs @@ -87,6 +87,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsCollectionDefined(ToolConfigs)) + { + writer.WritePropertyName("tool_configs"u8); + writer.WriteStartObject(); + foreach (var item in ToolConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } writer.WritePropertyName("fabric_dataagent_preview"u8); writer.WriteObjectValue(ToolOptions, options); } @@ -120,6 +131,7 @@ internal static MicrosoftFabricPreviewTool DeserializeMicrosoftFabricPreviewTool IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); string name = default; string description = default; + IDictionary toolConfigs = default; FabricDataAgentToolOptions toolOptions = default; foreach (var prop in element.EnumerateObject()) { @@ -138,6 +150,20 @@ internal static MicrosoftFabricPreviewTool DeserializeMicrosoftFabricPreviewTool description = prop.Value.GetString(); continue; } + if (prop.NameEquals("tool_configs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, ToolConfig.DeserializeToolConfig(prop0.Value, options)); + } + toolConfigs = dictionary; + continue; + } if (prop.NameEquals("fabric_dataagent_preview"u8)) { toolOptions = FabricDataAgentToolOptions.DeserializeFabricDataAgentToolOptions(prop.Value, options); @@ -148,7 +174,13 @@ internal static MicrosoftFabricPreviewTool DeserializeMicrosoftFabricPreviewTool additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new MicrosoftFabricPreviewTool(@type, additionalBinaryDataProperties, name, description, toolOptions); + return new MicrosoftFabricPreviewTool( + @type, + additionalBinaryDataProperties, + name, + description, + toolConfigs ?? new ChangeTrackingDictionary(), + toolOptions); } } } diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/MicrosoftFabricPreviewTool.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/MicrosoftFabricPreviewTool.cs index d55747419e30..63ef2b824cff 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/MicrosoftFabricPreviewTool.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/MicrosoftFabricPreviewTool.cs @@ -18,6 +18,7 @@ public MicrosoftFabricPreviewTool(FabricDataAgentToolOptions toolOptions) : base { Argument.AssertNotNull(toolOptions, nameof(toolOptions)); + ToolConfigs = new ChangeTrackingDictionary(); ToolOptions = toolOptions; } @@ -26,11 +27,17 @@ public MicrosoftFabricPreviewTool(FabricDataAgentToolOptions toolOptions) : base /// Keeps track of any properties unknown to the library. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// /// The fabric data agent tool parameters. - internal MicrosoftFabricPreviewTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, FabricDataAgentToolOptions toolOptions) : base(@type, additionalBinaryDataProperties) + internal MicrosoftFabricPreviewTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, IDictionary toolConfigs, FabricDataAgentToolOptions toolOptions) : base(@type, additionalBinaryDataProperties) { Name = name; Description = description; + ToolConfigs = toolConfigs; ToolOptions = toolOptions; } @@ -40,6 +47,13 @@ internal MicrosoftFabricPreviewTool(ToolType @type, IDictionary Optional user-defined description for this tool or configuration. public string Description { get; set; } + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + public IDictionary ToolConfigs { get; } + /// The fabric data agent tool parameters. public FabricDataAgentToolOptions ToolOptions { get; set; } } diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/OpenAPITool.Serialization.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/OpenAPITool.Serialization.cs index a7cb016d4e38..1c32bdd33095 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/OpenAPITool.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/OpenAPITool.Serialization.cs @@ -79,6 +79,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); writer.WritePropertyName("openapi"u8); writer.WriteObjectValue(FunctionDefinition, options); + if (Optional.IsCollectionDefined(ToolConfigs)) + { + writer.WritePropertyName("tool_configs"u8); + writer.WriteStartObject(); + foreach (var item in ToolConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } } /// The JSON reader. @@ -109,6 +120,7 @@ internal static OpenAPITool DeserializeOpenAPITool(JsonElement element, ModelRea ToolType @type = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); OpenApiFunctionDefinition functionDefinition = default; + IDictionary toolConfigs = default; foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("type"u8)) @@ -121,12 +133,26 @@ internal static OpenAPITool DeserializeOpenAPITool(JsonElement element, ModelRea functionDefinition = OpenApiFunctionDefinition.DeserializeOpenApiFunctionDefinition(prop.Value, options); continue; } + if (prop.NameEquals("tool_configs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, ToolConfig.DeserializeToolConfig(prop0.Value, options)); + } + toolConfigs = dictionary; + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new OpenAPITool(@type, additionalBinaryDataProperties, functionDefinition); + return new OpenAPITool(@type, additionalBinaryDataProperties, functionDefinition, toolConfigs ?? new ChangeTrackingDictionary()); } } } diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/OpenAPITool.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/OpenAPITool.cs index ee2f5a5e14be..1867b3399ba6 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/OpenAPITool.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/OpenAPITool.cs @@ -19,18 +19,32 @@ public OpenAPITool(OpenApiFunctionDefinition functionDefinition) : base(ToolType Argument.AssertNotNull(functionDefinition, nameof(functionDefinition)); FunctionDefinition = functionDefinition; + ToolConfigs = new ChangeTrackingDictionary(); } /// Initializes a new instance of . /// /// Keeps track of any properties unknown to the library. /// The openapi function definition. - internal OpenAPITool(ToolType @type, IDictionary additionalBinaryDataProperties, OpenApiFunctionDefinition functionDefinition) : base(@type, additionalBinaryDataProperties) + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + internal OpenAPITool(ToolType @type, IDictionary additionalBinaryDataProperties, OpenApiFunctionDefinition functionDefinition, IDictionary toolConfigs) : base(@type, additionalBinaryDataProperties) { FunctionDefinition = functionDefinition; + ToolConfigs = toolConfigs; } /// The openapi function definition. public OpenApiFunctionDefinition FunctionDefinition { get; set; } + + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + public IDictionary ToolConfigs { get; } } } diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/ProjectsAgentDefinition.Serialization.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/ProjectsAgentDefinition.Serialization.cs index 086a5c1fe652..a3a8f642c811 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/ProjectsAgentDefinition.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/ProjectsAgentDefinition.Serialization.cs @@ -10,7 +10,7 @@ namespace Azure.AI.Projects.Agents { /// /// The ProjectsAgentDefinition. - /// Please note this is the abstract base class. The derived classes available for instantiation are: , , and . + /// Please note this is the abstract base class. The derived classes available for instantiation are: , , , and . /// [PersistableModelProxy(typeof(UnknownAgentDefinition))] public abstract partial class ProjectsAgentDefinition : IJsonModel @@ -137,6 +137,8 @@ internal static ProjectsAgentDefinition DeserializeProjectsAgentDefinition(JsonE return DeclarativeAgentDefinition.DeserializeDeclarativeAgentDefinition(element, options); case "workflow": return WorkflowAgentDefinition.DeserializeWorkflowAgentDefinition(element, options); + case "external": + return ExternalAgentDefinition.DeserializeExternalAgentDefinition(element, options); } } return UnknownAgentDefinition.DeserializeUnknownAgentDefinition(element, options); diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/ProjectsAgentDefinition.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/ProjectsAgentDefinition.cs index 4993354cad11..caf0f84d5fb4 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/ProjectsAgentDefinition.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/ProjectsAgentDefinition.cs @@ -9,7 +9,7 @@ namespace Azure.AI.Projects.Agents { /// /// The ProjectsAgentDefinition. - /// Please note this is the abstract base class. The derived classes available for instantiation are: , , and . + /// Please note this is the abstract base class. The derived classes available for instantiation are: , , , and . /// public abstract partial class ProjectsAgentDefinition { diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/ProjectsAgentKind.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/ProjectsAgentKind.cs index 5bb963d38feb..c83c3dde6194 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/ProjectsAgentKind.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/ProjectsAgentKind.cs @@ -14,6 +14,7 @@ namespace Azure.AI.Projects.Agents private const string PromptValue = "prompt"; private const string HostedValue = "hosted"; private const string WorkflowValue = "workflow"; + private const string ExternalValue = "external"; /// Initializes a new instance of . /// The value. @@ -34,6 +35,9 @@ public ProjectsAgentKind(string value) /// Gets the Workflow. public static ProjectsAgentKind Workflow { get; } = new ProjectsAgentKind(WorkflowValue); + /// Gets the External. + public static ProjectsAgentKind External { get; } = new ProjectsAgentKind(ExternalValue); + /// Determines if two values are the same. /// The left value to compare. /// The right value to compare. diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/SharepointPreviewTool.Serialization.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/SharepointPreviewTool.Serialization.cs index 515556e402ee..6cd55f676c7b 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/SharepointPreviewTool.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/SharepointPreviewTool.Serialization.cs @@ -87,6 +87,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsCollectionDefined(ToolConfigs)) + { + writer.WritePropertyName("tool_configs"u8); + writer.WriteStartObject(); + foreach (var item in ToolConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } writer.WritePropertyName("sharepoint_grounding_preview"u8); writer.WriteObjectValue(ToolOptions, options); } @@ -120,6 +131,7 @@ internal static SharepointPreviewTool DeserializeSharepointPreviewTool(JsonEleme IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); string name = default; string description = default; + IDictionary toolConfigs = default; SharePointGroundingToolOptions toolOptions = default; foreach (var prop in element.EnumerateObject()) { @@ -138,6 +150,20 @@ internal static SharepointPreviewTool DeserializeSharepointPreviewTool(JsonEleme description = prop.Value.GetString(); continue; } + if (prop.NameEquals("tool_configs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, ToolConfig.DeserializeToolConfig(prop0.Value, options)); + } + toolConfigs = dictionary; + continue; + } if (prop.NameEquals("sharepoint_grounding_preview"u8)) { toolOptions = SharePointGroundingToolOptions.DeserializeSharePointGroundingToolOptions(prop.Value, options); @@ -148,7 +174,13 @@ internal static SharepointPreviewTool DeserializeSharepointPreviewTool(JsonEleme additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new SharepointPreviewTool(@type, additionalBinaryDataProperties, name, description, toolOptions); + return new SharepointPreviewTool( + @type, + additionalBinaryDataProperties, + name, + description, + toolConfigs ?? new ChangeTrackingDictionary(), + toolOptions); } } } diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/SharepointPreviewTool.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/SharepointPreviewTool.cs index a67da4a2d976..8688aa3e1748 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/SharepointPreviewTool.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/SharepointPreviewTool.cs @@ -18,6 +18,7 @@ public SharepointPreviewTool(SharePointGroundingToolOptions toolOptions) : base( { Argument.AssertNotNull(toolOptions, nameof(toolOptions)); + ToolConfigs = new ChangeTrackingDictionary(); ToolOptions = toolOptions; } @@ -26,11 +27,17 @@ public SharepointPreviewTool(SharePointGroundingToolOptions toolOptions) : base( /// Keeps track of any properties unknown to the library. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// /// The sharepoint grounding tool parameters. - internal SharepointPreviewTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, SharePointGroundingToolOptions toolOptions) : base(@type, additionalBinaryDataProperties) + internal SharepointPreviewTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, IDictionary toolConfigs, SharePointGroundingToolOptions toolOptions) : base(@type, additionalBinaryDataProperties) { Name = name; Description = description; + ToolConfigs = toolConfigs; ToolOptions = toolOptions; } @@ -40,6 +47,13 @@ internal SharepointPreviewTool(ToolType @type, IDictionary a /// Optional user-defined description for this tool or configuration. public string Description { get; set; } + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + public IDictionary ToolConfigs { get; } + /// The sharepoint grounding tool parameters. public SharePointGroundingToolOptions ToolOptions { get; set; } } diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/ToolConfig.Serialization.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/ToolConfig.Serialization.cs new file mode 100644 index 000000000000..3434fcaf997d --- /dev/null +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/ToolConfig.Serialization.cs @@ -0,0 +1,152 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.AI.Projects.Agents +{ + /// Per-tool configuration that controls tool visibility and search behavior. + public partial class ToolConfig : IJsonModel + { + /// The data to parse. + /// The client options for reading and writing models. + protected virtual ToolConfig PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeToolConfig(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ToolConfig)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsAgentsContext.Default); + default: + throw new FormatException($"The model {nameof(ToolConfig)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + ToolConfig IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ToolConfig)} does not support writing '{format}' format."); + } + if (Optional.IsDefined(Pin)) + { + writer.WritePropertyName("pin"u8); + writer.WriteBooleanValue(Pin.Value); + } + if (Optional.IsDefined(AdditionalSearchText)) + { + writer.WritePropertyName("additional_search_text"u8); + writer.WriteStringValue(AdditionalSearchText); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + ToolConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual ToolConfig JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ToolConfig)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeToolConfig(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static ToolConfig DeserializeToolConfig(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool? pin = default; + string additionalSearchText = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("pin"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + pin = prop.Value.GetBoolean(); + continue; + } + if (prop.NameEquals("additional_search_text"u8)) + { + additionalSearchText = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new ToolConfig(pin, additionalSearchText, additionalBinaryDataProperties); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/ToolConfig.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/ToolConfig.cs new file mode 100644 index 000000000000..2a69dbc56f27 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/ToolConfig.cs @@ -0,0 +1,50 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects.Agents +{ + /// Per-tool configuration that controls tool visibility and search behavior. + public partial class ToolConfig + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + public ToolConfig() + { + } + + /// Initializes a new instance of . + /// + /// When true, the tool is always included in agent context and visible in `tools/list`. + /// When false (default), the tool is hidden from `tools/list` and only discoverable via `tool_search`. + /// + /// + /// Additional text indexed for tool_search. Supplements the native tool description + /// to improve discoverability. Does not alter `tools/list` output. + /// + /// Keeps track of any properties unknown to the library. + internal ToolConfig(bool? pin, string additionalSearchText, IDictionary additionalBinaryDataProperties) + { + Pin = pin; + AdditionalSearchText = additionalSearchText; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// + /// When true, the tool is always included in agent context and visible in `tools/list`. + /// When false (default), the tool is hidden from `tools/list` and only discoverable via `tool_search`. + /// + public bool? Pin { get; set; } + + /// + /// Additional text indexed for tool_search. Supplements the native tool description + /// to improve discoverability. Does not alter `tools/list` output. + /// + public string AdditionalSearchText { get; set; } + } +} diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/ToolboxSearchPreviewTool.Serialization.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/ToolboxSearchPreviewTool.Serialization.cs index 418265374358..068e65e9b4cb 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/ToolboxSearchPreviewTool.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/ToolboxSearchPreviewTool.Serialization.cs @@ -86,6 +86,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsCollectionDefined(ToolConfigs)) + { + writer.WritePropertyName("tool_configs"u8); + writer.WriteStartObject(); + foreach (var item in ToolConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } } /// The JSON reader. @@ -117,6 +128,7 @@ internal static ToolboxSearchPreviewTool DeserializeToolboxSearchPreviewTool(Jso IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); string name = default; string description = default; + IDictionary toolConfigs = default; foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("type"u8)) @@ -134,12 +146,26 @@ internal static ToolboxSearchPreviewTool DeserializeToolboxSearchPreviewTool(Jso description = prop.Value.GetString(); continue; } + if (prop.NameEquals("tool_configs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, ToolConfig.DeserializeToolConfig(prop0.Value, options)); + } + toolConfigs = dictionary; + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ToolboxSearchPreviewTool(@type, additionalBinaryDataProperties, name, description); + return new ToolboxSearchPreviewTool(@type, additionalBinaryDataProperties, name, description, toolConfigs ?? new ChangeTrackingDictionary()); } } } diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/ToolboxSearchPreviewTool.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/ToolboxSearchPreviewTool.cs index 80d88fd335e9..0684529660d8 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/ToolboxSearchPreviewTool.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/ToolboxSearchPreviewTool.cs @@ -18,6 +18,7 @@ public partial class ToolboxSearchPreviewTool : ProjectsAgentTool /// Initializes a new instance of . public ToolboxSearchPreviewTool() : base(ToolType.ToolboxSearchPreview) { + ToolConfigs = new ChangeTrackingDictionary(); } /// Initializes a new instance of . @@ -25,10 +26,16 @@ public ToolboxSearchPreviewTool() : base(ToolType.ToolboxSearchPreview) /// Keeps track of any properties unknown to the library. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. - internal ToolboxSearchPreviewTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description) : base(@type, additionalBinaryDataProperties) + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + internal ToolboxSearchPreviewTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, IDictionary toolConfigs) : base(@type, additionalBinaryDataProperties) { Name = name; Description = description; + ToolConfigs = toolConfigs; } /// Optional user-defined name for this tool or configuration. @@ -36,5 +43,12 @@ internal ToolboxSearchPreviewTool(ToolType @type, IDictionary Optional user-defined description for this tool or configuration. public string Description { get; set; } + + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + public IDictionary ToolConfigs { get; } } } diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/UnknownIsolationKeySource.Serialization.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/UnknownIsolationKeySource.Serialization.cs new file mode 100644 index 000000000000..ac5880cf7c31 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/UnknownIsolationKeySource.Serialization.cs @@ -0,0 +1,122 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.AI.Projects.Agents +{ + internal partial class UnknownIsolationKeySource : IsolationKeySource, IJsonModel + { + /// Initializes a new instance of for deserialization. + internal UnknownIsolationKeySource() + { + } + + /// The data to parse. + /// The client options for reading and writing models. + protected override IsolationKeySource PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeIsolationKeySource(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(IsolationKeySource)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsAgentsContext.Default); + default: + throw new FormatException($"The model {nameof(IsolationKeySource)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + IsolationKeySource IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(IsolationKeySource)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + } + + /// The JSON reader. + /// The client options for reading and writing models. + IsolationKeySource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected override IsolationKeySource JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(IsolationKeySource)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeIsolationKeySource(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static UnknownIsolationKeySource DeserializeUnknownIsolationKeySource(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IsolationKeySourceKind kind = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("kind"u8)) + { + kind = new IsolationKeySourceKind(prop.Value.GetString()); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new UnknownIsolationKeySource(kind, additionalBinaryDataProperties); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/UnknownIsolationKeySource.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/UnknownIsolationKeySource.cs new file mode 100644 index 000000000000..9efc1399c7c1 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/UnknownIsolationKeySource.cs @@ -0,0 +1,19 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects.Agents +{ + internal partial class UnknownIsolationKeySource : IsolationKeySource + { + /// Initializes a new instance of . + /// + /// Keeps track of any properties unknown to the library. + internal UnknownIsolationKeySource(IsolationKeySourceKind kind, IDictionary additionalBinaryDataProperties) : base(kind != default ? kind : "unknown", additionalBinaryDataProperties) + { + } + } +} diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/WorkIQPreviewTool.Serialization.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/WorkIQPreviewTool.Serialization.cs index 14ff01862165..a16dd205a311 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/WorkIQPreviewTool.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/WorkIQPreviewTool.Serialization.cs @@ -89,6 +89,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsCollectionDefined(ToolConfigs)) + { + writer.WritePropertyName("tool_configs"u8); + writer.WriteStartObject(); + foreach (var item in ToolConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } } /// The JSON reader. @@ -121,6 +132,7 @@ internal static WorkIQPreviewTool DeserializeWorkIQPreviewTool(JsonElement eleme string projectConnectionId = default; string name = default; string description = default; + IDictionary toolConfigs = default; foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("type"u8)) @@ -143,12 +155,32 @@ internal static WorkIQPreviewTool DeserializeWorkIQPreviewTool(JsonElement eleme description = prop.Value.GetString(); continue; } + if (prop.NameEquals("tool_configs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, ToolConfig.DeserializeToolConfig(prop0.Value, options)); + } + toolConfigs = dictionary; + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new WorkIQPreviewTool(@type, additionalBinaryDataProperties, projectConnectionId, name, description); + return new WorkIQPreviewTool( + @type, + additionalBinaryDataProperties, + projectConnectionId, + name, + description, + toolConfigs ?? new ChangeTrackingDictionary()); } } } diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/WorkIQPreviewTool.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/WorkIQPreviewTool.cs index 6d192eed5910..92f80dff786f 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/WorkIQPreviewTool.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/Models/WorkIQPreviewTool.cs @@ -19,6 +19,7 @@ public WorkIQPreviewTool(string projectConnectionId) : base(ToolType.WorkIqPrevi Argument.AssertNotNull(projectConnectionId, nameof(projectConnectionId)); ProjectConnectionId = projectConnectionId; + ToolConfigs = new ChangeTrackingDictionary(); } /// Initializes a new instance of . @@ -27,11 +28,17 @@ public WorkIQPreviewTool(string projectConnectionId) : base(ToolType.WorkIqPrevi /// The ID of the WorkIQ project connection. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. - internal WorkIQPreviewTool(ToolType @type, IDictionary additionalBinaryDataProperties, string projectConnectionId, string name, string description) : base(@type, additionalBinaryDataProperties) + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + internal WorkIQPreviewTool(ToolType @type, IDictionary additionalBinaryDataProperties, string projectConnectionId, string name, string description, IDictionary toolConfigs) : base(@type, additionalBinaryDataProperties) { ProjectConnectionId = projectConnectionId; Name = name; Description = description; + ToolConfigs = toolConfigs; } /// The ID of the WorkIQ project connection. @@ -42,5 +49,12 @@ internal WorkIQPreviewTool(ToolType @type, IDictionary addit /// Optional user-defined description for this tool or configuration. public string Description { get; set; } + + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + public IDictionary ToolConfigs { get; } } } diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/ProjectsAgentsModelFactory.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/ProjectsAgentsModelFactory.cs index 33c0be41c389..f4a7dd8d24ef 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/src/Generated/ProjectsAgentsModelFactory.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Generated/ProjectsAgentsModelFactory.cs @@ -58,7 +58,7 @@ public static ProjectsAgentVersion ProjectsAgentVersion(IDictionary /// The ProjectsAgentDefinition. - /// Please note this is the abstract base class. The derived classes available for instantiation are: , , and . + /// Please note this is the abstract base class. The derived classes available for instantiation are: , , , and . /// /// /// Configuration for Responsible AI (RAI) content filtering and safety features. @@ -129,11 +129,39 @@ public static ProjectsAgentTool ProjectsAgentTool(string @type = default) /// The input definition information for a bing grounding search tool as used to configure an agent. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// /// The bing grounding search tool parameters. /// A new instance for mocking. - public static BingGroundingTool BingGroundingTool(string name = default, string description = default, BingGroundingSearchToolOptions searchToolOptions = default) + public static BingGroundingTool BingGroundingTool(string name = default, string description = default, IDictionary toolConfigs = default, BingGroundingSearchToolOptions searchToolOptions = default) + { + toolConfigs ??= new ChangeTrackingDictionary(); + + return new BingGroundingTool( + ToolType.BingGrounding, + additionalBinaryDataProperties: null, + name, + description, + toolConfigs, + searchToolOptions); + } + + /// Per-tool configuration that controls tool visibility and search behavior. + /// + /// When true, the tool is always included in agent context and visible in `tools/list`. + /// When false (default), the tool is hidden from `tools/list` and only discoverable via `tool_search`. + /// + /// + /// Additional text indexed for tool_search. Supplements the native tool description + /// to improve discoverability. Does not alter `tools/list` output. + /// + /// A new instance for mocking. + public static ToolConfig ToolConfig(bool? pin = default, string additionalSearchText = default) { - return new BingGroundingTool(ToolType.BingGrounding, additionalBinaryDataProperties: null, name, description, searchToolOptions); + return new ToolConfig(pin, additionalSearchText, additionalBinaryDataProperties: null); } /// The bing grounding search tool parameters. @@ -170,11 +198,24 @@ public static BingGroundingSearchConfiguration BingGroundingSearchConfiguration( /// The input definition information for a Microsoft Fabric tool as used to configure an agent. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// /// The fabric data agent tool parameters. /// A new instance for mocking. - public static MicrosoftFabricPreviewTool MicrosoftFabricPreviewTool(string name = default, string description = default, FabricDataAgentToolOptions toolOptions = default) + public static MicrosoftFabricPreviewTool MicrosoftFabricPreviewTool(string name = default, string description = default, IDictionary toolConfigs = default, FabricDataAgentToolOptions toolOptions = default) { - return new MicrosoftFabricPreviewTool(ToolType.FabricDataagentPreview, additionalBinaryDataProperties: null, name, description, toolOptions); + toolConfigs ??= new ChangeTrackingDictionary(); + + return new MicrosoftFabricPreviewTool( + ToolType.FabricDataagentPreview, + additionalBinaryDataProperties: null, + name, + description, + toolConfigs, + toolOptions); } /// The fabric data agent tool parameters. @@ -201,11 +242,24 @@ public static ToolProjectConnection ToolProjectConnection(string projectConnecti /// The input definition information for a sharepoint tool as used to configure an agent. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// /// The sharepoint grounding tool parameters. /// A new instance for mocking. - public static SharepointPreviewTool SharepointPreviewTool(string name = default, string description = default, SharePointGroundingToolOptions toolOptions = default) + public static SharepointPreviewTool SharepointPreviewTool(string name = default, string description = default, IDictionary toolConfigs = default, SharePointGroundingToolOptions toolOptions = default) { - return new SharepointPreviewTool(ToolType.SharepointGroundingPreview, additionalBinaryDataProperties: null, name, description, toolOptions); + toolConfigs ??= new ChangeTrackingDictionary(); + + return new SharepointPreviewTool( + ToolType.SharepointGroundingPreview, + additionalBinaryDataProperties: null, + name, + description, + toolConfigs, + toolOptions); } /// The sharepoint grounding tool parameters. @@ -224,11 +278,24 @@ public static SharePointGroundingToolOptions SharePointGroundingToolOptions(IEnu /// The input definition information for an Azure AI search tool as used to configure an agent. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// /// The azure ai search index resource. /// A new instance for mocking. - public static AzureAISearchTool AzureAISearchTool(string name = default, string description = default, AzureAISearchToolOptions options = default) + public static AzureAISearchTool AzureAISearchTool(string name = default, string description = default, IDictionary toolConfigs = default, AzureAISearchToolOptions options = default) { - return new AzureAISearchTool(ToolType.AzureAiSearch, additionalBinaryDataProperties: null, name, description, options); + toolConfigs ??= new ChangeTrackingDictionary(); + + return new AzureAISearchTool( + ToolType.AzureAiSearch, + additionalBinaryDataProperties: null, + name, + description, + toolConfigs, + options); } /// A set of index resources used by the `azure_ai_search` tool. @@ -266,10 +333,17 @@ public static AzureAISearchToolIndex AzureAISearchToolIndex(string projectConnec /// The input definition information for an OpenAPI tool as used to configure an agent. /// The openapi function definition. + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// /// A new instance for mocking. - public static OpenAPITool OpenAPITool(OpenApiFunctionDefinition functionDefinition = default) + public static OpenAPITool OpenAPITool(OpenApiFunctionDefinition functionDefinition = default, IDictionary toolConfigs = default) { - return new OpenAPITool(ToolType.Openapi, additionalBinaryDataProperties: null, functionDefinition); + toolConfigs ??= new ChangeTrackingDictionary(); + + return new OpenAPITool(ToolType.Openapi, additionalBinaryDataProperties: null, functionDefinition, toolConfigs); } /// The input definition information for an openapi function. @@ -361,11 +435,24 @@ public static OpenAPIFunctionEntry OpenAPIFunctionEntry(string name = default, s /// The input definition information for a Bing custom search tool as used to configure an agent. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// /// The bing custom search tool parameters. /// A new instance for mocking. - public static BingCustomSearchPreviewTool BingCustomSearchPreviewTool(string name = default, string description = default, BingCustomSearchToolOptions bingCustomSearchPreview = default) + public static BingCustomSearchPreviewTool BingCustomSearchPreviewTool(string name = default, string description = default, IDictionary toolConfigs = default, BingCustomSearchToolOptions bingCustomSearchPreview = default) { - return new BingCustomSearchPreviewTool(ToolType.BingCustomSearchPreview, additionalBinaryDataProperties: null, name, description, bingCustomSearchPreview); + toolConfigs ??= new ChangeTrackingDictionary(); + + return new BingCustomSearchPreviewTool( + ToolType.BingCustomSearchPreview, + additionalBinaryDataProperties: null, + name, + description, + toolConfigs, + bingCustomSearchPreview); } /// The bing custom search tool parameters. @@ -404,11 +491,24 @@ public static BingCustomSearchConfiguration BingCustomSearchConfiguration(string /// The input definition information for a Browser Automation Tool, as used to configure an Agent. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// /// The Browser Automation Tool parameters. /// A new instance for mocking. - public static BrowserAutomationPreviewTool BrowserAutomationPreviewTool(string name = default, string description = default, BrowserAutomationToolOptions toolParameters = default) + public static BrowserAutomationPreviewTool BrowserAutomationPreviewTool(string name = default, string description = default, IDictionary toolConfigs = default, BrowserAutomationToolOptions toolParameters = default) { - return new BrowserAutomationPreviewTool(ToolType.BrowserAutomationPreview, additionalBinaryDataProperties: null, name, description, toolParameters); + toolConfigs ??= new ChangeTrackingDictionary(); + + return new BrowserAutomationPreviewTool( + ToolType.BrowserAutomationPreview, + additionalBinaryDataProperties: null, + name, + description, + toolConfigs, + toolParameters); } /// Definition of input parameters for the Browser Automation Tool. @@ -429,10 +529,17 @@ public static BrowserAutomationToolConnectionParameters BrowserAutomationToolCon /// The input definition information for an Azure Function Tool, as used to configure an Agent. /// The Azure Function Tool definition. + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// /// A new instance for mocking. - public static AzureFunctionTool AzureFunctionTool(AzureFunctionDefinition azureFunction = default) + public static AzureFunctionTool AzureFunctionTool(AzureFunctionDefinition azureFunction = default, IDictionary toolConfigs = default) { - return new AzureFunctionTool(ToolType.AzureFunction, additionalBinaryDataProperties: null, azureFunction); + toolConfigs ??= new ChangeTrackingDictionary(); + + return new AzureFunctionTool(ToolType.AzureFunction, additionalBinaryDataProperties: null, azureFunction, toolConfigs); } /// The definition of Azure function. @@ -475,11 +582,24 @@ public static AzureFunctionStorageQueue AzureFunctionStorageQueue(string queueSe /// A tool for capturing structured outputs. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// /// The structured outputs to capture from the model. /// A new instance for mocking. - public static CaptureStructuredOutputsTool CaptureStructuredOutputsTool(string name = default, string description = default, StructuredOutputDefinition outputDefinition = default) + public static CaptureStructuredOutputsTool CaptureStructuredOutputsTool(string name = default, string description = default, IDictionary toolConfigs = default, StructuredOutputDefinition outputDefinition = default) { - return new CaptureStructuredOutputsTool(ToolType.CaptureStructuredOutputs, additionalBinaryDataProperties: null, name, description, outputDefinition); + toolConfigs ??= new ChangeTrackingDictionary(); + + return new CaptureStructuredOutputsTool( + ToolType.CaptureStructuredOutputs, + additionalBinaryDataProperties: null, + name, + description, + toolConfigs, + outputDefinition); } /// A structured output that can be produced by the agent. @@ -498,6 +618,11 @@ public static StructuredOutputDefinition StructuredOutputDefinition(string name /// An agent implementing the A2A protocol. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// /// Base URL of the agent. /// /// The path to the agent card relative to the `base_url`. @@ -508,13 +633,16 @@ public static StructuredOutputDefinition StructuredOutputDefinition(string name /// The connection stores authentication and other connection details needed to connect to the A2A server. /// /// A new instance for mocking. - public static A2APreviewTool A2APreviewTool(string name = default, string description = default, Uri baseUri = default, string agentCardPath = default, string projectConnectionId = default) + public static A2APreviewTool A2APreviewTool(string name = default, string description = default, IDictionary toolConfigs = default, Uri baseUri = default, string agentCardPath = default, string projectConnectionId = default) { + toolConfigs ??= new ChangeTrackingDictionary(); + return new A2APreviewTool( ToolType.A2aPreview, additionalBinaryDataProperties: null, name, description, + toolConfigs, baseUri, agentCardPath, projectConnectionId); @@ -524,10 +652,23 @@ public static A2APreviewTool A2APreviewTool(string name = default, string descri /// The ID of the WorkIQ project connection. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// /// A new instance for mocking. - public static WorkIQPreviewTool WorkIQPreviewTool(string projectConnectionId = default, string name = default, string description = default) + public static WorkIQPreviewTool WorkIQPreviewTool(string projectConnectionId = default, string name = default, string description = default, IDictionary toolConfigs = default) { - return new WorkIQPreviewTool(ToolType.WorkIqPreview, additionalBinaryDataProperties: null, projectConnectionId, name, description); + toolConfigs ??= new ChangeTrackingDictionary(); + + return new WorkIQPreviewTool( + ToolType.WorkIqPreview, + additionalBinaryDataProperties: null, + projectConnectionId, + name, + description, + toolConfigs); } /// A FabricIQ server-side tool. @@ -537,9 +678,16 @@ public static WorkIQPreviewTool WorkIQPreviewTool(string projectConnectionId = d /// (Optional) Whether the agent requires approval before executing actions. Default is always. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// /// A new instance for mocking. - public static FabricIQPreviewTool FabricIQPreviewTool(string projectConnectionId = default, string serverLabel = default, Uri serverUrl = default, BinaryData requireApproval = default, string name = default, string description = default) + public static FabricIQPreviewTool FabricIQPreviewTool(string projectConnectionId = default, string serverLabel = default, Uri serverUrl = default, BinaryData requireApproval = default, string name = default, string description = default, IDictionary toolConfigs = default) { + toolConfigs ??= new ChangeTrackingDictionary(); + return new FabricIQPreviewTool( ToolType.FabricIqPreview, additionalBinaryDataProperties: null, @@ -548,12 +696,18 @@ public static FabricIQPreviewTool FabricIQPreviewTool(string projectConnectionId serverUrl, requireApproval, name, - description); + description, + toolConfigs); } /// A tool for integrating memories into the agent. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// /// The name of the memory store to use. /// /// The namespace used to group and isolate memories, such as a user ID. @@ -563,13 +717,16 @@ public static FabricIQPreviewTool FabricIQPreviewTool(string projectConnectionId /// Options for searching the memory store. /// Time to wait before updating memories after inactivity (seconds). Default 300. /// A new instance for mocking. - public static MemorySearchPreviewTool MemorySearchPreviewTool(string name = default, string description = default, string memoryStoreName = default, string scope = default, MemorySearchToolOptions searchOptions = default, int? updateDelayInSecs = default) + public static MemorySearchPreviewTool MemorySearchPreviewTool(string name = default, string description = default, IDictionary toolConfigs = default, string memoryStoreName = default, string scope = default, MemorySearchToolOptions searchOptions = default, int? updateDelayInSecs = default) { + toolConfigs ??= new ChangeTrackingDictionary(); + return new MemorySearchPreviewTool( ToolType.MemorySearchPreview, additionalBinaryDataProperties: null, name, description, + toolConfigs, memoryStoreName, scope, searchOptions, @@ -591,10 +748,17 @@ public static MemorySearchToolOptions MemorySearchToolOptions(int? maxMemories = /// /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// /// A new instance for mocking. - public static ToolboxSearchPreviewTool ToolboxSearchPreviewTool(string name = default, string description = default) + public static ToolboxSearchPreviewTool ToolboxSearchPreviewTool(string name = default, string description = default, IDictionary toolConfigs = default) { - return new ToolboxSearchPreviewTool(ToolType.ToolboxSearchPreview, additionalBinaryDataProperties: null, name, description); + toolConfigs ??= new ChangeTrackingDictionary(); + + return new ToolboxSearchPreviewTool(ToolType.ToolboxSearchPreview, additionalBinaryDataProperties: null, name, description, toolConfigs); } /// A web search configuration for bing custom search. @@ -792,6 +956,25 @@ public static WorkflowAgentDefinition WorkflowAgentDefinition(ContentFilterConfi return new WorkflowAgentDefinition(ProjectsAgentKind.Workflow, contentFilterConfiguration, additionalBinaryDataProperties: null, workflowYaml); } + /// + /// The external agent definition. Represents a third-party agent hosted outside Foundry (for example, on GCP or AWS). + /// Registration is metadata-only: Foundry records the agent definition to light up observability experiences (traces, evaluations) + /// over customer-emitted OpenTelemetry data. + /// + /// Configuration for Responsible AI (RAI) content filtering and safety features. + /// + /// The OpenTelemetry agent identifier used to attribute customer-emitted spans to this Foundry agent. + /// Spans must include the attribute `gen_ai.agent.id = <otel_agent_id>` to appear under this registration. + /// Defaults to the top-level agent name when omitted. Provide an explicit value only for migration scenarios + /// where the running external agent already emits a stable id that differs from the Foundry agent name. + /// The resolved value is always echoed on read. + /// + /// A new instance for mocking. + public static ExternalAgentDefinition ExternalAgentDefinition(ContentFilterConfiguration contentFilterConfiguration = default, string otelAgentId = default) + { + return new ExternalAgentDefinition(ProjectsAgentKind.External, contentFilterConfiguration, additionalBinaryDataProperties: null, otelAgentId); + } + /// The AgentIdentity. /// The principal ID of the agent instance. /// The client ID of the agent instance. Also referred to as the instance ID. @@ -876,10 +1059,36 @@ public static AgentEndpointAuthorizationScheme AgentEndpointAuthorizationScheme( } /// The EntraAuthorizationScheme. + /// The source from which the per-user isolation key is derived for requests authorized via this scheme. Defaults to Entra-based isolation when omitted. /// A new instance for mocking. - public static EntraAuthorizationScheme EntraAuthorizationScheme() + public static EntraAuthorizationScheme EntraAuthorizationScheme(IsolationKeySource isolationKeySource = default) + { + return new EntraAuthorizationScheme(AgentEndpointAuthorizationSchemeType.Entra, additionalBinaryDataProperties: null, isolationKeySource); + } + + /// + /// The IsolationKeySource. + /// Please note this is the abstract base class. The derived classes available for instantiation are: and . + /// + /// + /// A new instance for mocking. + public static IsolationKeySource IsolationKeySource(string kind = default) + { + return new UnknownIsolationKeySource(new IsolationKeySourceKind(kind), additionalBinaryDataProperties: null); + } + + /// The EntraIsolationKeySource. + /// A new instance for mocking. + public static EntraIsolationKeySource EntraIsolationKeySource() + { + return new EntraIsolationKeySource(IsolationKeySourceKind.Entra, additionalBinaryDataProperties: null); + } + + /// The HeaderIsolationKeySource. + /// A new instance for mocking. + public static HeaderIsolationKeySource HeaderIsolationKeySource() { - return new EntraAuthorizationScheme(AgentEndpointAuthorizationSchemeType.Entra, additionalBinaryDataProperties: null); + return new HeaderIsolationKeySource(IsolationKeySourceKind.Header, additionalBinaryDataProperties: null); } /// The BotServiceAuthorizationScheme. @@ -929,6 +1138,38 @@ public static AgentCardSkill AgentCardSkill(string id = default, string name = d additionalBinaryDataProperties: null); } + /// Multipart request body for creating a new code-based agent (POST /agents). Inherits from CreateAgentVersionFromCodeContent for future extensibility. + /// JSON metadata including description and hosted definition. + /// The code zip file (max 250 MB). + /// A new instance for mocking. + public static CreateAgentFromCodeOptions CreateAgentFromCodeOptions(CreateAgentVersionFromCodeMetadata metadata = default, BinaryData code = default) + { + return new CreateAgentFromCodeOptions(metadata, code, additionalBinaryDataProperties: null); + } + + /// + /// JSON metadata for code-based agent operations (create, update, create version). + /// The agent name comes from the URL path parameter or the `x-ms-agent-name` header, + /// so it is not included in this model. + /// The content hash (SHA-256 of the zip) is carried in the `x-ms-code-zip-sha256` header. + /// + /// A human-readable description of the agent. + /// + /// Set of 16 key-value pairs that can be attached to an object. This can be + /// useful for storing additional information about the object in a structured + /// format, and querying for objects via API or the dashboard. + /// Keys are strings with a maximum length of 64 characters. Values are strings + /// with a maximum length of 512 characters. + /// + /// The hosted agent definition including code_configuration (runtime, entry_point), cpu, memory, and protocol_versions. + /// A new instance for mocking. + public static CreateAgentVersionFromCodeMetadata CreateAgentVersionFromCodeMetadata(string description = default, IDictionary metadata = default, HostedAgentDefinition definition = default) + { + metadata ??= new ChangeTrackingDictionary(); + + return new CreateAgentVersionFromCodeMetadata(description, metadata, definition, additionalBinaryDataProperties: null); + } + /// The AgentManifestOptions. /// /// Set of 16 key-value pairs that can be attached to an object. This can be @@ -1214,7 +1455,7 @@ public static ProjectsAgentVersion ProjectsAgentVersion(IDictionary The input definition information for a Microsoft Fabric tool as used to configure an agent. @@ -1223,7 +1464,7 @@ public static BingGroundingTool BingGroundingTool(BingGroundingSearchToolOptions [EditorBrowsable(EditorBrowsableState.Never)] public static MicrosoftFabricPreviewTool MicrosoftFabricPreviewTool(FabricDataAgentToolOptions toolOptions) { - return MicrosoftFabricPreviewTool(name: default, description: default, toolOptions: toolOptions); + return MicrosoftFabricPreviewTool(name: default, description: default, toolConfigs: default, toolOptions: toolOptions); } /// The input definition information for a sharepoint tool as used to configure an agent. @@ -1232,7 +1473,7 @@ public static MicrosoftFabricPreviewTool MicrosoftFabricPreviewTool(FabricDataAg [EditorBrowsable(EditorBrowsableState.Never)] public static SharepointPreviewTool SharepointPreviewTool(SharePointGroundingToolOptions toolOptions) { - return SharepointPreviewTool(name: default, description: default, toolOptions: toolOptions); + return SharepointPreviewTool(name: default, description: default, toolConfigs: default, toolOptions: toolOptions); } /// The input definition information for an Azure AI search tool as used to configure an agent. @@ -1241,7 +1482,16 @@ public static SharepointPreviewTool SharepointPreviewTool(SharePointGroundingToo [EditorBrowsable(EditorBrowsableState.Never)] public static AzureAISearchTool AzureAISearchTool(AzureAISearchToolOptions options) { - return AzureAISearchTool(name: default, description: default, options: options); + return AzureAISearchTool(name: default, description: default, toolConfigs: default, options: options); + } + + /// The input definition information for an OpenAPI tool as used to configure an agent. + /// The openapi function definition. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static OpenAPITool OpenAPITool(OpenApiFunctionDefinition functionDefinition) + { + return OpenAPITool(functionDefinition: functionDefinition, toolConfigs: default); } /// The input definition information for a Bing custom search tool as used to configure an agent. @@ -1250,7 +1500,7 @@ public static AzureAISearchTool AzureAISearchTool(AzureAISearchToolOptions optio [EditorBrowsable(EditorBrowsableState.Never)] public static BingCustomSearchPreviewTool BingCustomSearchPreviewTool(BingCustomSearchToolOptions bingCustomSearchPreview) { - return BingCustomSearchPreviewTool(name: default, description: default, bingCustomSearchPreview: bingCustomSearchPreview); + return BingCustomSearchPreviewTool(name: default, description: default, toolConfigs: default, bingCustomSearchPreview: bingCustomSearchPreview); } /// The input definition information for a Browser Automation Tool, as used to configure an Agent. @@ -1259,7 +1509,16 @@ public static BingCustomSearchPreviewTool BingCustomSearchPreviewTool(BingCustom [EditorBrowsable(EditorBrowsableState.Never)] public static BrowserAutomationPreviewTool BrowserAutomationPreviewTool(BrowserAutomationToolOptions toolParameters) { - return BrowserAutomationPreviewTool(name: default, description: default, toolParameters: toolParameters); + return BrowserAutomationPreviewTool(name: default, description: default, toolConfigs: default, toolParameters: toolParameters); + } + + /// The input definition information for an Azure Function Tool, as used to configure an Agent. + /// The Azure Function Tool definition. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static AzureFunctionTool AzureFunctionTool(AzureFunctionDefinition azureFunction) + { + return AzureFunctionTool(azureFunction: azureFunction, toolConfigs: default); } /// A tool for capturing structured outputs. @@ -1268,7 +1527,7 @@ public static BrowserAutomationPreviewTool BrowserAutomationPreviewTool(BrowserA [EditorBrowsable(EditorBrowsableState.Never)] public static CaptureStructuredOutputsTool CaptureStructuredOutputsTool(StructuredOutputDefinition outputDefinition) { - return CaptureStructuredOutputsTool(name: default, description: default, outputDefinition: outputDefinition); + return CaptureStructuredOutputsTool(name: default, description: default, toolConfigs: default, outputDefinition: outputDefinition); } /// An agent implementing the A2A protocol. @@ -1285,7 +1544,7 @@ public static CaptureStructuredOutputsTool CaptureStructuredOutputsTool(Structur [EditorBrowsable(EditorBrowsableState.Never)] public static A2APreviewTool A2APreviewTool(Uri baseUri, string agentCardPath, string projectConnectionId) { - return A2APreviewTool(name: default, description: default, baseUri: baseUri, agentCardPath: agentCardPath, projectConnectionId: projectConnectionId); + return A2APreviewTool(name: default, description: default, toolConfigs: default, baseUri: baseUri, agentCardPath: agentCardPath, projectConnectionId: projectConnectionId); } /// A tool for integrating memories into the agent. @@ -1301,7 +1560,7 @@ public static A2APreviewTool A2APreviewTool(Uri baseUri, string agentCardPath, s [EditorBrowsable(EditorBrowsableState.Never)] public static MemorySearchPreviewTool MemorySearchPreviewTool(string memoryStoreName, string scope, MemorySearchToolOptions searchOptions, int? updateDelayInSecs) { - return MemorySearchPreviewTool(name: default, description: default, memoryStoreName: memoryStoreName, scope: scope, searchOptions: searchOptions, updateDelayInSecs: updateDelayInSecs); + return MemorySearchPreviewTool(name: default, description: default, toolConfigs: default, memoryStoreName: memoryStoreName, scope: scope, searchOptions: searchOptions, updateDelayInSecs: updateDelayInSecs); } /// The hosted agent definition. diff --git a/sdk/ai/Azure.AI.Projects.Agents/src/Helpers/FileHelper.cs b/sdk/ai/Azure.AI.Projects.Agents/src/Helpers/FileHelper.cs index b0712ea8a152..b2d9263dc6c3 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/src/Helpers/FileHelper.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/src/Helpers/FileHelper.cs @@ -67,10 +67,15 @@ internal static (BinaryData Data, string Sha256sum) CreateAndReadZipFile(string } zipContents = new(stream.ToArray()); } + return (zipContents, GetSha256Sum(zipContents)); + } + + internal static string GetSha256Sum(BinaryData contents) + { string strHash = default; using (SHA256 sha256Hash = SHA256.Create()) { - byte[] hash = sha256Hash.ComputeHash(zipContents.ToArray()); + byte[] hash = sha256Hash.ComputeHash(contents.ToArray()); StringBuilder sbString = new(); foreach (byte b in hash) { @@ -78,6 +83,6 @@ internal static (BinaryData Data, string Sha256sum) CreateAndReadZipFile(string } strHash = sbString.ToString(); } - return (zipContents, strHash); + return strHash; } } diff --git a/sdk/ai/Azure.AI.Projects.Agents/tests/AgentsTestBase.cs b/sdk/ai/Azure.AI.Projects.Agents/tests/AgentsTestBase.cs index e34a75e1e588..7086e60d6844 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/tests/AgentsTestBase.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/tests/AgentsTestBase.cs @@ -32,7 +32,7 @@ public class AgentsTestBase : RecordedTestBase protected readonly int PAGE_SIZE = 3; protected const string FOUNDRY_HEADER = "Foundry-Features"; - protected const string FOUNDRY_HEADER_VALUE = "MemoryStores=V1Preview,ContainerAgents=V1Preview,HostedAgents=V1Preview,WorkflowAgents=V1Preview,Evaluations=V1Preview,Schedules=V1Preview,RedTeams=V1Preview,Toolboxes=V1Preview,AgentEndpoints=V1Preview,Skills=V1Preview,Insights=V1Preview,DataGenerationJobs=V1Preview,CodeAgents=V1Preview,Models=V1Preview,AgentsOptimization=V1Preview"; + protected const string FOUNDRY_HEADER_VALUE = "MemoryStores=V1Preview,ContainerAgents=V1Preview,HostedAgents=V1Preview,WorkflowAgents=V1Preview,Evaluations=V1Preview,Schedules=V1Preview,RedTeams=V1Preview,Toolboxes=V1Preview,AgentEndpoints=V1Preview,Skills=V1Preview,Insights=V1Preview,DataGenerationJobs=V1Preview,CodeAgents=V1Preview,Models=V1Preview,AgentsOptimization=V1Preview,Routines=V1Preview,ExternalAgents=V1Preview"; public AgentsTestBase(bool isAsync, RecordedTestMode? testMode = null) : base(isAsync, testMode) { @@ -421,7 +421,7 @@ public async virtual Task Cleanup() List hostedAgents = [..agentsClient.GetAgents().Select(x => x.Name).Where(x => x.StartsWith(HOSTED_AGENT))]; foreach (string agentName in hostedAgents) { - await agentsClient.DeleteAgentAsync(agentName); + await agentsClient.DeleteAgentAsync(agentName, force: true); } AgentToolboxes toolboxClient = agentsClient.GetAgentToolboxes(); foreach (string name in new string[] { "mcp", "mcp1", "mcp2" }) diff --git a/sdk/ai/Azure.AI.Projects.Agents/tests/AgentsTests.cs b/sdk/ai/Azure.AI.Projects.Agents/tests/AgentsTests.cs index 91b64c8acb0d..84c8121edaa1 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/tests/AgentsTests.cs +++ b/sdk/ai/Azure.AI.Projects.Agents/tests/AgentsTests.cs @@ -485,8 +485,7 @@ public async Task TestSessionCRUD() // Create ProjectAgentSession session1 = await agentsClient.CreateSessionAsync( agentName: agentVersion.Name, - versionIndicator: new VersionRefIndicator(agentVersion.Version), - cancellationToken: default + versionIndicator: new VersionRefIndicator(agentVersion.Version) ); Assert.That(session1.VersionIndicator, Is.InstanceOf(typeof(VersionRefIndicator))); Assert.That(((VersionRefIndicator)session1.VersionIndicator).AgentVersion, Is.EqualTo(agentVersion.Version)); @@ -522,12 +521,29 @@ public async Task TestSessionCRUD() Assert.That(sessions, Does.Contain(session2.AgentSessionId)); // Delete await agentsClient.DeleteSessionAsync(agentName: agentVersion.Name, sessionId: session1.AgentSessionId); - sessions = [.. await agentsClient.GetSessionsAsync(agentName: agentVersion.Name).Select(x => x.AgentSessionId).ToListAsync()]; + Assert.ThrowsAsync(async () => await agentsClient.GetSessionAsync(agentName: agentVersion.Name, sessionId: session1.AgentSessionId)); + // See work item 5291142. [HostedAgentsVNext] Bug: Removed session is still being listed. + //sessions = [.. await agentsClient.GetSessionsAsync(agentName: agentVersion.Name).Select(x => x.AgentSessionId).ToListAsync()]; + //Assert.That(sessions, Has.Count.EqualTo(1)); + //Assert.That(sessions, Does.Not.Contain(session1.AgentSessionId)); + //Assert.That(sessions, Does.Contain(session2.AgentSessionId)); + // Workaround + sessions = [.. await agentsClient.GetSessionsAsync(agentName: agentVersion.Name).Where(x => x.Status == AgentSessionStatus.Active).Select(x => x.AgentSessionId).ToListAsync()]; Assert.That(sessions, Has.Count.EqualTo(1)); Assert.That(sessions, Does.Not.Contain(session1.AgentSessionId)); Assert.That(sessions, Does.Contain(session2.AgentSessionId)); + sessions = [.. await agentsClient.GetSessionsAsync(agentName: agentVersion.Name).Where(x => x.Status == AgentSessionStatus.Deleted).Select(x => x.AgentSessionId).ToListAsync()]; + Assert.That(sessions, Has.Count.EqualTo(1)); + Assert.That(sessions, Does.Not.Contain(session2.AgentSessionId)); + Assert.That(sessions, Does.Contain(session1.AgentSessionId)); await agentsClient.DeleteSessionAsync(agentName: agentVersion.Name, sessionId: session2.AgentSessionId); - sessions = [.. await agentsClient.GetSessionsAsync(agentName: agentVersion.Name).Select(x => x.AgentSessionId).ToListAsync()]; + //sessions = [.. await agentsClient.GetSessionsAsync(agentName: agentVersion.Name).Select(x => x.AgentSessionId).ToListAsync()]; + //Assert.That(sessions, Has.Count.EqualTo(0)); + // Workaround + sessions = [.. await agentsClient.GetSessionsAsync(agentName: agentVersion.Name).Where(x => x.Status == AgentSessionStatus.Deleted).Select(x => x.AgentSessionId).ToListAsync()]; + Assert.That(sessions, Does.Contain(session1.AgentSessionId)); + Assert.That(sessions, Does.Contain(session2.AgentSessionId)); + sessions = [.. await agentsClient.GetSessionsAsync(agentName: agentVersion.Name).Where(x => x.Status == AgentSessionStatus.Active).Select(x => x.AgentSessionId).ToListAsync()]; Assert.That(sessions, Has.Count.EqualTo(0)); } @@ -537,7 +553,7 @@ public async Task TestSessionPagination() AgentAdministrationClient agentsClient = GetTestClient(); ProjectsAgentVersion agentVersion = await CreateHostedAgent(agentsClient, "01"); await DeleteAllSessionsAsync(agentsClient, agentVersion.Name); - string sessionIdBase = $"session_{(IsAsync ? "async" : "sync")}_09"; + string sessionIdBase = $"session_{(IsAsync ? "async" : "sync")}_10"; // Make sure that chronological order is the reverse of session ID alphanumeric order. for (int i = 0; i < PAGE_SIZE + 1; i++) { diff --git a/sdk/ai/Azure.AI.Projects.Agents/tsp-location.yaml b/sdk/ai/Azure.AI.Projects.Agents/tsp-location.yaml index 8d07783fd225..c390cd86dfee 100644 --- a/sdk/ai/Azure.AI.Projects.Agents/tsp-location.yaml +++ b/sdk/ai/Azure.AI.Projects.Agents/tsp-location.yaml @@ -1,5 +1,5 @@ directory: specification/ai-foundry/data-plane/Foundry/src/sdk-projects-agents -commit: b4de814e0b475880111db5c641b78ef85c8a3157 +commit: d70b666663d37cc99887311c19996b3ae29ce927 repo: Azure/azure-rest-api-specs additionalDirectories: - specification/ai-foundry/data-plane/Foundry/src/agents diff --git a/sdk/ai/Azure.AI.Projects/CHANGELOG.md b/sdk/ai/Azure.AI.Projects/CHANGELOG.md index 8286149d745b..89845e41f033 100644 --- a/sdk/ai/Azure.AI.Projects/CHANGELOG.md +++ b/sdk/ai/Azure.AI.Projects/CHANGELOG.md @@ -7,10 +7,6 @@ - Added memory store item CRUD operations for management of memories inside the `MemoryStore`. ### Breaking Changes -- Removed `DataGenerationJobs`, `DataGenerationJob`, `DataGenerationJobInputs`, `DataGenerationJobResult`, `DataGenerationModelOptions`, `DataGenerationTokenUsage`. -- Removed `SimpleQnADataGenerationJobOptions`, `TaskDataGenerationJobOptions`, `ToolUseFineTuningDataGenerationJobOptions`, `TracesDataGenerationJobOptions`. -- Removed `AgentDataGenerationJobSource`, `DatasetDataGenerationJobSource`, `FileDataGenerationJobSource`, `PromptDataGenerationJobSource`, `TracesDataGenerationJobSource`. -- Removed `DatasetDataGenerationJobOutput`, `FileDataGenerationJobOutput`. ### Bugs Fixed diff --git a/sdk/ai/Azure.AI.Projects/api/Azure.AI.Projects.net10.0.cs b/sdk/ai/Azure.AI.Projects/api/Azure.AI.Projects.net10.0.cs index 56a6f10b2def..23305f56f2f8 100644 --- a/sdk/ai/Azure.AI.Projects/api/Azure.AI.Projects.net10.0.cs +++ b/sdk/ai/Azure.AI.Projects/api/Azure.AI.Projects.net10.0.cs @@ -1,5 +1,37 @@ namespace Azure.AI.Projects { + public partial class AgentDataGenerationJobSource : Azure.AI.Projects.DataGenerationJobSource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AgentDataGenerationJobSource(string agentName) { } + public string AgentName { get { throw null; } set { } } + public string AgentVersion { get { throw null; } set { } } + public override string Description { get { throw null; } set { } } + protected override Azure.AI.Projects.DataGenerationJobSource JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.DataGenerationJobSource PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.AgentDataGenerationJobSource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.AgentDataGenerationJobSource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AgentEvaluatorGenerationJobSource : Azure.AI.Projects.EvaluatorGenerationJobSource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AgentEvaluatorGenerationJobSource(string agentName) { } + public string AgentName { get { throw null; } set { } } + public string AgentVersion { get { throw null; } set { } } + public string Description { get { throw null; } set { } } + protected override Azure.AI.Projects.EvaluatorGenerationJobSource JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.EvaluatorGenerationJobSource PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.AgentEvaluatorGenerationJobSource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.AgentEvaluatorGenerationJobSource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class AgenticIdentityPreviewCredentials : Azure.AI.Projects.AIProjectConnectionBaseCredential, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal AgenticIdentityPreviewCredentials() { } @@ -38,10 +70,12 @@ public AIProjectClient(System.Uri endpoint, System.ClientModel.AuthenticationTok public AIProjectClient(System.Uri endpoint, System.ClientModel.AuthenticationTokenProvider tokenProvider, Azure.AI.Projects.AIProjectClientOptions options) : base (default(int)) { } public virtual Azure.AI.Projects.Agents.AgentAdministrationClient AgentAdministrationClient { get { throw null; } } public virtual Azure.AI.Projects.AIProjectConnectionsOperations Connections { get { throw null; } } + public virtual Azure.AI.Projects.DataGenerationJobs DataGenerationJobs { get { throw null; } } public virtual Azure.AI.Projects.AIProjectDatasetsOperations Datasets { get { throw null; } } public virtual Azure.AI.Projects.AIProjectDeploymentsOperations Deployments { get { throw null; } } public virtual Azure.AI.Projects.Evaluation.EvaluationRules EvaluationRules { get { throw null; } } public virtual Azure.AI.Projects.Evaluation.EvaluationTaxonomies EvaluationTaxonomies { get { throw null; } } + public virtual Azure.AI.Projects.EvaluatorGenerationJobs EvaluatorGenerationJobs { get { throw null; } } public virtual Azure.AI.Projects.Evaluation.ProjectEvaluators Evaluators { get { throw null; } } public virtual Azure.AI.Projects.AIProjectIndexesOperations Indexes { get { throw null; } } public virtual Azure.AI.Projects.Evaluation.ProjectInsights Insights { get { throw null; } } @@ -53,6 +87,7 @@ public AIProjectClient(System.Uri endpoint, System.ClientModel.AuthenticationTok public virtual Azure.AI.Projects.ProjectSchedules Schedules { get { throw null; } } public virtual Azure.AI.Projects.AIProjectTelemetry Telemetry { get { throw null; } } public virtual Azure.AI.Projects.Memory.AIProjectMemoryStores GetAIProjectMemoryStoresClient() { throw null; } + public virtual Azure.AI.Projects.AIProjectRoutines GetAIProjectRoutinesClient() { throw null; } public override System.Collections.Generic.IEnumerable GetAllConnections() { throw null; } public override System.ClientModel.Primitives.ClientConnection GetConnection(string connectionId) { throw null; } } @@ -421,6 +456,43 @@ protected AIProjectModels() { } public virtual System.ClientModel.ClientResult UpdateModelVersion(string name, string version, System.ClientModel.BinaryContent content, System.ClientModel.Primitives.RequestOptions options = null) { throw null; } public virtual System.Threading.Tasks.Task UpdateModelVersionAsync(string name, string version, System.ClientModel.BinaryContent content, System.ClientModel.Primitives.RequestOptions options = null) { throw null; } } + public partial class AIProjectRoutines + { + protected AIProjectRoutines() { } + public System.ClientModel.Primitives.ClientPipeline Pipeline { get { throw null; } } + public virtual System.ClientModel.ClientResult CreateOrUpdateRoutine(string routineName, System.ClientModel.BinaryContent content, string foundryFeatures = null, System.ClientModel.Primitives.RequestOptions options = null) { throw null; } + public virtual System.ClientModel.ClientResult CreateOrUpdateRoutine(string routineName, System.Collections.Generic.IDictionary triggers, Azure.AI.Projects.RoutineAction action, string description = null, bool? enabled = default(bool?), Azure.AI.Projects.FoundryFeaturesOptInKeys? foundryFeatures = default(Azure.AI.Projects.FoundryFeaturesOptInKeys?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task CreateOrUpdateRoutineAsync(string routineName, System.ClientModel.BinaryContent content, string foundryFeatures = null, System.ClientModel.Primitives.RequestOptions options = null) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateRoutineAsync(string routineName, System.Collections.Generic.IDictionary triggers, Azure.AI.Projects.RoutineAction action, string description = null, bool? enabled = default(bool?), Azure.AI.Projects.FoundryFeaturesOptInKeys? foundryFeatures = default(Azure.AI.Projects.FoundryFeaturesOptInKeys?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.ClientResult DeleteRoutine(string routineName, Azure.AI.Projects.FoundryFeaturesOptInKeys? foundryFeatures = default(Azure.AI.Projects.FoundryFeaturesOptInKeys?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.ClientResult DeleteRoutine(string routineName, string foundryFeatures, System.ClientModel.Primitives.RequestOptions options) { throw null; } + public virtual System.Threading.Tasks.Task DeleteRoutineAsync(string routineName, Azure.AI.Projects.FoundryFeaturesOptInKeys? foundryFeatures = default(Azure.AI.Projects.FoundryFeaturesOptInKeys?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteRoutineAsync(string routineName, string foundryFeatures, System.ClientModel.Primitives.RequestOptions options) { throw null; } + public virtual System.ClientModel.ClientResult DisableRoutine(string routineName, Azure.AI.Projects.FoundryFeaturesOptInKeys? foundryFeatures = default(Azure.AI.Projects.FoundryFeaturesOptInKeys?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.ClientResult DisableRoutine(string routineName, string foundryFeatures, System.ClientModel.Primitives.RequestOptions options) { throw null; } + public virtual System.Threading.Tasks.Task> DisableRoutineAsync(string routineName, Azure.AI.Projects.FoundryFeaturesOptInKeys? foundryFeatures = default(Azure.AI.Projects.FoundryFeaturesOptInKeys?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DisableRoutineAsync(string routineName, string foundryFeatures, System.ClientModel.Primitives.RequestOptions options) { throw null; } + public virtual System.ClientModel.ClientResult DispatchRoutineAsync(string routineName, Azure.AI.Projects.RoutineDispatchPayload payload = null, Azure.AI.Projects.FoundryFeaturesOptInKeys? foundryFeatures = default(Azure.AI.Projects.FoundryFeaturesOptInKeys?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.ClientResult DispatchRoutineAsync(string routineName, System.ClientModel.BinaryContent content, string foundryFeatures = null, System.ClientModel.Primitives.RequestOptions options = null) { throw null; } + public virtual System.Threading.Tasks.Task> DispatchRoutineAsyncAsync(string routineName, Azure.AI.Projects.RoutineDispatchPayload payload = null, Azure.AI.Projects.FoundryFeaturesOptInKeys? foundryFeatures = default(Azure.AI.Projects.FoundryFeaturesOptInKeys?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DispatchRoutineAsyncAsync(string routineName, System.ClientModel.BinaryContent content, string foundryFeatures = null, System.ClientModel.Primitives.RequestOptions options = null) { throw null; } + public virtual System.ClientModel.ClientResult EnableRoutine(string routineName, Azure.AI.Projects.FoundryFeaturesOptInKeys? foundryFeatures = default(Azure.AI.Projects.FoundryFeaturesOptInKeys?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.ClientResult EnableRoutine(string routineName, string foundryFeatures, System.ClientModel.Primitives.RequestOptions options) { throw null; } + public virtual System.Threading.Tasks.Task> EnableRoutineAsync(string routineName, Azure.AI.Projects.FoundryFeaturesOptInKeys? foundryFeatures = default(Azure.AI.Projects.FoundryFeaturesOptInKeys?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task EnableRoutineAsync(string routineName, string foundryFeatures, System.ClientModel.Primitives.RequestOptions options) { throw null; } + public virtual System.ClientModel.ClientResult GetRoutine(string routineName, Azure.AI.Projects.FoundryFeaturesOptInKeys? foundryFeatures = default(Azure.AI.Projects.FoundryFeaturesOptInKeys?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.ClientResult GetRoutine(string routineName, string foundryFeatures, System.ClientModel.Primitives.RequestOptions options) { throw null; } + public virtual System.Threading.Tasks.Task> GetRoutineAsync(string routineName, Azure.AI.Projects.FoundryFeaturesOptInKeys? foundryFeatures = default(Azure.AI.Projects.FoundryFeaturesOptInKeys?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetRoutineAsync(string routineName, string foundryFeatures, System.ClientModel.Primitives.RequestOptions options) { throw null; } + public virtual System.ClientModel.CollectionResult GetRoutineRuns(string routineName, Azure.AI.Projects.FoundryFeaturesOptInKeys? foundryFeatures = default(Azure.AI.Projects.FoundryFeaturesOptInKeys?), string filter = null, int? limit = default(int?), Azure.AI.Projects.Memory.MemoryStoreListOrder? order = default(Azure.AI.Projects.Memory.MemoryStoreListOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.Primitives.CollectionResult GetRoutineRuns(string routineName, string foundryFeatures, string filter, int? limit, string order, string after, string before, System.ClientModel.Primitives.RequestOptions options) { throw null; } + public virtual System.ClientModel.AsyncCollectionResult GetRoutineRunsAsync(string routineName, Azure.AI.Projects.FoundryFeaturesOptInKeys? foundryFeatures = default(Azure.AI.Projects.FoundryFeaturesOptInKeys?), string filter = null, int? limit = default(int?), Azure.AI.Projects.Memory.MemoryStoreListOrder? order = default(Azure.AI.Projects.Memory.MemoryStoreListOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.Primitives.AsyncCollectionResult GetRoutineRunsAsync(string routineName, string foundryFeatures, string filter, int? limit, string order, string after, string before, System.ClientModel.Primitives.RequestOptions options) { throw null; } + public virtual System.ClientModel.CollectionResult GetRoutines(Azure.AI.Projects.FoundryFeaturesOptInKeys? foundryFeatures = default(Azure.AI.Projects.FoundryFeaturesOptInKeys?), int? limit = default(int?), Azure.AI.Projects.Memory.MemoryStoreListOrder? order = default(Azure.AI.Projects.Memory.MemoryStoreListOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.Primitives.CollectionResult GetRoutines(string foundryFeatures, int? limit, string order, string after, string before, System.ClientModel.Primitives.RequestOptions options) { throw null; } + public virtual System.ClientModel.AsyncCollectionResult GetRoutinesAsync(Azure.AI.Projects.FoundryFeaturesOptInKeys? foundryFeatures = default(Azure.AI.Projects.FoundryFeaturesOptInKeys?), int? limit = default(int?), Azure.AI.Projects.Memory.MemoryStoreListOrder? order = default(Azure.AI.Projects.Memory.MemoryStoreListOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.Primitives.AsyncCollectionResult GetRoutinesAsync(string foundryFeatures, int? limit, string order, string after, string before, System.ClientModel.Primitives.RequestOptions options) { throw null; } + } public partial class AIProjectTelemetry { public AIProjectTelemetry(Azure.AI.Projects.AIProjectClient outerInstance) { } @@ -452,6 +524,8 @@ public static partial class AzureAIProjectsModelFactory { public static Azure.AI.Projects.Evaluation.AgentClusterInsightRequest AgentClusterInsightRequest(string agentName = null, Azure.AI.Projects.Evaluation.InsightModelConfiguration modelConfiguration = null) { throw null; } public static Azure.AI.Projects.Evaluation.AgentClusterInsightResult AgentClusterInsightResult(Azure.AI.Projects.Evaluation.ClusterInsightResult clusterInsight = null) { throw null; } + public static Azure.AI.Projects.AgentDataGenerationJobSource AgentDataGenerationJobSource(string description = null, string agentName = null, string agentVersion = null) { throw null; } + public static Azure.AI.Projects.AgentEvaluatorGenerationJobSource AgentEvaluatorGenerationJobSource(string description = null, string agentName = null, string agentVersion = null) { throw null; } public static Azure.AI.Projects.AgenticIdentityPreviewCredentials AgenticIdentityPreviewCredentials() { throw null; } public static Azure.AI.Projects.AIProjectBlobReference AIProjectBlobReference(System.Uri blobUri = null, string storageAccountArmId = null, Azure.AI.Projects.BlobReferenceSasCredential credential = null) { throw null; } public static Azure.AI.Projects.AIProjectConnection AIProjectConnection(string name = null, string id = null, Azure.AI.Projects.ConnectionType type = default(Azure.AI.Projects.ConnectionType), string target = null, bool isDefault = false, Azure.AI.Projects.AIProjectConnectionBaseCredential credentials = null, System.Collections.Generic.IReadOnlyDictionary metadata = null) { throw null; } @@ -480,9 +554,22 @@ public static partial class AzureAIProjectsModelFactory public static Azure.AI.Projects.Evaluation.CodeBasedEvaluatorDefinition CodeBasedEvaluatorDefinition(System.BinaryData initParameters = null, System.BinaryData dataSchema = null, System.Collections.Generic.IDictionary metrics = null, string codeText = null, string entryPoint = null, string imageTag = null, System.Uri blobUri = null) { throw null; } public static Azure.AI.Projects.Evaluation.ContinuousEvaluationRuleAction ContinuousEvaluationRuleAction(string evalId = null, int? maxHourlyRuns = default(int?)) { throw null; } public static Azure.AI.Projects.CreateAsyncResponse CreateAsyncResponse(System.Uri location = null, System.Uri operationResult = null) { throw null; } + public static Azure.AI.Projects.DataGenerationJobInputs DataGenerationJobInputs(string name = null, System.Collections.Generic.IEnumerable sources = null, Azure.AI.Projects.DataGenerationJobOptions options = null, Azure.AI.Projects.DataGenerationJobScenario scenario = default(Azure.AI.Projects.DataGenerationJobScenario), Azure.AI.Projects.DataGenerationJobOutputOptions outputOptions = null) { throw null; } + public static Azure.AI.Projects.DataGenerationJobOptions DataGenerationJobOptions(string type = null, int maxSamples = 0, float? trainSplit = default(float?), Azure.AI.Projects.DataGenerationModelOptions modelOptions = null) { throw null; } + public static Azure.AI.Projects.DataGenerationJobOutput DataGenerationJobOutput(string type = null) { throw null; } + public static Azure.AI.Projects.DataGenerationJobOutputOptions DataGenerationJobOutputOptions(string name = null, string description = null, System.Collections.Generic.IDictionary tags = null) { throw null; } + public static Azure.AI.Projects.DataGenerationJobResult DataGenerationJobResult(System.Collections.Generic.IEnumerable outputs = null, int generatedSamples = 0, Azure.AI.Projects.DataGenerationTokenUsage tokenUsage = null) { throw null; } + public static Azure.AI.Projects.DataGenerationJobSource DataGenerationJobSource(string type = null, string description = null) { throw null; } + public static Azure.AI.Projects.DataGenerationModelOptions DataGenerationModelOptions(string model = null) { throw null; } + public static Azure.AI.Projects.DataGenerationTokenUsage DataGenerationTokenUsage(long promptTokens = (long)0, long completionTokens = (long)0, long totalTokens = (long)0) { throw null; } public static Azure.AI.Projects.DatasetCredential DatasetCredential(Azure.AI.Projects.AIProjectBlobReference blobReference = null) { throw null; } - public static Azure.AI.Projects.DeleteMemoryResponse DeleteMemoryResponse(string name = null, string memoryId = null, bool deleted = false) { throw null; } + public static Azure.AI.Projects.DatasetDataGenerationJobOutput DatasetDataGenerationJobOutput(string id = null, string name = null, string version = null, string description = null, System.Collections.Generic.IReadOnlyDictionary tags = null) { throw null; } + public static Azure.AI.Projects.DatasetDataGenerationJobSource DatasetDataGenerationJobSource(string description = null, string name = null, string version = null) { throw null; } + public static Azure.AI.Projects.DatasetEvaluatorGenerationJobSource DatasetEvaluatorGenerationJobSource(string description = null, string name = null, string version = null) { throw null; } + public static Azure.AI.Projects.DatasetReference DatasetReference(string name = null, string version = null) { throw null; } + public static Azure.AI.Projects.DeleteMemoryResponse DeleteMemoryResponse(string memoryId = null, bool deleted = false) { throw null; } public static Azure.AI.Projects.Memory.DeleteMemoryStoreResponse DeleteMemoryStoreResponse(string name = null, bool isDeleted = false) { throw null; } + public static Azure.AI.Projects.DispatchRoutineResponse DispatchRoutineResponse(string dispatchId = null, string actionCorrelationId = null, string taskId = null) { throw null; } public static Azure.AI.Projects.EmbeddingConfiguration EmbeddingConfiguration(string modelDeploymentName = null, string embeddingField = null) { throw null; } public static Azure.AI.Projects.Evaluation.EvalResult EvalResult(string name = null, string type = null, float score = 0f, bool isPassed = false) { throw null; } public static Azure.AI.Projects.Evaluation.EvalRunResultCompareItem EvalRunResultCompareItem(string treatmentRunId = null, Azure.AI.Projects.Evaluation.EvalRunResultSummary treatmentRunSummary = null, float deltaEstimate = 0f, float pValue = 0f, Azure.AI.Projects.TreatmentEffectType treatmentEffect = default(Azure.AI.Projects.TreatmentEffectType)) { throw null; } @@ -496,15 +583,25 @@ public static partial class AzureAIProjectsModelFactory public static Azure.AI.Projects.Evaluation.EvaluationRunClusterInsightRequest EvaluationRunClusterInsightRequest(string evalId = null, System.Collections.Generic.IEnumerable runIds = null, Azure.AI.Projects.Evaluation.InsightModelConfiguration modelConfiguration = null) { throw null; } public static Azure.AI.Projects.Evaluation.EvaluationRunClusterInsightResult EvaluationRunClusterInsightResult(Azure.AI.Projects.Evaluation.ClusterInsightResult clusterInsight = null) { throw null; } public static Azure.AI.Projects.Evaluation.EvaluationScheduleTask EvaluationScheduleTask(System.Collections.Generic.IDictionary configuration = null, string evalId = null, System.BinaryData evalRun = null) { throw null; } + public static Azure.AI.Projects.Evaluation.EvaluationsDimension EvaluationsDimension(string id = null, string description = null, int weight = 0, bool? alwaysApplicable = default(bool?)) { throw null; } public static Azure.AI.Projects.Evaluation.EvaluationTarget EvaluationTarget(string type = null) { throw null; } public static Azure.AI.Projects.Evaluation.EvaluationTaxonomy EvaluationTaxonomy(string id = null, string name = null, string version = null, string description = null, System.Collections.Generic.IDictionary tags = null, Azure.AI.Projects.Evaluation.EvaluationTaxonomyInput taxonomyInput = null, System.Collections.Generic.IEnumerable taxonomyCategories = null, System.Collections.Generic.IDictionary properties = null) { throw null; } + public static Azure.AI.Projects.EvaluatorCredentialRequest EvaluatorCredentialRequest(System.Uri blobUri = null) { throw null; } public static Azure.AI.Projects.Evaluation.EvaluatorDefinition EvaluatorDefinition(string type = null, System.BinaryData initParameters = null, System.BinaryData dataSchema = null, System.Collections.Generic.IDictionary metrics = null) { throw null; } + public static Azure.AI.Projects.EvaluatorGenerationArtifacts EvaluatorGenerationArtifacts(Azure.AI.Projects.DatasetReference dataset = null, System.Collections.Generic.IEnumerable kinds = null) { throw null; } + public static Azure.AI.Projects.EvaluatorGenerationInputs EvaluatorGenerationInputs(System.Collections.Generic.IEnumerable sources = null, string model = null, string evaluatorName = null, string evaluatorDisplayName = null, string evaluatorDescription = null) { throw null; } + public static Azure.AI.Projects.EvaluatorGenerationJobSource EvaluatorGenerationJobSource(string type = null) { throw null; } + public static Azure.AI.Projects.EvaluatorGenerationTokenUsage EvaluatorGenerationTokenUsage(long inputTokens = (long)0, long outputTokens = (long)0, long totalTokens = (long)0) { throw null; } public static Azure.AI.Projects.Evaluation.EvaluatorMetric EvaluatorMetric(Azure.AI.Projects.Evaluation.EvaluatorMetricType? type, Azure.AI.Projects.Evaluation.EvaluatorMetricDirection? desirableDirection, float? minValue, float? maxValue, bool? isPrimary) { throw null; } public static Azure.AI.Projects.Evaluation.EvaluatorMetric EvaluatorMetric(Azure.AI.Projects.Evaluation.EvaluatorMetricType? type = default(Azure.AI.Projects.Evaluation.EvaluatorMetricType?), Azure.AI.Projects.Evaluation.EvaluatorMetricDirection? desirableDirection = default(Azure.AI.Projects.Evaluation.EvaluatorMetricDirection?), float? minValue = default(float?), float? maxValue = default(float?), float? threshold = default(float?), bool? isPrimary = default(bool?)) { throw null; } - public static Azure.AI.Projects.Evaluation.EvaluatorVersion EvaluatorVersion(string displayName = null, System.Collections.Generic.IDictionary metadata = null, Azure.AI.Projects.EvaluatorType evaluatorType = default(Azure.AI.Projects.EvaluatorType), System.Collections.Generic.IEnumerable categories = null, Azure.AI.Projects.Evaluation.EvaluatorDefinition definition = null, string createdBy = null, string createdAt = null, string modifiedAt = null, string id = null, string name = null, string version = null, string description = null, System.Collections.Generic.IDictionary tags = null) { throw null; } + public static Azure.AI.Projects.Evaluation.EvaluatorVersion EvaluatorVersion(string displayName = null, System.Collections.Generic.IDictionary metadata = null, Azure.AI.Projects.EvaluatorType evaluatorType = default(Azure.AI.Projects.EvaluatorType), System.Collections.Generic.IEnumerable categories = null, Azure.AI.Projects.Evaluation.EvaluatorDefinition definition = null, Azure.AI.Projects.EvaluatorGenerationArtifacts generationArtifacts = null, string createdBy = null, string createdAt = null, string modifiedAt = null, string id = null, string name = null, string version = null, string description = null, System.Collections.Generic.IDictionary tags = null) { throw null; } + public static Azure.AI.Projects.Evaluation.EvaluatorVersion EvaluatorVersion(string displayName, System.Collections.Generic.IDictionary metadata, Azure.AI.Projects.EvaluatorType evaluatorType, System.Collections.Generic.IEnumerable categories, Azure.AI.Projects.Evaluation.EvaluatorDefinition definition, string createdBy, string createdAt, string modifiedAt, string id, string name, string version, string description, System.Collections.Generic.IDictionary tags) { throw null; } + public static Azure.AI.Projects.FileDataGenerationJobOutput FileDataGenerationJobOutput(string id = null, string filename = null) { throw null; } + public static Azure.AI.Projects.FileDataGenerationJobSource FileDataGenerationJobSource(string description = null, string id = null) { throw null; } public static Azure.AI.Projects.FileDataset FileDataset(System.Uri dataUri = null, bool? isReference = default(bool?), string connectionName = null, string id = null, string name = null, string version = null, string description = null, System.Collections.Generic.IDictionary tags = null) { throw null; } public static Azure.AI.Projects.FolderDataset FolderDataset(System.Uri dataUri = null, bool? isReference = default(bool?), string connectionName = null, string id = null, string name = null, string version = null, string description = null, System.Collections.Generic.IDictionary tags = null) { throw null; } public static Azure.AI.Projects.FoundryModelWarning FoundryModelWarning(Azure.AI.Projects.FoundryModelWarningCode? code = default(Azure.AI.Projects.FoundryModelWarningCode?), string message = null) { throw null; } + public static Azure.AI.Projects.GitHubIssueOpenedRoutineTrigger GitHubIssueOpenedRoutineTrigger(string connectionId = null, string assignee = null, string repository = null) { throw null; } public static Azure.AI.Projects.Evaluation.HumanEvaluationPreviewRuleAction HumanEvaluationPreviewRuleAction(string templateId = null) { throw null; } public static Azure.AI.Projects.InputFileContentParam InputFileContentParam(string fileId = null, string filename = null, string fileData = null, System.Uri fileUri = null) { throw null; } public static Azure.AI.Projects.InputTextContentParam InputTextContentParam(string text = null) { throw null; } @@ -515,6 +612,10 @@ public static partial class AzureAIProjectsModelFactory public static Azure.AI.Projects.Evaluation.InsightScheduleTask InsightScheduleTask(System.Collections.Generic.IDictionary configuration = null, Azure.AI.Projects.Evaluation.ProjectsInsight insight = null) { throw null; } public static Azure.AI.Projects.Evaluation.InsightsMetadata InsightsMetadata(System.DateTimeOffset createdAt = default(System.DateTimeOffset), System.DateTimeOffset? completedAt = default(System.DateTimeOffset?)) { throw null; } public static Azure.AI.Projects.Evaluation.InsightSummary InsightSummary(int sampleCount = 0, int uniqueSubclusterCount = 0, int uniqueClusterCount = 0, string methodName = null, Azure.AI.Projects.Evaluation.ClusterTokenUsage usage = null) { throw null; } + public static Azure.AI.Projects.InvokeAgentInvocationsApiDispatchPayload InvokeAgentInvocationsApiDispatchPayload(string input = null) { throw null; } + public static Azure.AI.Projects.InvokeAgentInvocationsApiRoutineAction InvokeAgentInvocationsApiRoutineAction(string agentEndpointId = null, string sessionId = null) { throw null; } + public static Azure.AI.Projects.InvokeAgentResponsesApiDispatchPayload InvokeAgentResponsesApiDispatchPayload(string input = null) { throw null; } + public static Azure.AI.Projects.InvokeAgentResponsesApiRoutineAction InvokeAgentResponsesApiRoutineAction(string agentName = null, string agentEndpointId = null, string conversationId = null) { throw null; } public static Azure.AI.Projects.LoraConfig LoraConfig(int? rank = default(int?), int? alpha = default(int?), System.Collections.Generic.IEnumerable targetModules = null, float? dropout = default(float?)) { throw null; } public static Azure.AI.Projects.ManagedAzureAISearchIndex ManagedAzureAISearchIndex(string id = null, string name = null, string version = null, string description = null, System.Collections.Generic.IDictionary tags = null, string vectorStoreId = null) { throw null; } public static Azure.AI.Projects.Memory.MemoryItem MemoryItem(string memoryId = null, System.DateTimeOffset updatedAt = default(System.DateTimeOffset), string scope = null, string content = null, string kind = null) { throw null; } @@ -522,7 +623,8 @@ public static partial class AzureAIProjectsModelFactory public static Azure.AI.Projects.Memory.MemorySearchItem MemorySearchItem(Azure.AI.Projects.Memory.MemoryItem memoryItem = null) { throw null; } public static Azure.AI.Projects.Memory.MemorySearchResultOptions MemorySearchResultOptions(int? maxMemories = default(int?)) { throw null; } public static Azure.AI.Projects.Memory.MemoryStore MemoryStore(string id = null, System.DateTimeOffset createdAt = default(System.DateTimeOffset), System.DateTimeOffset updatedAt = default(System.DateTimeOffset), string name = null, string description = null, System.Collections.Generic.IDictionary metadata = null, Azure.AI.Projects.Memory.MemoryStoreDefinition definition = null) { throw null; } - public static Azure.AI.Projects.Memory.MemoryStoreDefaultOptions MemoryStoreDefaultOptions(bool isUserProfileEnabled = false, string userProfileDetails = null, bool isChatSummaryEnabled = false) { throw null; } + public static Azure.AI.Projects.Memory.MemoryStoreDefaultOptions MemoryStoreDefaultOptions(bool isUserProfileEnabled, string userProfileDetails, bool isChatSummaryEnabled) { throw null; } + public static Azure.AI.Projects.Memory.MemoryStoreDefaultOptions MemoryStoreDefaultOptions(bool isUserProfileEnabled = false, string userProfileDetails = null, bool isChatSummaryEnabled = false, bool? proceduralMemoryEnabled = default(bool?), System.TimeSpan? defaultTtlSeconds = default(System.TimeSpan?)) { throw null; } public static Azure.AI.Projects.Memory.MemoryStoreDeleteScopeResponse MemoryStoreDeleteScopeResponse(string name = null, string scope = null, bool isDeleted = false) { throw null; } public static Azure.AI.Projects.Memory.MemoryStoreOperationUsage MemoryStoreOperationUsage(int embeddingTokens = 0, long inputTokens = (long)0, Azure.AI.Projects.ResponseUsageInputTokensDetails inputTokensDetails = null, long outputTokens = (long)0, Azure.AI.Projects.ResponseUsageOutputTokensDetails outputTokensDetails = null, long totalTokens = (long)0) { throw null; } public static Azure.AI.Projects.Memory.MemoryStoreSearchResponse MemoryStoreSearchResponse(string searchId = null, System.Collections.Generic.IEnumerable memories = null, Azure.AI.Projects.Memory.MemoryStoreOperationUsage usage = null) { throw null; } @@ -540,19 +642,36 @@ public static partial class AzureAIProjectsModelFactory public static Azure.AI.Projects.PendingUploadConfiguration PendingUploadConfiguration(string pendingUploadId, string connectionName, Azure.AI.Projects.PendingUploadType pendingUploadType) { throw null; } public static Azure.AI.Projects.PendingUploadResult PendingUploadResult(Azure.AI.Projects.AIProjectBlobReference blobReference = null, string pendingUploadId = null, string version = null) { throw null; } public static Azure.AI.Projects.PendingUploadResult PendingUploadResult(Azure.AI.Projects.AIProjectBlobReference blobReference, string pendingUploadId, string version, Azure.AI.Projects.PendingUploadType pendingUploadType) { throw null; } + public static Azure.AI.Projects.ProceduralMemoryItem ProceduralMemoryItem(string memoryId = null, System.DateTimeOffset updatedAt = default(System.DateTimeOffset), string scope = null, string content = null) { throw null; } public static Azure.AI.Projects.Evaluation.ProjectsInsight ProjectsInsight(string id = null, Azure.AI.Projects.Evaluation.InsightsMetadata metadata = null, Azure.AI.Projects.Evaluation.OperationStatus state = default(Azure.AI.Projects.Evaluation.OperationStatus), string displayName = null, Azure.AI.Projects.Evaluation.InsightRequest request = null, Azure.AI.Projects.Evaluation.InsightResult result = null) { throw null; } + public static Azure.AI.Projects.ProjectsRoutine ProjectsRoutine(string name = null, string description = null, bool enabled = false, System.Collections.Generic.IDictionary triggers = null, Azure.AI.Projects.RoutineAction action = null, System.DateTimeOffset? createdAt = default(System.DateTimeOffset?), System.DateTimeOffset? updatedAt = default(System.DateTimeOffset?)) { throw null; } public static Azure.AI.Projects.Evaluation.ProjectsSchedule ProjectsSchedule(string id = null, string displayName = null, string description = null, bool enabled = false, Azure.AI.Projects.Evaluation.ScheduleProvisioningStatus? provisioningStatus = default(Azure.AI.Projects.Evaluation.ScheduleProvisioningStatus?), Azure.AI.Projects.Evaluation.ScheduleTrigger trigger = null, Azure.AI.Projects.ProjectsScheduleTask task = null, System.Collections.Generic.IDictionary tags = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IReadOnlyDictionary systemData = null) { throw null; } public static Azure.AI.Projects.ProjectsScheduleTask ProjectsScheduleTask(string type = null, System.Collections.Generic.IDictionary configuration = null) { throw null; } public static Azure.AI.Projects.Evaluation.PromptBasedEvaluatorDefinition PromptBasedEvaluatorDefinition(System.BinaryData initParameters = null, System.BinaryData dataSchema = null, System.Collections.Generic.IDictionary metrics = null, string promptText = null) { throw null; } + public static Azure.AI.Projects.PromptDataGenerationJobSource PromptDataGenerationJobSource(string description = null, string prompt = null) { throw null; } + public static Azure.AI.Projects.PromptEvaluatorGenerationJobSource PromptEvaluatorGenerationJobSource(string description = null, string prompt = null) { throw null; } public static Azure.AI.Projects.Evaluation.RedTeam RedTeam(string name = null, string displayName = null, int? turnCount = default(int?), System.Collections.Generic.IEnumerable attackStrategies = null, bool? isSimulationOnly = default(bool?), System.Collections.Generic.IEnumerable riskCategories = null, string applicationScenario = null, System.Collections.Generic.IDictionary tags = null, System.Collections.Generic.IDictionary properties = null, string status = null, Azure.AI.Projects.Evaluation.TargetConfig target = null) { throw null; } public static Azure.AI.Projects.ResponseUsageInputTokensDetails ResponseUsageInputTokensDetails(long cachedTokens = (long)0) { throw null; } public static Azure.AI.Projects.ResponseUsageOutputTokensDetails ResponseUsageOutputTokensDetails(long reasoningTokens = (long)0) { throw null; } + public static Azure.AI.Projects.RoutineAction RoutineAction(string type = null) { throw null; } + public static Azure.AI.Projects.RoutineDispatchPayload RoutineDispatchPayload(string type = null) { throw null; } + public static Azure.AI.Projects.RoutineRun RoutineRun(string id = null, string status = null, Azure.AI.Projects.RoutineRunPhase? phase = default(Azure.AI.Projects.RoutineRunPhase?), Azure.AI.Projects.RoutineTriggerType triggerType = default(Azure.AI.Projects.RoutineTriggerType), Azure.AI.Projects.RoutineAttemptSource? attemptSource = default(Azure.AI.Projects.RoutineAttemptSource?), Azure.AI.Projects.RoutineActionType? actionType = default(Azure.AI.Projects.RoutineActionType?), System.DateTimeOffset? triggeredAt = default(System.DateTimeOffset?), System.DateTimeOffset startedAt = default(System.DateTimeOffset), System.DateTimeOffset? endedAt = default(System.DateTimeOffset?), string dispatchId = null, string actionCorrelationId = null, string responseId = null, string taskId = null, string errorType = null, string errorMessage = null, Azure.AI.Projects.RoutineRunDiagnostics diagnostics = null) { throw null; } + public static Azure.AI.Projects.RoutineRunDiagnostics RoutineRunDiagnostics(System.Collections.Generic.IDictionary parameters = null, System.Collections.Generic.IDictionary tags = null, System.Collections.Generic.IDictionary metrics = null) { throw null; } + public static Azure.AI.Projects.RoutineTrigger RoutineTrigger(string type = null) { throw null; } + public static Azure.AI.Projects.RubricBasedEvaluatorDefinition RubricBasedEvaluatorDefinition(System.BinaryData initParameters = null, System.BinaryData dataSchema = null, System.Collections.Generic.IDictionary metrics = null, System.Collections.Generic.IEnumerable dimensions = null, float? passThreshold = default(float?)) { throw null; } + public static Azure.AI.Projects.ScheduleRoutineTrigger ScheduleRoutineTrigger(string cronExpression = null, string timeZone = null) { throw null; } public static Azure.AI.Projects.Evaluation.ScheduleRun ScheduleRun(string runId = null, string scheduleId = null, bool success = false, System.DateTimeOffset? triggerTime = default(System.DateTimeOffset?), string error = null, System.Collections.Generic.IReadOnlyDictionary properties = null) { throw null; } + public static Azure.AI.Projects.SimpleQnADataGenerationJobOptions SimpleQnADataGenerationJobOptions(int maxSamples = 0, float? trainSplit = default(float?), Azure.AI.Projects.DataGenerationModelOptions modelOptions = null, System.Collections.Generic.IEnumerable questionTypes = null) { throw null; } public static Azure.AI.Projects.SystemDataV3 SystemDataV3(System.DateTimeOffset? createdAt = default(System.DateTimeOffset?), string createdBy = null, string createdByType = null, System.DateTimeOffset? lastModifiedAt = default(System.DateTimeOffset?)) { throw null; } public static Azure.AI.Projects.Evaluation.TargetConfig TargetConfig(string type = null) { throw null; } public static Azure.AI.Projects.Evaluation.TaxonomyCategory TaxonomyCategory(string id = null, string name = null, string description = null, Azure.AI.Projects.Evaluation.RiskCategory riskCategory = default(Azure.AI.Projects.Evaluation.RiskCategory), System.Collections.Generic.IEnumerable subCategories = null, System.Collections.Generic.IDictionary properties = null) { throw null; } public static Azure.AI.Projects.Evaluation.TaxonomySubCategory TaxonomySubCategory(string id = null, string name = null, string description = null, bool isEnabled = false, System.Collections.Generic.IDictionary properties = null) { throw null; } + public static Azure.AI.Projects.TimerRoutineTrigger TimerRoutineTrigger(string at = null, string timeZone = null) { throw null; } public static Azure.AI.Projects.ToolDescription ToolDescription(string name = null, string description = null) { throw null; } + public static Azure.AI.Projects.ToolUseFineTuningDataGenerationJobOptions ToolUseFineTuningDataGenerationJobOptions(int maxSamples = 0, float? trainSplit = default(float?), Azure.AI.Projects.DataGenerationModelOptions modelOptions = null) { throw null; } + public static Azure.AI.Projects.TracesDataGenerationJobOptions TracesDataGenerationJobOptions(int maxSamples = 0, float? trainSplit = default(float?), Azure.AI.Projects.DataGenerationModelOptions modelOptions = null) { throw null; } + public static Azure.AI.Projects.TracesDataGenerationJobSource TracesDataGenerationJobSource(string description = null, string agentId = null, string agentName = null, string agentVersion = null, System.DateTimeOffset startTime = default(System.DateTimeOffset), System.DateTimeOffset? endTime = default(System.DateTimeOffset?)) { throw null; } + public static Azure.AI.Projects.TracesEvaluatorGenerationJobSource TracesEvaluatorGenerationJobSource(string description = null, string agentId = null, string agentName = null, string agentVersion = null, System.DateTimeOffset startTime = default(System.DateTimeOffset), System.DateTimeOffset? endTime = default(System.DateTimeOffset?)) { throw null; } public static Azure.AI.Projects.Memory.UserProfileMemoryItem UserProfileMemoryItem(string memoryId = null, System.DateTimeOffset updatedAt = default(System.DateTimeOffset), string scope = null, string content = null) { throw null; } } public partial class AzureAISearchIndex : Azure.AI.Projects.AIProjectIndex, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel @@ -627,6 +746,202 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class DataGenerationJob : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataGenerationJob() { } + public System.DateTimeOffset CreatedAt { get { throw null; } } + public System.DateTimeOffset? FinishedAt { get { throw null; } } + public string Id { get { throw null; } } + public Azure.AI.Projects.DataGenerationJobInputs Inputs { get { throw null; } set { } } + public Azure.AI.Projects.DataGenerationJobResult Result { get { throw null; } } + public Azure.AI.Projects.JobStatus Status { get { throw null; } } + protected virtual Azure.AI.Projects.DataGenerationJob JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + public static explicit operator Azure.AI.Projects.DataGenerationJob (System.ClientModel.ClientResult result) { throw null; } + public static implicit operator System.ClientModel.BinaryContent (Azure.AI.Projects.DataGenerationJob dataGenerationJob) { throw null; } + protected virtual Azure.AI.Projects.DataGenerationJob PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.DataGenerationJob System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.DataGenerationJob System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataGenerationJobInputs : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataGenerationJobInputs(string name, System.Collections.Generic.IEnumerable sources, Azure.AI.Projects.DataGenerationJobOptions options, Azure.AI.Projects.DataGenerationJobScenario scenario) { } + public string Name { get { throw null; } set { } } + public Azure.AI.Projects.DataGenerationJobOptions Options { get { throw null; } set { } } + public Azure.AI.Projects.DataGenerationJobOutputOptions OutputOptions { get { throw null; } set { } } + public Azure.AI.Projects.DataGenerationJobScenario Scenario { get { throw null; } set { } } + public System.Collections.Generic.IList Sources { get { throw null; } } + protected virtual Azure.AI.Projects.DataGenerationJobInputs JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.DataGenerationJobInputs PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.DataGenerationJobInputs System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.DataGenerationJobInputs System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DataGenerationJobKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DataGenerationJobKind(string value) { throw null; } + public static Azure.AI.Projects.DataGenerationJobKind SimpleQna { get { throw null; } } + public static Azure.AI.Projects.DataGenerationJobKind ToolUse { get { throw null; } } + public static Azure.AI.Projects.DataGenerationJobKind Traces { get { throw null; } } + public bool Equals(Azure.AI.Projects.DataGenerationJobKind other) { throw null; } + public override bool Equals(object obj) { throw null; } + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.AI.Projects.DataGenerationJobKind left, Azure.AI.Projects.DataGenerationJobKind right) { throw null; } + public static implicit operator Azure.AI.Projects.DataGenerationJobKind (string value) { throw null; } + public static implicit operator Azure.AI.Projects.DataGenerationJobKind? (string value) { throw null; } + public static bool operator !=(Azure.AI.Projects.DataGenerationJobKind left, Azure.AI.Projects.DataGenerationJobKind right) { throw null; } + public override string ToString() { throw null; } + } + public abstract partial class DataGenerationJobOptions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DataGenerationJobOptions() { } + public int MaxSamples { get { throw null; } set { } } + public Azure.AI.Projects.DataGenerationModelOptions ModelOptions { get { throw null; } set { } } + public float? TrainSplit { get { throw null; } set { } } + protected virtual Azure.AI.Projects.DataGenerationJobOptions JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.DataGenerationJobOptions PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.DataGenerationJobOptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.DataGenerationJobOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class DataGenerationJobOutput : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DataGenerationJobOutput() { } + protected virtual Azure.AI.Projects.DataGenerationJobOutput JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.DataGenerationJobOutput PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.DataGenerationJobOutput System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.DataGenerationJobOutput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataGenerationJobOutputOptions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataGenerationJobOutputOptions() { } + public string Description { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual Azure.AI.Projects.DataGenerationJobOutputOptions JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.DataGenerationJobOutputOptions PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.DataGenerationJobOutputOptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.DataGenerationJobOutputOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataGenerationJobResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DataGenerationJobResult() { } + public int GeneratedSamples { get { throw null; } } + public System.Collections.Generic.IList Outputs { get { throw null; } } + public Azure.AI.Projects.DataGenerationTokenUsage TokenUsage { get { throw null; } } + protected virtual Azure.AI.Projects.DataGenerationJobResult JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.DataGenerationJobResult PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.DataGenerationJobResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.DataGenerationJobResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("AAIP001")] + public partial class DataGenerationJobs + { + protected DataGenerationJobs() { } + public System.ClientModel.Primitives.ClientPipeline Pipeline { get { throw null; } } + public virtual System.ClientModel.ClientResult CancelGenerationJob(string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CancelGenerationJobAsync(string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.ClientResult CreateGenerationJob(Azure.AI.Projects.DataGenerationJob job, string operationId = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateGenerationJobAsync(Azure.AI.Projects.DataGenerationJob job, string operationId = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual void DeleteGenerationJob(string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { } + public virtual System.Threading.Tasks.Task DeleteGenerationJobAsync(string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.ClientResult GetGenerationJob(string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetGenerationJobAsync(string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.CollectionResult GetGenerationJobs(int? limit = default(int?), Azure.AI.Projects.Memory.MemoryStoreListOrder? order = default(Azure.AI.Projects.Memory.MemoryStoreListOrder?), string after = null, string before = null, Azure.AI.Projects.DataGenerationJobScenario? scenario = default(Azure.AI.Projects.DataGenerationJobScenario?), System.Collections.Generic.IEnumerable kind = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.AsyncCollectionResult GetGenerationJobsAsync(int? limit = default(int?), Azure.AI.Projects.Memory.MemoryStoreListOrder? order = default(Azure.AI.Projects.Memory.MemoryStoreListOrder?), string after = null, string before = null, Azure.AI.Projects.DataGenerationJobScenario? scenario = default(Azure.AI.Projects.DataGenerationJobScenario?), System.Collections.Generic.IEnumerable kind = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DataGenerationJobScenario : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DataGenerationJobScenario(string value) { throw null; } + public static Azure.AI.Projects.DataGenerationJobScenario Evaluation { get { throw null; } } + public static Azure.AI.Projects.DataGenerationJobScenario ReinforcementFinetuning { get { throw null; } } + public static Azure.AI.Projects.DataGenerationJobScenario SupervisedFinetuning { get { throw null; } } + public bool Equals(Azure.AI.Projects.DataGenerationJobScenario other) { throw null; } + public override bool Equals(object obj) { throw null; } + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.AI.Projects.DataGenerationJobScenario left, Azure.AI.Projects.DataGenerationJobScenario right) { throw null; } + public static implicit operator Azure.AI.Projects.DataGenerationJobScenario (string value) { throw null; } + public static implicit operator Azure.AI.Projects.DataGenerationJobScenario? (string value) { throw null; } + public static bool operator !=(Azure.AI.Projects.DataGenerationJobScenario left, Azure.AI.Projects.DataGenerationJobScenario right) { throw null; } + public override string ToString() { throw null; } + } + public abstract partial class DataGenerationJobSource : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DataGenerationJobSource() { } + public virtual string Description { get { throw null; } set { } } + protected virtual Azure.AI.Projects.DataGenerationJobSource JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.DataGenerationJobSource PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.DataGenerationJobSource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.DataGenerationJobSource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataGenerationModelOptions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataGenerationModelOptions(string model) { } + public string Model { get { throw null; } set { } } + protected virtual Azure.AI.Projects.DataGenerationModelOptions JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.DataGenerationModelOptions PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.DataGenerationModelOptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.DataGenerationModelOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataGenerationTokenUsage : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DataGenerationTokenUsage() { } + public long CompletionTokens { get { throw null; } } + public long PromptTokens { get { throw null; } } + public long TotalTokens { get { throw null; } } + protected virtual Azure.AI.Projects.DataGenerationTokenUsage JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.DataGenerationTokenUsage PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.DataGenerationTokenUsage System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.DataGenerationTokenUsage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class DatasetCredential : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal DatasetCredential() { } @@ -642,12 +957,76 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class DatasetDataGenerationJobOutput : Azure.AI.Projects.DataGenerationJobOutput, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DatasetDataGenerationJobOutput() { } + public string Description { get { throw null; } } + public string Id { get { throw null; } } + public string Name { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Tags { get { throw null; } } + public string Version { get { throw null; } } + protected override Azure.AI.Projects.DataGenerationJobOutput JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.DataGenerationJobOutput PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.DatasetDataGenerationJobOutput System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.DatasetDataGenerationJobOutput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DatasetDataGenerationJobSource : Azure.AI.Projects.DataGenerationJobSource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DatasetDataGenerationJobSource(string name) { } + public override string Description { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public string Version { get { throw null; } set { } } + protected override Azure.AI.Projects.DataGenerationJobSource JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.DataGenerationJobSource PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.DatasetDataGenerationJobSource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.DatasetDataGenerationJobSource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DatasetEvaluatorGenerationJobSource : Azure.AI.Projects.EvaluatorGenerationJobSource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DatasetEvaluatorGenerationJobSource(string name) { } + public string Description { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public string Version { get { throw null; } set { } } + protected override Azure.AI.Projects.EvaluatorGenerationJobSource JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.EvaluatorGenerationJobSource PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.DatasetEvaluatorGenerationJobSource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.DatasetEvaluatorGenerationJobSource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DatasetReference : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DatasetReference() { } + public string Name { get { throw null; } } + public string Version { get { throw null; } } + protected virtual Azure.AI.Projects.DatasetReference JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.DatasetReference PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.DatasetReference System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.DatasetReference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class DeleteMemoryResponse : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal DeleteMemoryResponse() { } public bool Deleted { get { throw null; } } public string MemoryId { get { throw null; } } - public string Name { get { throw null; } } public Azure.AI.Projects.Memory.MemoryStoreObjectType Object { get { throw null; } } protected virtual Azure.AI.Projects.DeleteMemoryResponse JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -660,6 +1039,23 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class DispatchRoutineResponse : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DispatchRoutineResponse() { } + public string ActionCorrelationId { get { throw null; } } + public string DispatchId { get { throw null; } } + public string TaskId { get { throw null; } } + protected virtual Azure.AI.Projects.DispatchRoutineResponse JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + public static explicit operator Azure.AI.Projects.DispatchRoutineResponse (System.ClientModel.ClientResult result) { throw null; } + protected virtual Azure.AI.Projects.DispatchRoutineResponse PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.DispatchRoutineResponse System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.DispatchRoutineResponse System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class EmbeddingConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public EmbeddingConfiguration(string modelDeploymentName, string embeddingField) { } @@ -692,6 +1088,121 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.AI.Projects.EvaluationRuleActionType left, Azure.AI.Projects.EvaluationRuleActionType right) { throw null; } public override string ToString() { throw null; } } + public partial class EvaluatorCredentialRequest : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EvaluatorCredentialRequest(System.Uri blobUri) { } + public System.Uri BlobUri { get { throw null; } } + protected virtual Azure.AI.Projects.EvaluatorCredentialRequest JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + public static implicit operator System.ClientModel.BinaryContent (Azure.AI.Projects.EvaluatorCredentialRequest evaluatorCredentialRequest) { throw null; } + protected virtual Azure.AI.Projects.EvaluatorCredentialRequest PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.EvaluatorCredentialRequest System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.EvaluatorCredentialRequest System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EvaluatorGenerationArtifacts : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EvaluatorGenerationArtifacts() { } + public Azure.AI.Projects.DatasetReference Dataset { get { throw null; } } + public System.Collections.Generic.IList Kinds { get { throw null; } } + protected virtual Azure.AI.Projects.EvaluatorGenerationArtifacts JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.EvaluatorGenerationArtifacts PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.EvaluatorGenerationArtifacts System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.EvaluatorGenerationArtifacts System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EvaluatorGenerationInputs : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EvaluatorGenerationInputs(System.Collections.Generic.IEnumerable sources, string model, string evaluatorName) { } + public string EvaluatorDescription { get { throw null; } set { } } + public string EvaluatorDisplayName { get { throw null; } set { } } + public string EvaluatorName { get { throw null; } set { } } + public string Model { get { throw null; } set { } } + public System.Collections.Generic.IList Sources { get { throw null; } } + protected virtual Azure.AI.Projects.EvaluatorGenerationInputs JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.EvaluatorGenerationInputs PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.EvaluatorGenerationInputs System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.EvaluatorGenerationInputs System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EvaluatorGenerationJob : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EvaluatorGenerationJob() { } + public System.DateTimeOffset CreatedAt { get { throw null; } } + public System.DateTimeOffset? FinishedAt { get { throw null; } } + public string Id { get { throw null; } } + public Azure.AI.Projects.EvaluatorGenerationInputs Inputs { get { throw null; } set { } } + public Azure.AI.Projects.Evaluation.EvaluatorVersion Result { get { throw null; } } + public Azure.AI.Projects.JobStatus Status { get { throw null; } } + public Azure.AI.Projects.EvaluatorGenerationTokenUsage Usage { get { throw null; } } + protected virtual Azure.AI.Projects.EvaluatorGenerationJob JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + public static explicit operator Azure.AI.Projects.EvaluatorGenerationJob (System.ClientModel.ClientResult result) { throw null; } + public static implicit operator System.ClientModel.BinaryContent (Azure.AI.Projects.EvaluatorGenerationJob evaluatorGenerationJob) { throw null; } + protected virtual Azure.AI.Projects.EvaluatorGenerationJob PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.EvaluatorGenerationJob System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.EvaluatorGenerationJob System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("AAIP001")] + public partial class EvaluatorGenerationJobs + { + protected EvaluatorGenerationJobs() { } + public System.ClientModel.Primitives.ClientPipeline Pipeline { get { throw null; } } + public virtual System.ClientModel.ClientResult Cancel(string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CancelAsync(string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.ClientResult Create(Azure.AI.Projects.EvaluatorGenerationJob job, string operationId = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateAsync(Azure.AI.Projects.EvaluatorGenerationJob job, string operationId = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual void Delete(string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { } + public virtual System.Threading.Tasks.Task DeleteAsync(string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.ClientResult Get(string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.CollectionResult GetAll(int? limit = default(int?), Azure.AI.Projects.Memory.MemoryStoreListOrder? order = default(Azure.AI.Projects.Memory.MemoryStoreListOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.AsyncCollectionResult GetAllAsync(int? limit = default(int?), Azure.AI.Projects.Memory.MemoryStoreListOrder? order = default(Azure.AI.Projects.Memory.MemoryStoreListOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public abstract partial class EvaluatorGenerationJobSource : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EvaluatorGenerationJobSource() { } + protected virtual Azure.AI.Projects.EvaluatorGenerationJobSource JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.EvaluatorGenerationJobSource PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.EvaluatorGenerationJobSource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.EvaluatorGenerationJobSource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EvaluatorGenerationTokenUsage : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EvaluatorGenerationTokenUsage() { } + public long InputTokens { get { throw null; } } + public long OutputTokens { get { throw null; } } + public long TotalTokens { get { throw null; } } + protected virtual Azure.AI.Projects.EvaluatorGenerationTokenUsage JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.EvaluatorGenerationTokenUsage PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.EvaluatorGenerationTokenUsage System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.EvaluatorGenerationTokenUsage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct EvaluatorType : System.IEquatable { @@ -709,6 +1220,35 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.AI.Projects.EvaluatorType left, Azure.AI.Projects.EvaluatorType right) { throw null; } public override string ToString() { throw null; } } + public partial class FileDataGenerationJobOutput : Azure.AI.Projects.DataGenerationJobOutput, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal FileDataGenerationJobOutput() { } + public string Filename { get { throw null; } } + public string Id { get { throw null; } } + protected override Azure.AI.Projects.DataGenerationJobOutput JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.DataGenerationJobOutput PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.FileDataGenerationJobOutput System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.FileDataGenerationJobOutput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class FileDataGenerationJobSource : Azure.AI.Projects.DataGenerationJobSource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FileDataGenerationJobSource(string id) { } + public string Id { get { throw null; } set { } } + protected override Azure.AI.Projects.DataGenerationJobSource JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.DataGenerationJobSource PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.FileDataGenerationJobSource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.FileDataGenerationJobSource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class FileDataset : Azure.AI.Projects.AIProjectDataset, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public FileDataset(System.Uri dataUri) { } @@ -742,7 +1282,7 @@ public enum FoundryFeaturesOptInKeys RedTeamsV1Preview = 2, InsightsV1Preview = 3, MemoryStoresV1Preview = 4, - ToolboxesV1Preview = 5, + RoutinesV1Preview = 5, SkillsV1Preview = 6, DataGenerationJobsV1Preview = 7, ModelsV1Preview = 8, @@ -853,6 +1393,22 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.AI.Projects.FoundryModelWeightType left, Azure.AI.Projects.FoundryModelWeightType right) { throw null; } public override string ToString() { throw null; } } + public partial class GitHubIssueOpenedRoutineTrigger : Azure.AI.Projects.RoutineTrigger, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public GitHubIssueOpenedRoutineTrigger(string connectionId, string assignee, string repository) { } + public string Assignee { get { throw null; } set { } } + public string ConnectionId { get { throw null; } set { } } + public string Repository { get { throw null; } set { } } + protected override Azure.AI.Projects.RoutineTrigger JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.RoutineTrigger PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.GitHubIssueOpenedRoutineTrigger System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.GitHubIssueOpenedRoutineTrigger System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class InputFileContentParam : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public InputFileContentParam() { } @@ -884,6 +1440,85 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class InvokeAgentInvocationsApiDispatchPayload : Azure.AI.Projects.RoutineDispatchPayload, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public InvokeAgentInvocationsApiDispatchPayload() { } + public string Input { get { throw null; } set { } } + protected override Azure.AI.Projects.RoutineDispatchPayload JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.RoutineDispatchPayload PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.InvokeAgentInvocationsApiDispatchPayload System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.InvokeAgentInvocationsApiDispatchPayload System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class InvokeAgentInvocationsApiRoutineAction : Azure.AI.Projects.RoutineAction, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public InvokeAgentInvocationsApiRoutineAction(string agentEndpointId) { } + public string AgentEndpointId { get { throw null; } set { } } + public string SessionId { get { throw null; } set { } } + protected override Azure.AI.Projects.RoutineAction JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.RoutineAction PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.InvokeAgentInvocationsApiRoutineAction System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.InvokeAgentInvocationsApiRoutineAction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class InvokeAgentResponsesApiDispatchPayload : Azure.AI.Projects.RoutineDispatchPayload, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public InvokeAgentResponsesApiDispatchPayload() { } + public string Input { get { throw null; } set { } } + protected override Azure.AI.Projects.RoutineDispatchPayload JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.RoutineDispatchPayload PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.InvokeAgentResponsesApiDispatchPayload System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.InvokeAgentResponsesApiDispatchPayload System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class InvokeAgentResponsesApiRoutineAction : Azure.AI.Projects.RoutineAction, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public InvokeAgentResponsesApiRoutineAction() { } + public string AgentEndpointId { get { throw null; } set { } } + public string AgentName { get { throw null; } set { } } + public string ConversationId { get { throw null; } set { } } + protected override Azure.AI.Projects.RoutineAction JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.RoutineAction PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.InvokeAgentResponsesApiRoutineAction System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.InvokeAgentResponsesApiRoutineAction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct JobStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public JobStatus(string value) { throw null; } + public static Azure.AI.Projects.JobStatus Cancelled { get { throw null; } } + public static Azure.AI.Projects.JobStatus Failed { get { throw null; } } + public static Azure.AI.Projects.JobStatus InProgress { get { throw null; } } + public static Azure.AI.Projects.JobStatus Queued { get { throw null; } } + public static Azure.AI.Projects.JobStatus Succeeded { get { throw null; } } + public bool Equals(Azure.AI.Projects.JobStatus other) { throw null; } + public override bool Equals(object obj) { throw null; } + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.AI.Projects.JobStatus left, Azure.AI.Projects.JobStatus right) { throw null; } + public static implicit operator Azure.AI.Projects.JobStatus (string value) { throw null; } + public static implicit operator Azure.AI.Projects.JobStatus? (string value) { throw null; } + public static bool operator !=(Azure.AI.Projects.JobStatus left, Azure.AI.Projects.JobStatus right) { throw null; } + public override string ToString() { throw null; } + } public partial class LoraConfig : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public LoraConfig() { } @@ -1110,6 +1745,19 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.AI.Projects.PendingUploadType left, Azure.AI.Projects.PendingUploadType right) { throw null; } public override string ToString() { throw null; } } + public partial class ProceduralMemoryItem : Azure.AI.Projects.Memory.MemoryItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ProceduralMemoryItem() { } + protected override Azure.AI.Projects.Memory.MemoryItem JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.Memory.MemoryItem PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.ProceduralMemoryItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.ProceduralMemoryItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("AAIP001")] public partial class ProjectSchedules { @@ -1140,6 +1788,27 @@ protected ProjectSchedules() { } public virtual System.ClientModel.AsyncCollectionResult GetRunsAsync(string id, Azure.AI.Projects.Evaluation.ScheduleTaskType? type = default(Azure.AI.Projects.Evaluation.ScheduleTaskType?), bool? enabled = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.ClientModel.Primitives.AsyncCollectionResult GetRunsAsync(string id, string type, bool? enabled, System.ClientModel.Primitives.RequestOptions options) { throw null; } } + public partial class ProjectsRoutine : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ProjectsRoutine() { } + public Azure.AI.Projects.RoutineAction Action { get { throw null; } } + public System.DateTimeOffset? CreatedAt { get { throw null; } } + public string Description { get { throw null; } } + public bool Enabled { get { throw null; } } + public string Name { get { throw null; } } + public System.Collections.Generic.IDictionary Triggers { get { throw null; } } + public System.DateTimeOffset? UpdatedAt { get { throw null; } } + protected virtual Azure.AI.Projects.ProjectsRoutine JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + public static explicit operator Azure.AI.Projects.ProjectsRoutine (System.ClientModel.ClientResult result) { throw null; } + protected virtual Azure.AI.Projects.ProjectsRoutine PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.ProjectsRoutine System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.ProjectsRoutine System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public abstract partial class ProjectsScheduleTask : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ProjectsScheduleTask() { } @@ -1154,6 +1823,36 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class PromptDataGenerationJobSource : Azure.AI.Projects.DataGenerationJobSource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PromptDataGenerationJobSource(string prompt) { } + public override string Description { get { throw null; } set { } } + public string Prompt { get { throw null; } set { } } + protected override Azure.AI.Projects.DataGenerationJobSource JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.DataGenerationJobSource PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.PromptDataGenerationJobSource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.PromptDataGenerationJobSource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PromptEvaluatorGenerationJobSource : Azure.AI.Projects.EvaluatorGenerationJobSource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PromptEvaluatorGenerationJobSource(string prompt) { } + public string Description { get { throw null; } set { } } + public string Prompt { get { throw null; } set { } } + protected override Azure.AI.Projects.EvaluatorGenerationJobSource JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.EvaluatorGenerationJobSource PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.PromptEvaluatorGenerationJobSource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.PromptEvaluatorGenerationJobSource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ResponseUsageInputTokensDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ResponseUsageInputTokensDetails() { } @@ -1182,6 +1881,225 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public abstract partial class RoutineAction : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal RoutineAction() { } + protected virtual Azure.AI.Projects.RoutineAction JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.RoutineAction PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.RoutineAction System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.RoutineAction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct RoutineActionType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public RoutineActionType(string value) { throw null; } + public static Azure.AI.Projects.RoutineActionType InvokeAgentInvocationsApi { get { throw null; } } + public static Azure.AI.Projects.RoutineActionType InvokeAgentResponsesApi { get { throw null; } } + public bool Equals(Azure.AI.Projects.RoutineActionType other) { throw null; } + public override bool Equals(object obj) { throw null; } + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.AI.Projects.RoutineActionType left, Azure.AI.Projects.RoutineActionType right) { throw null; } + public static implicit operator Azure.AI.Projects.RoutineActionType (string value) { throw null; } + public static implicit operator Azure.AI.Projects.RoutineActionType? (string value) { throw null; } + public static bool operator !=(Azure.AI.Projects.RoutineActionType left, Azure.AI.Projects.RoutineActionType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct RoutineAttemptSource : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public RoutineAttemptSource(string value) { throw null; } + public static Azure.AI.Projects.RoutineAttemptSource EventFire { get { throw null; } } + public static Azure.AI.Projects.RoutineAttemptSource ManualDispatch { get { throw null; } } + public static Azure.AI.Projects.RoutineAttemptSource QueuedDispatch { get { throw null; } } + public static Azure.AI.Projects.RoutineAttemptSource ScheduleDelivery { get { throw null; } } + public static Azure.AI.Projects.RoutineAttemptSource TimerDelivery { get { throw null; } } + public bool Equals(Azure.AI.Projects.RoutineAttemptSource other) { throw null; } + public override bool Equals(object obj) { throw null; } + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.AI.Projects.RoutineAttemptSource left, Azure.AI.Projects.RoutineAttemptSource right) { throw null; } + public static implicit operator Azure.AI.Projects.RoutineAttemptSource (string value) { throw null; } + public static implicit operator Azure.AI.Projects.RoutineAttemptSource? (string value) { throw null; } + public static bool operator !=(Azure.AI.Projects.RoutineAttemptSource left, Azure.AI.Projects.RoutineAttemptSource right) { throw null; } + public override string ToString() { throw null; } + } + public abstract partial class RoutineDispatchPayload : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal RoutineDispatchPayload() { } + protected virtual Azure.AI.Projects.RoutineDispatchPayload JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.RoutineDispatchPayload PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.RoutineDispatchPayload System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.RoutineDispatchPayload System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class RoutineRun : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal RoutineRun() { } + public string ActionCorrelationId { get { throw null; } } + public Azure.AI.Projects.RoutineActionType? ActionType { get { throw null; } } + public Azure.AI.Projects.RoutineAttemptSource? AttemptSource { get { throw null; } } + public Azure.AI.Projects.RoutineRunDiagnostics Diagnostics { get { throw null; } } + public string DispatchId { get { throw null; } } + public System.DateTimeOffset? EndedAt { get { throw null; } } + public string ErrorMessage { get { throw null; } } + public string ErrorType { get { throw null; } } + public string Id { get { throw null; } } + public Azure.AI.Projects.RoutineRunPhase? Phase { get { throw null; } } + public string ResponseId { get { throw null; } } + public System.DateTimeOffset StartedAt { get { throw null; } } + public string Status { get { throw null; } } + public string TaskId { get { throw null; } } + public System.DateTimeOffset? TriggeredAt { get { throw null; } } + public Azure.AI.Projects.RoutineTriggerType TriggerType { get { throw null; } } + protected virtual Azure.AI.Projects.RoutineRun JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.RoutineRun PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.RoutineRun System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.RoutineRun System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class RoutineRunDiagnostics : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal RoutineRunDiagnostics() { } + public System.Collections.Generic.IDictionary Metrics { get { throw null; } } + public System.Collections.Generic.IDictionary Parameters { get { throw null; } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual Azure.AI.Projects.RoutineRunDiagnostics JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.RoutineRunDiagnostics PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.RoutineRunDiagnostics System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.RoutineRunDiagnostics System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct RoutineRunPhase : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public RoutineRunPhase(string value) { throw null; } + public static Azure.AI.Projects.RoutineRunPhase Completed { get { throw null; } } + public static Azure.AI.Projects.RoutineRunPhase Dispatching { get { throw null; } } + public static Azure.AI.Projects.RoutineRunPhase Failed { get { throw null; } } + public static Azure.AI.Projects.RoutineRunPhase Queued { get { throw null; } } + public bool Equals(Azure.AI.Projects.RoutineRunPhase other) { throw null; } + public override bool Equals(object obj) { throw null; } + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.AI.Projects.RoutineRunPhase left, Azure.AI.Projects.RoutineRunPhase right) { throw null; } + public static implicit operator Azure.AI.Projects.RoutineRunPhase (string value) { throw null; } + public static implicit operator Azure.AI.Projects.RoutineRunPhase? (string value) { throw null; } + public static bool operator !=(Azure.AI.Projects.RoutineRunPhase left, Azure.AI.Projects.RoutineRunPhase right) { throw null; } + public override string ToString() { throw null; } + } + public abstract partial class RoutineTrigger : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal RoutineTrigger() { } + protected virtual Azure.AI.Projects.RoutineTrigger JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.RoutineTrigger PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.RoutineTrigger System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.RoutineTrigger System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct RoutineTriggerType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public RoutineTriggerType(string value) { throw null; } + public static Azure.AI.Projects.RoutineTriggerType GithubIssueOpened { get { throw null; } } + public static Azure.AI.Projects.RoutineTriggerType Schedule { get { throw null; } } + public static Azure.AI.Projects.RoutineTriggerType Timer { get { throw null; } } + public bool Equals(Azure.AI.Projects.RoutineTriggerType other) { throw null; } + public override bool Equals(object obj) { throw null; } + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.AI.Projects.RoutineTriggerType left, Azure.AI.Projects.RoutineTriggerType right) { throw null; } + public static implicit operator Azure.AI.Projects.RoutineTriggerType (string value) { throw null; } + public static implicit operator Azure.AI.Projects.RoutineTriggerType? (string value) { throw null; } + public static bool operator !=(Azure.AI.Projects.RoutineTriggerType left, Azure.AI.Projects.RoutineTriggerType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class RubricBasedEvaluatorDefinition : Azure.AI.Projects.Evaluation.EvaluatorDefinition, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public RubricBasedEvaluatorDefinition(System.Collections.Generic.IEnumerable dimensions) { } + public System.Collections.Generic.IList Dimensions { get { throw null; } } + public float? PassThreshold { get { throw null; } set { } } + protected override Azure.AI.Projects.Evaluation.EvaluatorDefinition JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.Evaluation.EvaluatorDefinition PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.RubricBasedEvaluatorDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.RubricBasedEvaluatorDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ScheduleRoutineTrigger : Azure.AI.Projects.RoutineTrigger, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ScheduleRoutineTrigger(string cronExpression, string timeZone) { } + public string CronExpression { get { throw null; } set { } } + public string TimeZone { get { throw null; } set { } } + protected override Azure.AI.Projects.RoutineTrigger JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.RoutineTrigger PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.ScheduleRoutineTrigger System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.ScheduleRoutineTrigger System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SimpleQnADataGenerationJobOptions : Azure.AI.Projects.DataGenerationJobOptions, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SimpleQnADataGenerationJobOptions(int maxSamples) { } + public System.Collections.Generic.IList QuestionTypes { get { throw null; } } + protected override Azure.AI.Projects.DataGenerationJobOptions JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.DataGenerationJobOptions PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.SimpleQnADataGenerationJobOptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.SimpleQnADataGenerationJobOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SimpleQnAFineTuningQuestionType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SimpleQnAFineTuningQuestionType(string value) { throw null; } + public static Azure.AI.Projects.SimpleQnAFineTuningQuestionType LongAnswer { get { throw null; } } + public static Azure.AI.Projects.SimpleQnAFineTuningQuestionType ShortAnswer { get { throw null; } } + public bool Equals(Azure.AI.Projects.SimpleQnAFineTuningQuestionType other) { throw null; } + public override bool Equals(object obj) { throw null; } + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.AI.Projects.SimpleQnAFineTuningQuestionType left, Azure.AI.Projects.SimpleQnAFineTuningQuestionType right) { throw null; } + public static implicit operator Azure.AI.Projects.SimpleQnAFineTuningQuestionType (string value) { throw null; } + public static implicit operator Azure.AI.Projects.SimpleQnAFineTuningQuestionType? (string value) { throw null; } + public static bool operator !=(Azure.AI.Projects.SimpleQnAFineTuningQuestionType left, Azure.AI.Projects.SimpleQnAFineTuningQuestionType right) { throw null; } + public override string ToString() { throw null; } + } public partial class SystemDataV3 : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal SystemDataV3() { } @@ -1199,6 +2117,21 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class TimerRoutineTrigger : Azure.AI.Projects.RoutineTrigger, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public TimerRoutineTrigger(string at) { } + public string At { get { throw null; } set { } } + public string TimeZone { get { throw null; } set { } } + protected override Azure.AI.Projects.RoutineTrigger JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.RoutineTrigger PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.TimerRoutineTrigger System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.TimerRoutineTrigger System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ToolDescription : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ToolDescription() { } @@ -1214,6 +2147,70 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class ToolUseFineTuningDataGenerationJobOptions : Azure.AI.Projects.DataGenerationJobOptions, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ToolUseFineTuningDataGenerationJobOptions(int maxSamples) { } + protected override Azure.AI.Projects.DataGenerationJobOptions JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.DataGenerationJobOptions PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.ToolUseFineTuningDataGenerationJobOptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.ToolUseFineTuningDataGenerationJobOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TracesDataGenerationJobOptions : Azure.AI.Projects.DataGenerationJobOptions, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public TracesDataGenerationJobOptions(int maxSamples) { } + protected override Azure.AI.Projects.DataGenerationJobOptions JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.DataGenerationJobOptions PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.TracesDataGenerationJobOptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.TracesDataGenerationJobOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TracesDataGenerationJobSource : Azure.AI.Projects.DataGenerationJobSource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public TracesDataGenerationJobSource(System.DateTimeOffset startTime) { } + public string AgentId { get { throw null; } set { } } + public string AgentName { get { throw null; } set { } } + public string AgentVersion { get { throw null; } set { } } + public override string Description { get { throw null; } set { } } + public System.DateTimeOffset? EndTime { get { throw null; } set { } } + public System.DateTimeOffset StartTime { get { throw null; } set { } } + protected override Azure.AI.Projects.DataGenerationJobSource JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.DataGenerationJobSource PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.TracesDataGenerationJobSource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.TracesDataGenerationJobSource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TracesEvaluatorGenerationJobSource : Azure.AI.Projects.EvaluatorGenerationJobSource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public TracesEvaluatorGenerationJobSource(System.DateTimeOffset startTime) { } + public string AgentId { get { throw null; } set { } } + public string AgentName { get { throw null; } set { } } + public string AgentVersion { get { throw null; } set { } } + public string Description { get { throw null; } set { } } + public System.DateTimeOffset? EndTime { get { throw null; } set { } } + public System.DateTimeOffset StartTime { get { throw null; } set { } } + protected override Azure.AI.Projects.EvaluatorGenerationJobSource JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.EvaluatorGenerationJobSource PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.TracesEvaluatorGenerationJobSource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.TracesEvaluatorGenerationJobSource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct TreatmentEffectType : System.IEquatable { @@ -1329,6 +2326,7 @@ public partial class AzureAIAgentTarget : Azure.AI.Projects.Evaluation.Evaluatio public AzureAIAgentTarget(string name) { } public string Name { get { throw null; } set { } } public System.Collections.Generic.IList ToolDescriptions { get { throw null; } } + public System.Collections.Generic.IList Tools { get { throw null; } } public string Version { get { throw null; } set { } } protected override Azure.AI.Projects.Evaluation.EvaluationTarget JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1730,6 +2728,23 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class EvaluationsDimension : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EvaluationsDimension(string id, string description, int weight) { } + public bool? AlwaysApplicable { get { throw null; } set { } } + public string Description { get { throw null; } set { } } + public string Id { get { throw null; } set { } } + public int Weight { get { throw null; } set { } } + protected virtual Azure.AI.Projects.Evaluation.EvaluationsDimension JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.Evaluation.EvaluationsDimension PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.Evaluation.EvaluationsDimension System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.Evaluation.EvaluationsDimension System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public abstract partial class EvaluationTarget : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal EvaluationTarget() { } @@ -1846,6 +2861,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static Azure.AI.Projects.Evaluation.EvaluatorDefinitionType OpenaiGraders { get { throw null; } } public static Azure.AI.Projects.Evaluation.EvaluatorDefinitionType Prompt { get { throw null; } } public static Azure.AI.Projects.Evaluation.EvaluatorDefinitionType PromptAndCode { get { throw null; } } + public static Azure.AI.Projects.Evaluation.EvaluatorDefinitionType Rubric { get { throw null; } } public static Azure.AI.Projects.Evaluation.EvaluatorDefinitionType Service { get { throw null; } } public bool Equals(Azure.AI.Projects.Evaluation.EvaluatorDefinitionType other) { throw null; } public override bool Equals(object obj) { throw null; } @@ -1921,6 +2937,7 @@ public EvaluatorVersion(Azure.AI.Projects.EvaluatorType evaluatorType, System.Co public string Description { get { throw null; } set { } } public string DisplayName { get { throw null; } set { } } public Azure.AI.Projects.EvaluatorType EvaluatorType { get { throw null; } set { } } + public Azure.AI.Projects.EvaluatorGenerationArtifacts GenerationArtifacts { get { throw null; } } public string Id { get { throw null; } } public System.Collections.Generic.IDictionary Metadata { get { throw null; } } public string ModifiedAt { get { throw null; } } @@ -2207,6 +3224,10 @@ protected ProjectEvaluators() { } public virtual System.ClientModel.ClientResult DeleteVersion(string name, string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteVersionAsync(string name, string version, System.ClientModel.Primitives.RequestOptions options) { throw null; } public virtual System.Threading.Tasks.Task DeleteVersionAsync(string name, string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.ClientResult GetCredentials(string name, string version, Azure.AI.Projects.EvaluatorCredentialRequest credentialRequest, Azure.AI.Projects.FoundryFeaturesOptInKeys? foundryFeatures = default(Azure.AI.Projects.FoundryFeaturesOptInKeys?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.ClientResult GetCredentials(string name, string version, System.ClientModel.BinaryContent content, string foundryFeatures = null, System.ClientModel.Primitives.RequestOptions options = null) { throw null; } + public virtual System.Threading.Tasks.Task> GetCredentialsAsync(string name, string version, Azure.AI.Projects.EvaluatorCredentialRequest credentialRequest, Azure.AI.Projects.FoundryFeaturesOptInKeys? foundryFeatures = default(Azure.AI.Projects.FoundryFeaturesOptInKeys?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetCredentialsAsync(string name, string version, System.ClientModel.BinaryContent content, string foundryFeatures = null, System.ClientModel.Primitives.RequestOptions options = null) { throw null; } public virtual System.ClientModel.CollectionResult GetLatestVersions(Azure.AI.Projects.Evaluation.ListVersionsRequestType? type = default(Azure.AI.Projects.Evaluation.ListVersionsRequestType?), int? limit = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.ClientModel.Primitives.CollectionResult GetLatestVersions(string type, int? limit, System.ClientModel.Primitives.RequestOptions options) { throw null; } public virtual System.ClientModel.AsyncCollectionResult GetLatestVersionsAsync(Azure.AI.Projects.Evaluation.ListVersionsRequestType? type = default(Azure.AI.Projects.Evaluation.ListVersionsRequestType?), int? limit = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -2219,6 +3240,10 @@ protected ProjectEvaluators() { } public virtual System.ClientModel.Primitives.CollectionResult GetVersions(string name, string type, int? limit, System.ClientModel.Primitives.RequestOptions options) { throw null; } public virtual System.ClientModel.AsyncCollectionResult GetVersionsAsync(string name, Azure.AI.Projects.Evaluation.ListVersionsRequestType? type = default(Azure.AI.Projects.Evaluation.ListVersionsRequestType?), int? limit = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.ClientModel.Primitives.AsyncCollectionResult GetVersionsAsync(string name, string type, int? limit, System.ClientModel.Primitives.RequestOptions options) { throw null; } + public virtual System.ClientModel.ClientResult StartPendingUpload(string name, string version, Azure.AI.Projects.PendingUploadConfiguration pendingUploadRequest, Azure.AI.Projects.FoundryFeaturesOptInKeys? foundryFeatures = default(Azure.AI.Projects.FoundryFeaturesOptInKeys?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.ClientResult StartPendingUpload(string name, string version, System.ClientModel.BinaryContent content, string foundryFeatures = null, System.ClientModel.Primitives.RequestOptions options = null) { throw null; } + public virtual System.Threading.Tasks.Task> StartPendingUploadAsync(string name, string version, Azure.AI.Projects.PendingUploadConfiguration pendingUploadRequest, Azure.AI.Projects.FoundryFeaturesOptInKeys? foundryFeatures = default(Azure.AI.Projects.FoundryFeaturesOptInKeys?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task StartPendingUploadAsync(string name, string version, System.ClientModel.BinaryContent content, string foundryFeatures = null, System.ClientModel.Primitives.RequestOptions options = null) { throw null; } public virtual System.ClientModel.ClientResult UpdateVersion(string name, string version, System.ClientModel.BinaryContent content, System.ClientModel.Primitives.RequestOptions options = null) { throw null; } public virtual System.Threading.Tasks.Task UpdateVersionAsync(string name, string version, System.ClientModel.BinaryContent content, System.ClientModel.Primitives.RequestOptions options = null) { throw null; } } @@ -2569,10 +3594,9 @@ protected AIProjectMemoryStores() { } public virtual System.ClientModel.ClientResult DeleteScope(string name, string scope, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteScopeAsync(string name, System.ClientModel.BinaryContent content, System.ClientModel.Primitives.RequestOptions options = null) { throw null; } public virtual System.Threading.Tasks.Task> DeleteScopeAsync(string name, string scope, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.ClientModel.CollectionResult GetMemories(string name, int? limit = default(int?), Azure.AI.Projects.Memory.MemoryStoreListOrder? order = default(Azure.AI.Projects.Memory.MemoryStoreListOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.ClientModel.Primitives.CollectionResult GetMemories(string name, int? limit, string order, string after, string before, System.ClientModel.Primitives.RequestOptions options) { throw null; } - public virtual System.ClientModel.AsyncCollectionResult GetMemoriesAsync(string name, int? limit = default(int?), Azure.AI.Projects.Memory.MemoryStoreListOrder? order = default(Azure.AI.Projects.Memory.MemoryStoreListOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.ClientModel.Primitives.AsyncCollectionResult GetMemoriesAsync(string name, int? limit, string order, string after, string before, System.ClientModel.Primitives.RequestOptions options) { throw null; } + public virtual System.ClientModel.CollectionResult GetMemories(string name, string scope, Azure.AI.Projects.Memory.MemoryItemKind? kind = default(Azure.AI.Projects.Memory.MemoryItemKind?), int? limit = default(int?), Azure.AI.Projects.Memory.MemoryStoreListOrder? order = default(Azure.AI.Projects.Memory.MemoryStoreListOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.Primitives.AsyncCollectionResult GetMemoriesAsync(string name, System.ClientModel.BinaryContent content, string kind = null, int? limit = default(int?), string order = null, string after = null, string before = null, System.ClientModel.Primitives.RequestOptions options = null) { throw null; } + public virtual System.ClientModel.AsyncCollectionResult GetMemoriesAsync(string name, string scope, Azure.AI.Projects.Memory.MemoryItemKind? kind = default(Azure.AI.Projects.Memory.MemoryItemKind?), int? limit = default(int?), Azure.AI.Projects.Memory.MemoryStoreListOrder? order = default(Azure.AI.Projects.Memory.MemoryStoreListOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.ClientModel.ClientResult GetMemory(string name, string memoryId, System.ClientModel.Primitives.RequestOptions options) { throw null; } public virtual System.ClientModel.ClientResult GetMemory(string name, string memoryId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task GetMemoryAsync(string name, string memoryId, System.ClientModel.Primitives.RequestOptions options) { throw null; } @@ -2661,6 +3685,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer private readonly int _dummyPrimitive; public MemoryItemKind(string value) { throw null; } public static Azure.AI.Projects.Memory.MemoryItemKind ChatSummary { get { throw null; } } + public static Azure.AI.Projects.Memory.MemoryItemKind Procedural { get { throw null; } } public static Azure.AI.Projects.Memory.MemoryItemKind UserProfile { get { throw null; } } public bool Equals(Azure.AI.Projects.Memory.MemoryItemKind other) { throw null; } public override bool Equals(object obj) { throw null; } @@ -2785,8 +3810,10 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class MemoryStoreDefaultOptions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public MemoryStoreDefaultOptions(bool isUserProfileEnabled, bool isChatSummaryEnabled) { } + public System.TimeSpan? DefaultTtlSeconds { get { throw null; } set { } } public bool IsChatSummaryEnabled { get { throw null; } set { } } public bool IsUserProfileEnabled { get { throw null; } set { } } + public bool? ProceduralMemoryEnabled { get { throw null; } set { } } public string UserProfileDetails { get { throw null; } set { } } protected virtual Azure.AI.Projects.Memory.MemoryStoreDefaultOptions JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } diff --git a/sdk/ai/Azure.AI.Projects/api/Azure.AI.Projects.net8.0.cs b/sdk/ai/Azure.AI.Projects/api/Azure.AI.Projects.net8.0.cs index 56a6f10b2def..23305f56f2f8 100644 --- a/sdk/ai/Azure.AI.Projects/api/Azure.AI.Projects.net8.0.cs +++ b/sdk/ai/Azure.AI.Projects/api/Azure.AI.Projects.net8.0.cs @@ -1,5 +1,37 @@ namespace Azure.AI.Projects { + public partial class AgentDataGenerationJobSource : Azure.AI.Projects.DataGenerationJobSource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AgentDataGenerationJobSource(string agentName) { } + public string AgentName { get { throw null; } set { } } + public string AgentVersion { get { throw null; } set { } } + public override string Description { get { throw null; } set { } } + protected override Azure.AI.Projects.DataGenerationJobSource JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.DataGenerationJobSource PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.AgentDataGenerationJobSource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.AgentDataGenerationJobSource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AgentEvaluatorGenerationJobSource : Azure.AI.Projects.EvaluatorGenerationJobSource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AgentEvaluatorGenerationJobSource(string agentName) { } + public string AgentName { get { throw null; } set { } } + public string AgentVersion { get { throw null; } set { } } + public string Description { get { throw null; } set { } } + protected override Azure.AI.Projects.EvaluatorGenerationJobSource JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.EvaluatorGenerationJobSource PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.AgentEvaluatorGenerationJobSource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.AgentEvaluatorGenerationJobSource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class AgenticIdentityPreviewCredentials : Azure.AI.Projects.AIProjectConnectionBaseCredential, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal AgenticIdentityPreviewCredentials() { } @@ -38,10 +70,12 @@ public AIProjectClient(System.Uri endpoint, System.ClientModel.AuthenticationTok public AIProjectClient(System.Uri endpoint, System.ClientModel.AuthenticationTokenProvider tokenProvider, Azure.AI.Projects.AIProjectClientOptions options) : base (default(int)) { } public virtual Azure.AI.Projects.Agents.AgentAdministrationClient AgentAdministrationClient { get { throw null; } } public virtual Azure.AI.Projects.AIProjectConnectionsOperations Connections { get { throw null; } } + public virtual Azure.AI.Projects.DataGenerationJobs DataGenerationJobs { get { throw null; } } public virtual Azure.AI.Projects.AIProjectDatasetsOperations Datasets { get { throw null; } } public virtual Azure.AI.Projects.AIProjectDeploymentsOperations Deployments { get { throw null; } } public virtual Azure.AI.Projects.Evaluation.EvaluationRules EvaluationRules { get { throw null; } } public virtual Azure.AI.Projects.Evaluation.EvaluationTaxonomies EvaluationTaxonomies { get { throw null; } } + public virtual Azure.AI.Projects.EvaluatorGenerationJobs EvaluatorGenerationJobs { get { throw null; } } public virtual Azure.AI.Projects.Evaluation.ProjectEvaluators Evaluators { get { throw null; } } public virtual Azure.AI.Projects.AIProjectIndexesOperations Indexes { get { throw null; } } public virtual Azure.AI.Projects.Evaluation.ProjectInsights Insights { get { throw null; } } @@ -53,6 +87,7 @@ public AIProjectClient(System.Uri endpoint, System.ClientModel.AuthenticationTok public virtual Azure.AI.Projects.ProjectSchedules Schedules { get { throw null; } } public virtual Azure.AI.Projects.AIProjectTelemetry Telemetry { get { throw null; } } public virtual Azure.AI.Projects.Memory.AIProjectMemoryStores GetAIProjectMemoryStoresClient() { throw null; } + public virtual Azure.AI.Projects.AIProjectRoutines GetAIProjectRoutinesClient() { throw null; } public override System.Collections.Generic.IEnumerable GetAllConnections() { throw null; } public override System.ClientModel.Primitives.ClientConnection GetConnection(string connectionId) { throw null; } } @@ -421,6 +456,43 @@ protected AIProjectModels() { } public virtual System.ClientModel.ClientResult UpdateModelVersion(string name, string version, System.ClientModel.BinaryContent content, System.ClientModel.Primitives.RequestOptions options = null) { throw null; } public virtual System.Threading.Tasks.Task UpdateModelVersionAsync(string name, string version, System.ClientModel.BinaryContent content, System.ClientModel.Primitives.RequestOptions options = null) { throw null; } } + public partial class AIProjectRoutines + { + protected AIProjectRoutines() { } + public System.ClientModel.Primitives.ClientPipeline Pipeline { get { throw null; } } + public virtual System.ClientModel.ClientResult CreateOrUpdateRoutine(string routineName, System.ClientModel.BinaryContent content, string foundryFeatures = null, System.ClientModel.Primitives.RequestOptions options = null) { throw null; } + public virtual System.ClientModel.ClientResult CreateOrUpdateRoutine(string routineName, System.Collections.Generic.IDictionary triggers, Azure.AI.Projects.RoutineAction action, string description = null, bool? enabled = default(bool?), Azure.AI.Projects.FoundryFeaturesOptInKeys? foundryFeatures = default(Azure.AI.Projects.FoundryFeaturesOptInKeys?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task CreateOrUpdateRoutineAsync(string routineName, System.ClientModel.BinaryContent content, string foundryFeatures = null, System.ClientModel.Primitives.RequestOptions options = null) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateRoutineAsync(string routineName, System.Collections.Generic.IDictionary triggers, Azure.AI.Projects.RoutineAction action, string description = null, bool? enabled = default(bool?), Azure.AI.Projects.FoundryFeaturesOptInKeys? foundryFeatures = default(Azure.AI.Projects.FoundryFeaturesOptInKeys?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.ClientResult DeleteRoutine(string routineName, Azure.AI.Projects.FoundryFeaturesOptInKeys? foundryFeatures = default(Azure.AI.Projects.FoundryFeaturesOptInKeys?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.ClientResult DeleteRoutine(string routineName, string foundryFeatures, System.ClientModel.Primitives.RequestOptions options) { throw null; } + public virtual System.Threading.Tasks.Task DeleteRoutineAsync(string routineName, Azure.AI.Projects.FoundryFeaturesOptInKeys? foundryFeatures = default(Azure.AI.Projects.FoundryFeaturesOptInKeys?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteRoutineAsync(string routineName, string foundryFeatures, System.ClientModel.Primitives.RequestOptions options) { throw null; } + public virtual System.ClientModel.ClientResult DisableRoutine(string routineName, Azure.AI.Projects.FoundryFeaturesOptInKeys? foundryFeatures = default(Azure.AI.Projects.FoundryFeaturesOptInKeys?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.ClientResult DisableRoutine(string routineName, string foundryFeatures, System.ClientModel.Primitives.RequestOptions options) { throw null; } + public virtual System.Threading.Tasks.Task> DisableRoutineAsync(string routineName, Azure.AI.Projects.FoundryFeaturesOptInKeys? foundryFeatures = default(Azure.AI.Projects.FoundryFeaturesOptInKeys?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DisableRoutineAsync(string routineName, string foundryFeatures, System.ClientModel.Primitives.RequestOptions options) { throw null; } + public virtual System.ClientModel.ClientResult DispatchRoutineAsync(string routineName, Azure.AI.Projects.RoutineDispatchPayload payload = null, Azure.AI.Projects.FoundryFeaturesOptInKeys? foundryFeatures = default(Azure.AI.Projects.FoundryFeaturesOptInKeys?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.ClientResult DispatchRoutineAsync(string routineName, System.ClientModel.BinaryContent content, string foundryFeatures = null, System.ClientModel.Primitives.RequestOptions options = null) { throw null; } + public virtual System.Threading.Tasks.Task> DispatchRoutineAsyncAsync(string routineName, Azure.AI.Projects.RoutineDispatchPayload payload = null, Azure.AI.Projects.FoundryFeaturesOptInKeys? foundryFeatures = default(Azure.AI.Projects.FoundryFeaturesOptInKeys?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DispatchRoutineAsyncAsync(string routineName, System.ClientModel.BinaryContent content, string foundryFeatures = null, System.ClientModel.Primitives.RequestOptions options = null) { throw null; } + public virtual System.ClientModel.ClientResult EnableRoutine(string routineName, Azure.AI.Projects.FoundryFeaturesOptInKeys? foundryFeatures = default(Azure.AI.Projects.FoundryFeaturesOptInKeys?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.ClientResult EnableRoutine(string routineName, string foundryFeatures, System.ClientModel.Primitives.RequestOptions options) { throw null; } + public virtual System.Threading.Tasks.Task> EnableRoutineAsync(string routineName, Azure.AI.Projects.FoundryFeaturesOptInKeys? foundryFeatures = default(Azure.AI.Projects.FoundryFeaturesOptInKeys?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task EnableRoutineAsync(string routineName, string foundryFeatures, System.ClientModel.Primitives.RequestOptions options) { throw null; } + public virtual System.ClientModel.ClientResult GetRoutine(string routineName, Azure.AI.Projects.FoundryFeaturesOptInKeys? foundryFeatures = default(Azure.AI.Projects.FoundryFeaturesOptInKeys?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.ClientResult GetRoutine(string routineName, string foundryFeatures, System.ClientModel.Primitives.RequestOptions options) { throw null; } + public virtual System.Threading.Tasks.Task> GetRoutineAsync(string routineName, Azure.AI.Projects.FoundryFeaturesOptInKeys? foundryFeatures = default(Azure.AI.Projects.FoundryFeaturesOptInKeys?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetRoutineAsync(string routineName, string foundryFeatures, System.ClientModel.Primitives.RequestOptions options) { throw null; } + public virtual System.ClientModel.CollectionResult GetRoutineRuns(string routineName, Azure.AI.Projects.FoundryFeaturesOptInKeys? foundryFeatures = default(Azure.AI.Projects.FoundryFeaturesOptInKeys?), string filter = null, int? limit = default(int?), Azure.AI.Projects.Memory.MemoryStoreListOrder? order = default(Azure.AI.Projects.Memory.MemoryStoreListOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.Primitives.CollectionResult GetRoutineRuns(string routineName, string foundryFeatures, string filter, int? limit, string order, string after, string before, System.ClientModel.Primitives.RequestOptions options) { throw null; } + public virtual System.ClientModel.AsyncCollectionResult GetRoutineRunsAsync(string routineName, Azure.AI.Projects.FoundryFeaturesOptInKeys? foundryFeatures = default(Azure.AI.Projects.FoundryFeaturesOptInKeys?), string filter = null, int? limit = default(int?), Azure.AI.Projects.Memory.MemoryStoreListOrder? order = default(Azure.AI.Projects.Memory.MemoryStoreListOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.Primitives.AsyncCollectionResult GetRoutineRunsAsync(string routineName, string foundryFeatures, string filter, int? limit, string order, string after, string before, System.ClientModel.Primitives.RequestOptions options) { throw null; } + public virtual System.ClientModel.CollectionResult GetRoutines(Azure.AI.Projects.FoundryFeaturesOptInKeys? foundryFeatures = default(Azure.AI.Projects.FoundryFeaturesOptInKeys?), int? limit = default(int?), Azure.AI.Projects.Memory.MemoryStoreListOrder? order = default(Azure.AI.Projects.Memory.MemoryStoreListOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.Primitives.CollectionResult GetRoutines(string foundryFeatures, int? limit, string order, string after, string before, System.ClientModel.Primitives.RequestOptions options) { throw null; } + public virtual System.ClientModel.AsyncCollectionResult GetRoutinesAsync(Azure.AI.Projects.FoundryFeaturesOptInKeys? foundryFeatures = default(Azure.AI.Projects.FoundryFeaturesOptInKeys?), int? limit = default(int?), Azure.AI.Projects.Memory.MemoryStoreListOrder? order = default(Azure.AI.Projects.Memory.MemoryStoreListOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.Primitives.AsyncCollectionResult GetRoutinesAsync(string foundryFeatures, int? limit, string order, string after, string before, System.ClientModel.Primitives.RequestOptions options) { throw null; } + } public partial class AIProjectTelemetry { public AIProjectTelemetry(Azure.AI.Projects.AIProjectClient outerInstance) { } @@ -452,6 +524,8 @@ public static partial class AzureAIProjectsModelFactory { public static Azure.AI.Projects.Evaluation.AgentClusterInsightRequest AgentClusterInsightRequest(string agentName = null, Azure.AI.Projects.Evaluation.InsightModelConfiguration modelConfiguration = null) { throw null; } public static Azure.AI.Projects.Evaluation.AgentClusterInsightResult AgentClusterInsightResult(Azure.AI.Projects.Evaluation.ClusterInsightResult clusterInsight = null) { throw null; } + public static Azure.AI.Projects.AgentDataGenerationJobSource AgentDataGenerationJobSource(string description = null, string agentName = null, string agentVersion = null) { throw null; } + public static Azure.AI.Projects.AgentEvaluatorGenerationJobSource AgentEvaluatorGenerationJobSource(string description = null, string agentName = null, string agentVersion = null) { throw null; } public static Azure.AI.Projects.AgenticIdentityPreviewCredentials AgenticIdentityPreviewCredentials() { throw null; } public static Azure.AI.Projects.AIProjectBlobReference AIProjectBlobReference(System.Uri blobUri = null, string storageAccountArmId = null, Azure.AI.Projects.BlobReferenceSasCredential credential = null) { throw null; } public static Azure.AI.Projects.AIProjectConnection AIProjectConnection(string name = null, string id = null, Azure.AI.Projects.ConnectionType type = default(Azure.AI.Projects.ConnectionType), string target = null, bool isDefault = false, Azure.AI.Projects.AIProjectConnectionBaseCredential credentials = null, System.Collections.Generic.IReadOnlyDictionary metadata = null) { throw null; } @@ -480,9 +554,22 @@ public static partial class AzureAIProjectsModelFactory public static Azure.AI.Projects.Evaluation.CodeBasedEvaluatorDefinition CodeBasedEvaluatorDefinition(System.BinaryData initParameters = null, System.BinaryData dataSchema = null, System.Collections.Generic.IDictionary metrics = null, string codeText = null, string entryPoint = null, string imageTag = null, System.Uri blobUri = null) { throw null; } public static Azure.AI.Projects.Evaluation.ContinuousEvaluationRuleAction ContinuousEvaluationRuleAction(string evalId = null, int? maxHourlyRuns = default(int?)) { throw null; } public static Azure.AI.Projects.CreateAsyncResponse CreateAsyncResponse(System.Uri location = null, System.Uri operationResult = null) { throw null; } + public static Azure.AI.Projects.DataGenerationJobInputs DataGenerationJobInputs(string name = null, System.Collections.Generic.IEnumerable sources = null, Azure.AI.Projects.DataGenerationJobOptions options = null, Azure.AI.Projects.DataGenerationJobScenario scenario = default(Azure.AI.Projects.DataGenerationJobScenario), Azure.AI.Projects.DataGenerationJobOutputOptions outputOptions = null) { throw null; } + public static Azure.AI.Projects.DataGenerationJobOptions DataGenerationJobOptions(string type = null, int maxSamples = 0, float? trainSplit = default(float?), Azure.AI.Projects.DataGenerationModelOptions modelOptions = null) { throw null; } + public static Azure.AI.Projects.DataGenerationJobOutput DataGenerationJobOutput(string type = null) { throw null; } + public static Azure.AI.Projects.DataGenerationJobOutputOptions DataGenerationJobOutputOptions(string name = null, string description = null, System.Collections.Generic.IDictionary tags = null) { throw null; } + public static Azure.AI.Projects.DataGenerationJobResult DataGenerationJobResult(System.Collections.Generic.IEnumerable outputs = null, int generatedSamples = 0, Azure.AI.Projects.DataGenerationTokenUsage tokenUsage = null) { throw null; } + public static Azure.AI.Projects.DataGenerationJobSource DataGenerationJobSource(string type = null, string description = null) { throw null; } + public static Azure.AI.Projects.DataGenerationModelOptions DataGenerationModelOptions(string model = null) { throw null; } + public static Azure.AI.Projects.DataGenerationTokenUsage DataGenerationTokenUsage(long promptTokens = (long)0, long completionTokens = (long)0, long totalTokens = (long)0) { throw null; } public static Azure.AI.Projects.DatasetCredential DatasetCredential(Azure.AI.Projects.AIProjectBlobReference blobReference = null) { throw null; } - public static Azure.AI.Projects.DeleteMemoryResponse DeleteMemoryResponse(string name = null, string memoryId = null, bool deleted = false) { throw null; } + public static Azure.AI.Projects.DatasetDataGenerationJobOutput DatasetDataGenerationJobOutput(string id = null, string name = null, string version = null, string description = null, System.Collections.Generic.IReadOnlyDictionary tags = null) { throw null; } + public static Azure.AI.Projects.DatasetDataGenerationJobSource DatasetDataGenerationJobSource(string description = null, string name = null, string version = null) { throw null; } + public static Azure.AI.Projects.DatasetEvaluatorGenerationJobSource DatasetEvaluatorGenerationJobSource(string description = null, string name = null, string version = null) { throw null; } + public static Azure.AI.Projects.DatasetReference DatasetReference(string name = null, string version = null) { throw null; } + public static Azure.AI.Projects.DeleteMemoryResponse DeleteMemoryResponse(string memoryId = null, bool deleted = false) { throw null; } public static Azure.AI.Projects.Memory.DeleteMemoryStoreResponse DeleteMemoryStoreResponse(string name = null, bool isDeleted = false) { throw null; } + public static Azure.AI.Projects.DispatchRoutineResponse DispatchRoutineResponse(string dispatchId = null, string actionCorrelationId = null, string taskId = null) { throw null; } public static Azure.AI.Projects.EmbeddingConfiguration EmbeddingConfiguration(string modelDeploymentName = null, string embeddingField = null) { throw null; } public static Azure.AI.Projects.Evaluation.EvalResult EvalResult(string name = null, string type = null, float score = 0f, bool isPassed = false) { throw null; } public static Azure.AI.Projects.Evaluation.EvalRunResultCompareItem EvalRunResultCompareItem(string treatmentRunId = null, Azure.AI.Projects.Evaluation.EvalRunResultSummary treatmentRunSummary = null, float deltaEstimate = 0f, float pValue = 0f, Azure.AI.Projects.TreatmentEffectType treatmentEffect = default(Azure.AI.Projects.TreatmentEffectType)) { throw null; } @@ -496,15 +583,25 @@ public static partial class AzureAIProjectsModelFactory public static Azure.AI.Projects.Evaluation.EvaluationRunClusterInsightRequest EvaluationRunClusterInsightRequest(string evalId = null, System.Collections.Generic.IEnumerable runIds = null, Azure.AI.Projects.Evaluation.InsightModelConfiguration modelConfiguration = null) { throw null; } public static Azure.AI.Projects.Evaluation.EvaluationRunClusterInsightResult EvaluationRunClusterInsightResult(Azure.AI.Projects.Evaluation.ClusterInsightResult clusterInsight = null) { throw null; } public static Azure.AI.Projects.Evaluation.EvaluationScheduleTask EvaluationScheduleTask(System.Collections.Generic.IDictionary configuration = null, string evalId = null, System.BinaryData evalRun = null) { throw null; } + public static Azure.AI.Projects.Evaluation.EvaluationsDimension EvaluationsDimension(string id = null, string description = null, int weight = 0, bool? alwaysApplicable = default(bool?)) { throw null; } public static Azure.AI.Projects.Evaluation.EvaluationTarget EvaluationTarget(string type = null) { throw null; } public static Azure.AI.Projects.Evaluation.EvaluationTaxonomy EvaluationTaxonomy(string id = null, string name = null, string version = null, string description = null, System.Collections.Generic.IDictionary tags = null, Azure.AI.Projects.Evaluation.EvaluationTaxonomyInput taxonomyInput = null, System.Collections.Generic.IEnumerable taxonomyCategories = null, System.Collections.Generic.IDictionary properties = null) { throw null; } + public static Azure.AI.Projects.EvaluatorCredentialRequest EvaluatorCredentialRequest(System.Uri blobUri = null) { throw null; } public static Azure.AI.Projects.Evaluation.EvaluatorDefinition EvaluatorDefinition(string type = null, System.BinaryData initParameters = null, System.BinaryData dataSchema = null, System.Collections.Generic.IDictionary metrics = null) { throw null; } + public static Azure.AI.Projects.EvaluatorGenerationArtifacts EvaluatorGenerationArtifacts(Azure.AI.Projects.DatasetReference dataset = null, System.Collections.Generic.IEnumerable kinds = null) { throw null; } + public static Azure.AI.Projects.EvaluatorGenerationInputs EvaluatorGenerationInputs(System.Collections.Generic.IEnumerable sources = null, string model = null, string evaluatorName = null, string evaluatorDisplayName = null, string evaluatorDescription = null) { throw null; } + public static Azure.AI.Projects.EvaluatorGenerationJobSource EvaluatorGenerationJobSource(string type = null) { throw null; } + public static Azure.AI.Projects.EvaluatorGenerationTokenUsage EvaluatorGenerationTokenUsage(long inputTokens = (long)0, long outputTokens = (long)0, long totalTokens = (long)0) { throw null; } public static Azure.AI.Projects.Evaluation.EvaluatorMetric EvaluatorMetric(Azure.AI.Projects.Evaluation.EvaluatorMetricType? type, Azure.AI.Projects.Evaluation.EvaluatorMetricDirection? desirableDirection, float? minValue, float? maxValue, bool? isPrimary) { throw null; } public static Azure.AI.Projects.Evaluation.EvaluatorMetric EvaluatorMetric(Azure.AI.Projects.Evaluation.EvaluatorMetricType? type = default(Azure.AI.Projects.Evaluation.EvaluatorMetricType?), Azure.AI.Projects.Evaluation.EvaluatorMetricDirection? desirableDirection = default(Azure.AI.Projects.Evaluation.EvaluatorMetricDirection?), float? minValue = default(float?), float? maxValue = default(float?), float? threshold = default(float?), bool? isPrimary = default(bool?)) { throw null; } - public static Azure.AI.Projects.Evaluation.EvaluatorVersion EvaluatorVersion(string displayName = null, System.Collections.Generic.IDictionary metadata = null, Azure.AI.Projects.EvaluatorType evaluatorType = default(Azure.AI.Projects.EvaluatorType), System.Collections.Generic.IEnumerable categories = null, Azure.AI.Projects.Evaluation.EvaluatorDefinition definition = null, string createdBy = null, string createdAt = null, string modifiedAt = null, string id = null, string name = null, string version = null, string description = null, System.Collections.Generic.IDictionary tags = null) { throw null; } + public static Azure.AI.Projects.Evaluation.EvaluatorVersion EvaluatorVersion(string displayName = null, System.Collections.Generic.IDictionary metadata = null, Azure.AI.Projects.EvaluatorType evaluatorType = default(Azure.AI.Projects.EvaluatorType), System.Collections.Generic.IEnumerable categories = null, Azure.AI.Projects.Evaluation.EvaluatorDefinition definition = null, Azure.AI.Projects.EvaluatorGenerationArtifacts generationArtifacts = null, string createdBy = null, string createdAt = null, string modifiedAt = null, string id = null, string name = null, string version = null, string description = null, System.Collections.Generic.IDictionary tags = null) { throw null; } + public static Azure.AI.Projects.Evaluation.EvaluatorVersion EvaluatorVersion(string displayName, System.Collections.Generic.IDictionary metadata, Azure.AI.Projects.EvaluatorType evaluatorType, System.Collections.Generic.IEnumerable categories, Azure.AI.Projects.Evaluation.EvaluatorDefinition definition, string createdBy, string createdAt, string modifiedAt, string id, string name, string version, string description, System.Collections.Generic.IDictionary tags) { throw null; } + public static Azure.AI.Projects.FileDataGenerationJobOutput FileDataGenerationJobOutput(string id = null, string filename = null) { throw null; } + public static Azure.AI.Projects.FileDataGenerationJobSource FileDataGenerationJobSource(string description = null, string id = null) { throw null; } public static Azure.AI.Projects.FileDataset FileDataset(System.Uri dataUri = null, bool? isReference = default(bool?), string connectionName = null, string id = null, string name = null, string version = null, string description = null, System.Collections.Generic.IDictionary tags = null) { throw null; } public static Azure.AI.Projects.FolderDataset FolderDataset(System.Uri dataUri = null, bool? isReference = default(bool?), string connectionName = null, string id = null, string name = null, string version = null, string description = null, System.Collections.Generic.IDictionary tags = null) { throw null; } public static Azure.AI.Projects.FoundryModelWarning FoundryModelWarning(Azure.AI.Projects.FoundryModelWarningCode? code = default(Azure.AI.Projects.FoundryModelWarningCode?), string message = null) { throw null; } + public static Azure.AI.Projects.GitHubIssueOpenedRoutineTrigger GitHubIssueOpenedRoutineTrigger(string connectionId = null, string assignee = null, string repository = null) { throw null; } public static Azure.AI.Projects.Evaluation.HumanEvaluationPreviewRuleAction HumanEvaluationPreviewRuleAction(string templateId = null) { throw null; } public static Azure.AI.Projects.InputFileContentParam InputFileContentParam(string fileId = null, string filename = null, string fileData = null, System.Uri fileUri = null) { throw null; } public static Azure.AI.Projects.InputTextContentParam InputTextContentParam(string text = null) { throw null; } @@ -515,6 +612,10 @@ public static partial class AzureAIProjectsModelFactory public static Azure.AI.Projects.Evaluation.InsightScheduleTask InsightScheduleTask(System.Collections.Generic.IDictionary configuration = null, Azure.AI.Projects.Evaluation.ProjectsInsight insight = null) { throw null; } public static Azure.AI.Projects.Evaluation.InsightsMetadata InsightsMetadata(System.DateTimeOffset createdAt = default(System.DateTimeOffset), System.DateTimeOffset? completedAt = default(System.DateTimeOffset?)) { throw null; } public static Azure.AI.Projects.Evaluation.InsightSummary InsightSummary(int sampleCount = 0, int uniqueSubclusterCount = 0, int uniqueClusterCount = 0, string methodName = null, Azure.AI.Projects.Evaluation.ClusterTokenUsage usage = null) { throw null; } + public static Azure.AI.Projects.InvokeAgentInvocationsApiDispatchPayload InvokeAgentInvocationsApiDispatchPayload(string input = null) { throw null; } + public static Azure.AI.Projects.InvokeAgentInvocationsApiRoutineAction InvokeAgentInvocationsApiRoutineAction(string agentEndpointId = null, string sessionId = null) { throw null; } + public static Azure.AI.Projects.InvokeAgentResponsesApiDispatchPayload InvokeAgentResponsesApiDispatchPayload(string input = null) { throw null; } + public static Azure.AI.Projects.InvokeAgentResponsesApiRoutineAction InvokeAgentResponsesApiRoutineAction(string agentName = null, string agentEndpointId = null, string conversationId = null) { throw null; } public static Azure.AI.Projects.LoraConfig LoraConfig(int? rank = default(int?), int? alpha = default(int?), System.Collections.Generic.IEnumerable targetModules = null, float? dropout = default(float?)) { throw null; } public static Azure.AI.Projects.ManagedAzureAISearchIndex ManagedAzureAISearchIndex(string id = null, string name = null, string version = null, string description = null, System.Collections.Generic.IDictionary tags = null, string vectorStoreId = null) { throw null; } public static Azure.AI.Projects.Memory.MemoryItem MemoryItem(string memoryId = null, System.DateTimeOffset updatedAt = default(System.DateTimeOffset), string scope = null, string content = null, string kind = null) { throw null; } @@ -522,7 +623,8 @@ public static partial class AzureAIProjectsModelFactory public static Azure.AI.Projects.Memory.MemorySearchItem MemorySearchItem(Azure.AI.Projects.Memory.MemoryItem memoryItem = null) { throw null; } public static Azure.AI.Projects.Memory.MemorySearchResultOptions MemorySearchResultOptions(int? maxMemories = default(int?)) { throw null; } public static Azure.AI.Projects.Memory.MemoryStore MemoryStore(string id = null, System.DateTimeOffset createdAt = default(System.DateTimeOffset), System.DateTimeOffset updatedAt = default(System.DateTimeOffset), string name = null, string description = null, System.Collections.Generic.IDictionary metadata = null, Azure.AI.Projects.Memory.MemoryStoreDefinition definition = null) { throw null; } - public static Azure.AI.Projects.Memory.MemoryStoreDefaultOptions MemoryStoreDefaultOptions(bool isUserProfileEnabled = false, string userProfileDetails = null, bool isChatSummaryEnabled = false) { throw null; } + public static Azure.AI.Projects.Memory.MemoryStoreDefaultOptions MemoryStoreDefaultOptions(bool isUserProfileEnabled, string userProfileDetails, bool isChatSummaryEnabled) { throw null; } + public static Azure.AI.Projects.Memory.MemoryStoreDefaultOptions MemoryStoreDefaultOptions(bool isUserProfileEnabled = false, string userProfileDetails = null, bool isChatSummaryEnabled = false, bool? proceduralMemoryEnabled = default(bool?), System.TimeSpan? defaultTtlSeconds = default(System.TimeSpan?)) { throw null; } public static Azure.AI.Projects.Memory.MemoryStoreDeleteScopeResponse MemoryStoreDeleteScopeResponse(string name = null, string scope = null, bool isDeleted = false) { throw null; } public static Azure.AI.Projects.Memory.MemoryStoreOperationUsage MemoryStoreOperationUsage(int embeddingTokens = 0, long inputTokens = (long)0, Azure.AI.Projects.ResponseUsageInputTokensDetails inputTokensDetails = null, long outputTokens = (long)0, Azure.AI.Projects.ResponseUsageOutputTokensDetails outputTokensDetails = null, long totalTokens = (long)0) { throw null; } public static Azure.AI.Projects.Memory.MemoryStoreSearchResponse MemoryStoreSearchResponse(string searchId = null, System.Collections.Generic.IEnumerable memories = null, Azure.AI.Projects.Memory.MemoryStoreOperationUsage usage = null) { throw null; } @@ -540,19 +642,36 @@ public static partial class AzureAIProjectsModelFactory public static Azure.AI.Projects.PendingUploadConfiguration PendingUploadConfiguration(string pendingUploadId, string connectionName, Azure.AI.Projects.PendingUploadType pendingUploadType) { throw null; } public static Azure.AI.Projects.PendingUploadResult PendingUploadResult(Azure.AI.Projects.AIProjectBlobReference blobReference = null, string pendingUploadId = null, string version = null) { throw null; } public static Azure.AI.Projects.PendingUploadResult PendingUploadResult(Azure.AI.Projects.AIProjectBlobReference blobReference, string pendingUploadId, string version, Azure.AI.Projects.PendingUploadType pendingUploadType) { throw null; } + public static Azure.AI.Projects.ProceduralMemoryItem ProceduralMemoryItem(string memoryId = null, System.DateTimeOffset updatedAt = default(System.DateTimeOffset), string scope = null, string content = null) { throw null; } public static Azure.AI.Projects.Evaluation.ProjectsInsight ProjectsInsight(string id = null, Azure.AI.Projects.Evaluation.InsightsMetadata metadata = null, Azure.AI.Projects.Evaluation.OperationStatus state = default(Azure.AI.Projects.Evaluation.OperationStatus), string displayName = null, Azure.AI.Projects.Evaluation.InsightRequest request = null, Azure.AI.Projects.Evaluation.InsightResult result = null) { throw null; } + public static Azure.AI.Projects.ProjectsRoutine ProjectsRoutine(string name = null, string description = null, bool enabled = false, System.Collections.Generic.IDictionary triggers = null, Azure.AI.Projects.RoutineAction action = null, System.DateTimeOffset? createdAt = default(System.DateTimeOffset?), System.DateTimeOffset? updatedAt = default(System.DateTimeOffset?)) { throw null; } public static Azure.AI.Projects.Evaluation.ProjectsSchedule ProjectsSchedule(string id = null, string displayName = null, string description = null, bool enabled = false, Azure.AI.Projects.Evaluation.ScheduleProvisioningStatus? provisioningStatus = default(Azure.AI.Projects.Evaluation.ScheduleProvisioningStatus?), Azure.AI.Projects.Evaluation.ScheduleTrigger trigger = null, Azure.AI.Projects.ProjectsScheduleTask task = null, System.Collections.Generic.IDictionary tags = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IReadOnlyDictionary systemData = null) { throw null; } public static Azure.AI.Projects.ProjectsScheduleTask ProjectsScheduleTask(string type = null, System.Collections.Generic.IDictionary configuration = null) { throw null; } public static Azure.AI.Projects.Evaluation.PromptBasedEvaluatorDefinition PromptBasedEvaluatorDefinition(System.BinaryData initParameters = null, System.BinaryData dataSchema = null, System.Collections.Generic.IDictionary metrics = null, string promptText = null) { throw null; } + public static Azure.AI.Projects.PromptDataGenerationJobSource PromptDataGenerationJobSource(string description = null, string prompt = null) { throw null; } + public static Azure.AI.Projects.PromptEvaluatorGenerationJobSource PromptEvaluatorGenerationJobSource(string description = null, string prompt = null) { throw null; } public static Azure.AI.Projects.Evaluation.RedTeam RedTeam(string name = null, string displayName = null, int? turnCount = default(int?), System.Collections.Generic.IEnumerable attackStrategies = null, bool? isSimulationOnly = default(bool?), System.Collections.Generic.IEnumerable riskCategories = null, string applicationScenario = null, System.Collections.Generic.IDictionary tags = null, System.Collections.Generic.IDictionary properties = null, string status = null, Azure.AI.Projects.Evaluation.TargetConfig target = null) { throw null; } public static Azure.AI.Projects.ResponseUsageInputTokensDetails ResponseUsageInputTokensDetails(long cachedTokens = (long)0) { throw null; } public static Azure.AI.Projects.ResponseUsageOutputTokensDetails ResponseUsageOutputTokensDetails(long reasoningTokens = (long)0) { throw null; } + public static Azure.AI.Projects.RoutineAction RoutineAction(string type = null) { throw null; } + public static Azure.AI.Projects.RoutineDispatchPayload RoutineDispatchPayload(string type = null) { throw null; } + public static Azure.AI.Projects.RoutineRun RoutineRun(string id = null, string status = null, Azure.AI.Projects.RoutineRunPhase? phase = default(Azure.AI.Projects.RoutineRunPhase?), Azure.AI.Projects.RoutineTriggerType triggerType = default(Azure.AI.Projects.RoutineTriggerType), Azure.AI.Projects.RoutineAttemptSource? attemptSource = default(Azure.AI.Projects.RoutineAttemptSource?), Azure.AI.Projects.RoutineActionType? actionType = default(Azure.AI.Projects.RoutineActionType?), System.DateTimeOffset? triggeredAt = default(System.DateTimeOffset?), System.DateTimeOffset startedAt = default(System.DateTimeOffset), System.DateTimeOffset? endedAt = default(System.DateTimeOffset?), string dispatchId = null, string actionCorrelationId = null, string responseId = null, string taskId = null, string errorType = null, string errorMessage = null, Azure.AI.Projects.RoutineRunDiagnostics diagnostics = null) { throw null; } + public static Azure.AI.Projects.RoutineRunDiagnostics RoutineRunDiagnostics(System.Collections.Generic.IDictionary parameters = null, System.Collections.Generic.IDictionary tags = null, System.Collections.Generic.IDictionary metrics = null) { throw null; } + public static Azure.AI.Projects.RoutineTrigger RoutineTrigger(string type = null) { throw null; } + public static Azure.AI.Projects.RubricBasedEvaluatorDefinition RubricBasedEvaluatorDefinition(System.BinaryData initParameters = null, System.BinaryData dataSchema = null, System.Collections.Generic.IDictionary metrics = null, System.Collections.Generic.IEnumerable dimensions = null, float? passThreshold = default(float?)) { throw null; } + public static Azure.AI.Projects.ScheduleRoutineTrigger ScheduleRoutineTrigger(string cronExpression = null, string timeZone = null) { throw null; } public static Azure.AI.Projects.Evaluation.ScheduleRun ScheduleRun(string runId = null, string scheduleId = null, bool success = false, System.DateTimeOffset? triggerTime = default(System.DateTimeOffset?), string error = null, System.Collections.Generic.IReadOnlyDictionary properties = null) { throw null; } + public static Azure.AI.Projects.SimpleQnADataGenerationJobOptions SimpleQnADataGenerationJobOptions(int maxSamples = 0, float? trainSplit = default(float?), Azure.AI.Projects.DataGenerationModelOptions modelOptions = null, System.Collections.Generic.IEnumerable questionTypes = null) { throw null; } public static Azure.AI.Projects.SystemDataV3 SystemDataV3(System.DateTimeOffset? createdAt = default(System.DateTimeOffset?), string createdBy = null, string createdByType = null, System.DateTimeOffset? lastModifiedAt = default(System.DateTimeOffset?)) { throw null; } public static Azure.AI.Projects.Evaluation.TargetConfig TargetConfig(string type = null) { throw null; } public static Azure.AI.Projects.Evaluation.TaxonomyCategory TaxonomyCategory(string id = null, string name = null, string description = null, Azure.AI.Projects.Evaluation.RiskCategory riskCategory = default(Azure.AI.Projects.Evaluation.RiskCategory), System.Collections.Generic.IEnumerable subCategories = null, System.Collections.Generic.IDictionary properties = null) { throw null; } public static Azure.AI.Projects.Evaluation.TaxonomySubCategory TaxonomySubCategory(string id = null, string name = null, string description = null, bool isEnabled = false, System.Collections.Generic.IDictionary properties = null) { throw null; } + public static Azure.AI.Projects.TimerRoutineTrigger TimerRoutineTrigger(string at = null, string timeZone = null) { throw null; } public static Azure.AI.Projects.ToolDescription ToolDescription(string name = null, string description = null) { throw null; } + public static Azure.AI.Projects.ToolUseFineTuningDataGenerationJobOptions ToolUseFineTuningDataGenerationJobOptions(int maxSamples = 0, float? trainSplit = default(float?), Azure.AI.Projects.DataGenerationModelOptions modelOptions = null) { throw null; } + public static Azure.AI.Projects.TracesDataGenerationJobOptions TracesDataGenerationJobOptions(int maxSamples = 0, float? trainSplit = default(float?), Azure.AI.Projects.DataGenerationModelOptions modelOptions = null) { throw null; } + public static Azure.AI.Projects.TracesDataGenerationJobSource TracesDataGenerationJobSource(string description = null, string agentId = null, string agentName = null, string agentVersion = null, System.DateTimeOffset startTime = default(System.DateTimeOffset), System.DateTimeOffset? endTime = default(System.DateTimeOffset?)) { throw null; } + public static Azure.AI.Projects.TracesEvaluatorGenerationJobSource TracesEvaluatorGenerationJobSource(string description = null, string agentId = null, string agentName = null, string agentVersion = null, System.DateTimeOffset startTime = default(System.DateTimeOffset), System.DateTimeOffset? endTime = default(System.DateTimeOffset?)) { throw null; } public static Azure.AI.Projects.Memory.UserProfileMemoryItem UserProfileMemoryItem(string memoryId = null, System.DateTimeOffset updatedAt = default(System.DateTimeOffset), string scope = null, string content = null) { throw null; } } public partial class AzureAISearchIndex : Azure.AI.Projects.AIProjectIndex, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel @@ -627,6 +746,202 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class DataGenerationJob : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataGenerationJob() { } + public System.DateTimeOffset CreatedAt { get { throw null; } } + public System.DateTimeOffset? FinishedAt { get { throw null; } } + public string Id { get { throw null; } } + public Azure.AI.Projects.DataGenerationJobInputs Inputs { get { throw null; } set { } } + public Azure.AI.Projects.DataGenerationJobResult Result { get { throw null; } } + public Azure.AI.Projects.JobStatus Status { get { throw null; } } + protected virtual Azure.AI.Projects.DataGenerationJob JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + public static explicit operator Azure.AI.Projects.DataGenerationJob (System.ClientModel.ClientResult result) { throw null; } + public static implicit operator System.ClientModel.BinaryContent (Azure.AI.Projects.DataGenerationJob dataGenerationJob) { throw null; } + protected virtual Azure.AI.Projects.DataGenerationJob PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.DataGenerationJob System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.DataGenerationJob System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataGenerationJobInputs : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataGenerationJobInputs(string name, System.Collections.Generic.IEnumerable sources, Azure.AI.Projects.DataGenerationJobOptions options, Azure.AI.Projects.DataGenerationJobScenario scenario) { } + public string Name { get { throw null; } set { } } + public Azure.AI.Projects.DataGenerationJobOptions Options { get { throw null; } set { } } + public Azure.AI.Projects.DataGenerationJobOutputOptions OutputOptions { get { throw null; } set { } } + public Azure.AI.Projects.DataGenerationJobScenario Scenario { get { throw null; } set { } } + public System.Collections.Generic.IList Sources { get { throw null; } } + protected virtual Azure.AI.Projects.DataGenerationJobInputs JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.DataGenerationJobInputs PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.DataGenerationJobInputs System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.DataGenerationJobInputs System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DataGenerationJobKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DataGenerationJobKind(string value) { throw null; } + public static Azure.AI.Projects.DataGenerationJobKind SimpleQna { get { throw null; } } + public static Azure.AI.Projects.DataGenerationJobKind ToolUse { get { throw null; } } + public static Azure.AI.Projects.DataGenerationJobKind Traces { get { throw null; } } + public bool Equals(Azure.AI.Projects.DataGenerationJobKind other) { throw null; } + public override bool Equals(object obj) { throw null; } + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.AI.Projects.DataGenerationJobKind left, Azure.AI.Projects.DataGenerationJobKind right) { throw null; } + public static implicit operator Azure.AI.Projects.DataGenerationJobKind (string value) { throw null; } + public static implicit operator Azure.AI.Projects.DataGenerationJobKind? (string value) { throw null; } + public static bool operator !=(Azure.AI.Projects.DataGenerationJobKind left, Azure.AI.Projects.DataGenerationJobKind right) { throw null; } + public override string ToString() { throw null; } + } + public abstract partial class DataGenerationJobOptions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DataGenerationJobOptions() { } + public int MaxSamples { get { throw null; } set { } } + public Azure.AI.Projects.DataGenerationModelOptions ModelOptions { get { throw null; } set { } } + public float? TrainSplit { get { throw null; } set { } } + protected virtual Azure.AI.Projects.DataGenerationJobOptions JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.DataGenerationJobOptions PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.DataGenerationJobOptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.DataGenerationJobOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class DataGenerationJobOutput : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DataGenerationJobOutput() { } + protected virtual Azure.AI.Projects.DataGenerationJobOutput JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.DataGenerationJobOutput PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.DataGenerationJobOutput System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.DataGenerationJobOutput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataGenerationJobOutputOptions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataGenerationJobOutputOptions() { } + public string Description { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual Azure.AI.Projects.DataGenerationJobOutputOptions JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.DataGenerationJobOutputOptions PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.DataGenerationJobOutputOptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.DataGenerationJobOutputOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataGenerationJobResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DataGenerationJobResult() { } + public int GeneratedSamples { get { throw null; } } + public System.Collections.Generic.IList Outputs { get { throw null; } } + public Azure.AI.Projects.DataGenerationTokenUsage TokenUsage { get { throw null; } } + protected virtual Azure.AI.Projects.DataGenerationJobResult JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.DataGenerationJobResult PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.DataGenerationJobResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.DataGenerationJobResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("AAIP001")] + public partial class DataGenerationJobs + { + protected DataGenerationJobs() { } + public System.ClientModel.Primitives.ClientPipeline Pipeline { get { throw null; } } + public virtual System.ClientModel.ClientResult CancelGenerationJob(string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CancelGenerationJobAsync(string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.ClientResult CreateGenerationJob(Azure.AI.Projects.DataGenerationJob job, string operationId = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateGenerationJobAsync(Azure.AI.Projects.DataGenerationJob job, string operationId = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual void DeleteGenerationJob(string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { } + public virtual System.Threading.Tasks.Task DeleteGenerationJobAsync(string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.ClientResult GetGenerationJob(string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetGenerationJobAsync(string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.CollectionResult GetGenerationJobs(int? limit = default(int?), Azure.AI.Projects.Memory.MemoryStoreListOrder? order = default(Azure.AI.Projects.Memory.MemoryStoreListOrder?), string after = null, string before = null, Azure.AI.Projects.DataGenerationJobScenario? scenario = default(Azure.AI.Projects.DataGenerationJobScenario?), System.Collections.Generic.IEnumerable kind = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.AsyncCollectionResult GetGenerationJobsAsync(int? limit = default(int?), Azure.AI.Projects.Memory.MemoryStoreListOrder? order = default(Azure.AI.Projects.Memory.MemoryStoreListOrder?), string after = null, string before = null, Azure.AI.Projects.DataGenerationJobScenario? scenario = default(Azure.AI.Projects.DataGenerationJobScenario?), System.Collections.Generic.IEnumerable kind = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DataGenerationJobScenario : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DataGenerationJobScenario(string value) { throw null; } + public static Azure.AI.Projects.DataGenerationJobScenario Evaluation { get { throw null; } } + public static Azure.AI.Projects.DataGenerationJobScenario ReinforcementFinetuning { get { throw null; } } + public static Azure.AI.Projects.DataGenerationJobScenario SupervisedFinetuning { get { throw null; } } + public bool Equals(Azure.AI.Projects.DataGenerationJobScenario other) { throw null; } + public override bool Equals(object obj) { throw null; } + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.AI.Projects.DataGenerationJobScenario left, Azure.AI.Projects.DataGenerationJobScenario right) { throw null; } + public static implicit operator Azure.AI.Projects.DataGenerationJobScenario (string value) { throw null; } + public static implicit operator Azure.AI.Projects.DataGenerationJobScenario? (string value) { throw null; } + public static bool operator !=(Azure.AI.Projects.DataGenerationJobScenario left, Azure.AI.Projects.DataGenerationJobScenario right) { throw null; } + public override string ToString() { throw null; } + } + public abstract partial class DataGenerationJobSource : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DataGenerationJobSource() { } + public virtual string Description { get { throw null; } set { } } + protected virtual Azure.AI.Projects.DataGenerationJobSource JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.DataGenerationJobSource PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.DataGenerationJobSource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.DataGenerationJobSource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataGenerationModelOptions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataGenerationModelOptions(string model) { } + public string Model { get { throw null; } set { } } + protected virtual Azure.AI.Projects.DataGenerationModelOptions JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.DataGenerationModelOptions PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.DataGenerationModelOptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.DataGenerationModelOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataGenerationTokenUsage : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DataGenerationTokenUsage() { } + public long CompletionTokens { get { throw null; } } + public long PromptTokens { get { throw null; } } + public long TotalTokens { get { throw null; } } + protected virtual Azure.AI.Projects.DataGenerationTokenUsage JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.DataGenerationTokenUsage PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.DataGenerationTokenUsage System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.DataGenerationTokenUsage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class DatasetCredential : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal DatasetCredential() { } @@ -642,12 +957,76 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class DatasetDataGenerationJobOutput : Azure.AI.Projects.DataGenerationJobOutput, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DatasetDataGenerationJobOutput() { } + public string Description { get { throw null; } } + public string Id { get { throw null; } } + public string Name { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Tags { get { throw null; } } + public string Version { get { throw null; } } + protected override Azure.AI.Projects.DataGenerationJobOutput JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.DataGenerationJobOutput PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.DatasetDataGenerationJobOutput System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.DatasetDataGenerationJobOutput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DatasetDataGenerationJobSource : Azure.AI.Projects.DataGenerationJobSource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DatasetDataGenerationJobSource(string name) { } + public override string Description { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public string Version { get { throw null; } set { } } + protected override Azure.AI.Projects.DataGenerationJobSource JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.DataGenerationJobSource PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.DatasetDataGenerationJobSource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.DatasetDataGenerationJobSource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DatasetEvaluatorGenerationJobSource : Azure.AI.Projects.EvaluatorGenerationJobSource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DatasetEvaluatorGenerationJobSource(string name) { } + public string Description { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public string Version { get { throw null; } set { } } + protected override Azure.AI.Projects.EvaluatorGenerationJobSource JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.EvaluatorGenerationJobSource PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.DatasetEvaluatorGenerationJobSource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.DatasetEvaluatorGenerationJobSource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DatasetReference : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DatasetReference() { } + public string Name { get { throw null; } } + public string Version { get { throw null; } } + protected virtual Azure.AI.Projects.DatasetReference JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.DatasetReference PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.DatasetReference System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.DatasetReference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class DeleteMemoryResponse : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal DeleteMemoryResponse() { } public bool Deleted { get { throw null; } } public string MemoryId { get { throw null; } } - public string Name { get { throw null; } } public Azure.AI.Projects.Memory.MemoryStoreObjectType Object { get { throw null; } } protected virtual Azure.AI.Projects.DeleteMemoryResponse JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -660,6 +1039,23 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class DispatchRoutineResponse : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DispatchRoutineResponse() { } + public string ActionCorrelationId { get { throw null; } } + public string DispatchId { get { throw null; } } + public string TaskId { get { throw null; } } + protected virtual Azure.AI.Projects.DispatchRoutineResponse JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + public static explicit operator Azure.AI.Projects.DispatchRoutineResponse (System.ClientModel.ClientResult result) { throw null; } + protected virtual Azure.AI.Projects.DispatchRoutineResponse PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.DispatchRoutineResponse System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.DispatchRoutineResponse System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class EmbeddingConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public EmbeddingConfiguration(string modelDeploymentName, string embeddingField) { } @@ -692,6 +1088,121 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.AI.Projects.EvaluationRuleActionType left, Azure.AI.Projects.EvaluationRuleActionType right) { throw null; } public override string ToString() { throw null; } } + public partial class EvaluatorCredentialRequest : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EvaluatorCredentialRequest(System.Uri blobUri) { } + public System.Uri BlobUri { get { throw null; } } + protected virtual Azure.AI.Projects.EvaluatorCredentialRequest JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + public static implicit operator System.ClientModel.BinaryContent (Azure.AI.Projects.EvaluatorCredentialRequest evaluatorCredentialRequest) { throw null; } + protected virtual Azure.AI.Projects.EvaluatorCredentialRequest PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.EvaluatorCredentialRequest System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.EvaluatorCredentialRequest System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EvaluatorGenerationArtifacts : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EvaluatorGenerationArtifacts() { } + public Azure.AI.Projects.DatasetReference Dataset { get { throw null; } } + public System.Collections.Generic.IList Kinds { get { throw null; } } + protected virtual Azure.AI.Projects.EvaluatorGenerationArtifacts JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.EvaluatorGenerationArtifacts PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.EvaluatorGenerationArtifacts System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.EvaluatorGenerationArtifacts System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EvaluatorGenerationInputs : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EvaluatorGenerationInputs(System.Collections.Generic.IEnumerable sources, string model, string evaluatorName) { } + public string EvaluatorDescription { get { throw null; } set { } } + public string EvaluatorDisplayName { get { throw null; } set { } } + public string EvaluatorName { get { throw null; } set { } } + public string Model { get { throw null; } set { } } + public System.Collections.Generic.IList Sources { get { throw null; } } + protected virtual Azure.AI.Projects.EvaluatorGenerationInputs JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.EvaluatorGenerationInputs PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.EvaluatorGenerationInputs System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.EvaluatorGenerationInputs System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EvaluatorGenerationJob : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EvaluatorGenerationJob() { } + public System.DateTimeOffset CreatedAt { get { throw null; } } + public System.DateTimeOffset? FinishedAt { get { throw null; } } + public string Id { get { throw null; } } + public Azure.AI.Projects.EvaluatorGenerationInputs Inputs { get { throw null; } set { } } + public Azure.AI.Projects.Evaluation.EvaluatorVersion Result { get { throw null; } } + public Azure.AI.Projects.JobStatus Status { get { throw null; } } + public Azure.AI.Projects.EvaluatorGenerationTokenUsage Usage { get { throw null; } } + protected virtual Azure.AI.Projects.EvaluatorGenerationJob JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + public static explicit operator Azure.AI.Projects.EvaluatorGenerationJob (System.ClientModel.ClientResult result) { throw null; } + public static implicit operator System.ClientModel.BinaryContent (Azure.AI.Projects.EvaluatorGenerationJob evaluatorGenerationJob) { throw null; } + protected virtual Azure.AI.Projects.EvaluatorGenerationJob PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.EvaluatorGenerationJob System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.EvaluatorGenerationJob System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("AAIP001")] + public partial class EvaluatorGenerationJobs + { + protected EvaluatorGenerationJobs() { } + public System.ClientModel.Primitives.ClientPipeline Pipeline { get { throw null; } } + public virtual System.ClientModel.ClientResult Cancel(string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CancelAsync(string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.ClientResult Create(Azure.AI.Projects.EvaluatorGenerationJob job, string operationId = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateAsync(Azure.AI.Projects.EvaluatorGenerationJob job, string operationId = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual void Delete(string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { } + public virtual System.Threading.Tasks.Task DeleteAsync(string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.ClientResult Get(string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.CollectionResult GetAll(int? limit = default(int?), Azure.AI.Projects.Memory.MemoryStoreListOrder? order = default(Azure.AI.Projects.Memory.MemoryStoreListOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.AsyncCollectionResult GetAllAsync(int? limit = default(int?), Azure.AI.Projects.Memory.MemoryStoreListOrder? order = default(Azure.AI.Projects.Memory.MemoryStoreListOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public abstract partial class EvaluatorGenerationJobSource : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EvaluatorGenerationJobSource() { } + protected virtual Azure.AI.Projects.EvaluatorGenerationJobSource JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.EvaluatorGenerationJobSource PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.EvaluatorGenerationJobSource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.EvaluatorGenerationJobSource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EvaluatorGenerationTokenUsage : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EvaluatorGenerationTokenUsage() { } + public long InputTokens { get { throw null; } } + public long OutputTokens { get { throw null; } } + public long TotalTokens { get { throw null; } } + protected virtual Azure.AI.Projects.EvaluatorGenerationTokenUsage JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.EvaluatorGenerationTokenUsage PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.EvaluatorGenerationTokenUsage System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.EvaluatorGenerationTokenUsage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct EvaluatorType : System.IEquatable { @@ -709,6 +1220,35 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.AI.Projects.EvaluatorType left, Azure.AI.Projects.EvaluatorType right) { throw null; } public override string ToString() { throw null; } } + public partial class FileDataGenerationJobOutput : Azure.AI.Projects.DataGenerationJobOutput, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal FileDataGenerationJobOutput() { } + public string Filename { get { throw null; } } + public string Id { get { throw null; } } + protected override Azure.AI.Projects.DataGenerationJobOutput JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.DataGenerationJobOutput PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.FileDataGenerationJobOutput System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.FileDataGenerationJobOutput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class FileDataGenerationJobSource : Azure.AI.Projects.DataGenerationJobSource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FileDataGenerationJobSource(string id) { } + public string Id { get { throw null; } set { } } + protected override Azure.AI.Projects.DataGenerationJobSource JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.DataGenerationJobSource PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.FileDataGenerationJobSource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.FileDataGenerationJobSource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class FileDataset : Azure.AI.Projects.AIProjectDataset, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public FileDataset(System.Uri dataUri) { } @@ -742,7 +1282,7 @@ public enum FoundryFeaturesOptInKeys RedTeamsV1Preview = 2, InsightsV1Preview = 3, MemoryStoresV1Preview = 4, - ToolboxesV1Preview = 5, + RoutinesV1Preview = 5, SkillsV1Preview = 6, DataGenerationJobsV1Preview = 7, ModelsV1Preview = 8, @@ -853,6 +1393,22 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.AI.Projects.FoundryModelWeightType left, Azure.AI.Projects.FoundryModelWeightType right) { throw null; } public override string ToString() { throw null; } } + public partial class GitHubIssueOpenedRoutineTrigger : Azure.AI.Projects.RoutineTrigger, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public GitHubIssueOpenedRoutineTrigger(string connectionId, string assignee, string repository) { } + public string Assignee { get { throw null; } set { } } + public string ConnectionId { get { throw null; } set { } } + public string Repository { get { throw null; } set { } } + protected override Azure.AI.Projects.RoutineTrigger JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.RoutineTrigger PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.GitHubIssueOpenedRoutineTrigger System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.GitHubIssueOpenedRoutineTrigger System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class InputFileContentParam : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public InputFileContentParam() { } @@ -884,6 +1440,85 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class InvokeAgentInvocationsApiDispatchPayload : Azure.AI.Projects.RoutineDispatchPayload, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public InvokeAgentInvocationsApiDispatchPayload() { } + public string Input { get { throw null; } set { } } + protected override Azure.AI.Projects.RoutineDispatchPayload JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.RoutineDispatchPayload PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.InvokeAgentInvocationsApiDispatchPayload System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.InvokeAgentInvocationsApiDispatchPayload System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class InvokeAgentInvocationsApiRoutineAction : Azure.AI.Projects.RoutineAction, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public InvokeAgentInvocationsApiRoutineAction(string agentEndpointId) { } + public string AgentEndpointId { get { throw null; } set { } } + public string SessionId { get { throw null; } set { } } + protected override Azure.AI.Projects.RoutineAction JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.RoutineAction PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.InvokeAgentInvocationsApiRoutineAction System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.InvokeAgentInvocationsApiRoutineAction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class InvokeAgentResponsesApiDispatchPayload : Azure.AI.Projects.RoutineDispatchPayload, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public InvokeAgentResponsesApiDispatchPayload() { } + public string Input { get { throw null; } set { } } + protected override Azure.AI.Projects.RoutineDispatchPayload JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.RoutineDispatchPayload PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.InvokeAgentResponsesApiDispatchPayload System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.InvokeAgentResponsesApiDispatchPayload System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class InvokeAgentResponsesApiRoutineAction : Azure.AI.Projects.RoutineAction, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public InvokeAgentResponsesApiRoutineAction() { } + public string AgentEndpointId { get { throw null; } set { } } + public string AgentName { get { throw null; } set { } } + public string ConversationId { get { throw null; } set { } } + protected override Azure.AI.Projects.RoutineAction JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.RoutineAction PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.InvokeAgentResponsesApiRoutineAction System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.InvokeAgentResponsesApiRoutineAction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct JobStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public JobStatus(string value) { throw null; } + public static Azure.AI.Projects.JobStatus Cancelled { get { throw null; } } + public static Azure.AI.Projects.JobStatus Failed { get { throw null; } } + public static Azure.AI.Projects.JobStatus InProgress { get { throw null; } } + public static Azure.AI.Projects.JobStatus Queued { get { throw null; } } + public static Azure.AI.Projects.JobStatus Succeeded { get { throw null; } } + public bool Equals(Azure.AI.Projects.JobStatus other) { throw null; } + public override bool Equals(object obj) { throw null; } + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.AI.Projects.JobStatus left, Azure.AI.Projects.JobStatus right) { throw null; } + public static implicit operator Azure.AI.Projects.JobStatus (string value) { throw null; } + public static implicit operator Azure.AI.Projects.JobStatus? (string value) { throw null; } + public static bool operator !=(Azure.AI.Projects.JobStatus left, Azure.AI.Projects.JobStatus right) { throw null; } + public override string ToString() { throw null; } + } public partial class LoraConfig : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public LoraConfig() { } @@ -1110,6 +1745,19 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.AI.Projects.PendingUploadType left, Azure.AI.Projects.PendingUploadType right) { throw null; } public override string ToString() { throw null; } } + public partial class ProceduralMemoryItem : Azure.AI.Projects.Memory.MemoryItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ProceduralMemoryItem() { } + protected override Azure.AI.Projects.Memory.MemoryItem JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.Memory.MemoryItem PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.ProceduralMemoryItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.ProceduralMemoryItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("AAIP001")] public partial class ProjectSchedules { @@ -1140,6 +1788,27 @@ protected ProjectSchedules() { } public virtual System.ClientModel.AsyncCollectionResult GetRunsAsync(string id, Azure.AI.Projects.Evaluation.ScheduleTaskType? type = default(Azure.AI.Projects.Evaluation.ScheduleTaskType?), bool? enabled = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.ClientModel.Primitives.AsyncCollectionResult GetRunsAsync(string id, string type, bool? enabled, System.ClientModel.Primitives.RequestOptions options) { throw null; } } + public partial class ProjectsRoutine : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ProjectsRoutine() { } + public Azure.AI.Projects.RoutineAction Action { get { throw null; } } + public System.DateTimeOffset? CreatedAt { get { throw null; } } + public string Description { get { throw null; } } + public bool Enabled { get { throw null; } } + public string Name { get { throw null; } } + public System.Collections.Generic.IDictionary Triggers { get { throw null; } } + public System.DateTimeOffset? UpdatedAt { get { throw null; } } + protected virtual Azure.AI.Projects.ProjectsRoutine JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + public static explicit operator Azure.AI.Projects.ProjectsRoutine (System.ClientModel.ClientResult result) { throw null; } + protected virtual Azure.AI.Projects.ProjectsRoutine PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.ProjectsRoutine System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.ProjectsRoutine System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public abstract partial class ProjectsScheduleTask : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ProjectsScheduleTask() { } @@ -1154,6 +1823,36 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class PromptDataGenerationJobSource : Azure.AI.Projects.DataGenerationJobSource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PromptDataGenerationJobSource(string prompt) { } + public override string Description { get { throw null; } set { } } + public string Prompt { get { throw null; } set { } } + protected override Azure.AI.Projects.DataGenerationJobSource JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.DataGenerationJobSource PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.PromptDataGenerationJobSource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.PromptDataGenerationJobSource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PromptEvaluatorGenerationJobSource : Azure.AI.Projects.EvaluatorGenerationJobSource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PromptEvaluatorGenerationJobSource(string prompt) { } + public string Description { get { throw null; } set { } } + public string Prompt { get { throw null; } set { } } + protected override Azure.AI.Projects.EvaluatorGenerationJobSource JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.EvaluatorGenerationJobSource PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.PromptEvaluatorGenerationJobSource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.PromptEvaluatorGenerationJobSource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ResponseUsageInputTokensDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ResponseUsageInputTokensDetails() { } @@ -1182,6 +1881,225 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public abstract partial class RoutineAction : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal RoutineAction() { } + protected virtual Azure.AI.Projects.RoutineAction JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.RoutineAction PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.RoutineAction System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.RoutineAction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct RoutineActionType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public RoutineActionType(string value) { throw null; } + public static Azure.AI.Projects.RoutineActionType InvokeAgentInvocationsApi { get { throw null; } } + public static Azure.AI.Projects.RoutineActionType InvokeAgentResponsesApi { get { throw null; } } + public bool Equals(Azure.AI.Projects.RoutineActionType other) { throw null; } + public override bool Equals(object obj) { throw null; } + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.AI.Projects.RoutineActionType left, Azure.AI.Projects.RoutineActionType right) { throw null; } + public static implicit operator Azure.AI.Projects.RoutineActionType (string value) { throw null; } + public static implicit operator Azure.AI.Projects.RoutineActionType? (string value) { throw null; } + public static bool operator !=(Azure.AI.Projects.RoutineActionType left, Azure.AI.Projects.RoutineActionType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct RoutineAttemptSource : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public RoutineAttemptSource(string value) { throw null; } + public static Azure.AI.Projects.RoutineAttemptSource EventFire { get { throw null; } } + public static Azure.AI.Projects.RoutineAttemptSource ManualDispatch { get { throw null; } } + public static Azure.AI.Projects.RoutineAttemptSource QueuedDispatch { get { throw null; } } + public static Azure.AI.Projects.RoutineAttemptSource ScheduleDelivery { get { throw null; } } + public static Azure.AI.Projects.RoutineAttemptSource TimerDelivery { get { throw null; } } + public bool Equals(Azure.AI.Projects.RoutineAttemptSource other) { throw null; } + public override bool Equals(object obj) { throw null; } + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.AI.Projects.RoutineAttemptSource left, Azure.AI.Projects.RoutineAttemptSource right) { throw null; } + public static implicit operator Azure.AI.Projects.RoutineAttemptSource (string value) { throw null; } + public static implicit operator Azure.AI.Projects.RoutineAttemptSource? (string value) { throw null; } + public static bool operator !=(Azure.AI.Projects.RoutineAttemptSource left, Azure.AI.Projects.RoutineAttemptSource right) { throw null; } + public override string ToString() { throw null; } + } + public abstract partial class RoutineDispatchPayload : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal RoutineDispatchPayload() { } + protected virtual Azure.AI.Projects.RoutineDispatchPayload JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.RoutineDispatchPayload PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.RoutineDispatchPayload System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.RoutineDispatchPayload System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class RoutineRun : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal RoutineRun() { } + public string ActionCorrelationId { get { throw null; } } + public Azure.AI.Projects.RoutineActionType? ActionType { get { throw null; } } + public Azure.AI.Projects.RoutineAttemptSource? AttemptSource { get { throw null; } } + public Azure.AI.Projects.RoutineRunDiagnostics Diagnostics { get { throw null; } } + public string DispatchId { get { throw null; } } + public System.DateTimeOffset? EndedAt { get { throw null; } } + public string ErrorMessage { get { throw null; } } + public string ErrorType { get { throw null; } } + public string Id { get { throw null; } } + public Azure.AI.Projects.RoutineRunPhase? Phase { get { throw null; } } + public string ResponseId { get { throw null; } } + public System.DateTimeOffset StartedAt { get { throw null; } } + public string Status { get { throw null; } } + public string TaskId { get { throw null; } } + public System.DateTimeOffset? TriggeredAt { get { throw null; } } + public Azure.AI.Projects.RoutineTriggerType TriggerType { get { throw null; } } + protected virtual Azure.AI.Projects.RoutineRun JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.RoutineRun PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.RoutineRun System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.RoutineRun System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class RoutineRunDiagnostics : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal RoutineRunDiagnostics() { } + public System.Collections.Generic.IDictionary Metrics { get { throw null; } } + public System.Collections.Generic.IDictionary Parameters { get { throw null; } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual Azure.AI.Projects.RoutineRunDiagnostics JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.RoutineRunDiagnostics PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.RoutineRunDiagnostics System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.RoutineRunDiagnostics System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct RoutineRunPhase : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public RoutineRunPhase(string value) { throw null; } + public static Azure.AI.Projects.RoutineRunPhase Completed { get { throw null; } } + public static Azure.AI.Projects.RoutineRunPhase Dispatching { get { throw null; } } + public static Azure.AI.Projects.RoutineRunPhase Failed { get { throw null; } } + public static Azure.AI.Projects.RoutineRunPhase Queued { get { throw null; } } + public bool Equals(Azure.AI.Projects.RoutineRunPhase other) { throw null; } + public override bool Equals(object obj) { throw null; } + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.AI.Projects.RoutineRunPhase left, Azure.AI.Projects.RoutineRunPhase right) { throw null; } + public static implicit operator Azure.AI.Projects.RoutineRunPhase (string value) { throw null; } + public static implicit operator Azure.AI.Projects.RoutineRunPhase? (string value) { throw null; } + public static bool operator !=(Azure.AI.Projects.RoutineRunPhase left, Azure.AI.Projects.RoutineRunPhase right) { throw null; } + public override string ToString() { throw null; } + } + public abstract partial class RoutineTrigger : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal RoutineTrigger() { } + protected virtual Azure.AI.Projects.RoutineTrigger JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.RoutineTrigger PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.RoutineTrigger System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.RoutineTrigger System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct RoutineTriggerType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public RoutineTriggerType(string value) { throw null; } + public static Azure.AI.Projects.RoutineTriggerType GithubIssueOpened { get { throw null; } } + public static Azure.AI.Projects.RoutineTriggerType Schedule { get { throw null; } } + public static Azure.AI.Projects.RoutineTriggerType Timer { get { throw null; } } + public bool Equals(Azure.AI.Projects.RoutineTriggerType other) { throw null; } + public override bool Equals(object obj) { throw null; } + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.AI.Projects.RoutineTriggerType left, Azure.AI.Projects.RoutineTriggerType right) { throw null; } + public static implicit operator Azure.AI.Projects.RoutineTriggerType (string value) { throw null; } + public static implicit operator Azure.AI.Projects.RoutineTriggerType? (string value) { throw null; } + public static bool operator !=(Azure.AI.Projects.RoutineTriggerType left, Azure.AI.Projects.RoutineTriggerType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class RubricBasedEvaluatorDefinition : Azure.AI.Projects.Evaluation.EvaluatorDefinition, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public RubricBasedEvaluatorDefinition(System.Collections.Generic.IEnumerable dimensions) { } + public System.Collections.Generic.IList Dimensions { get { throw null; } } + public float? PassThreshold { get { throw null; } set { } } + protected override Azure.AI.Projects.Evaluation.EvaluatorDefinition JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.Evaluation.EvaluatorDefinition PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.RubricBasedEvaluatorDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.RubricBasedEvaluatorDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ScheduleRoutineTrigger : Azure.AI.Projects.RoutineTrigger, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ScheduleRoutineTrigger(string cronExpression, string timeZone) { } + public string CronExpression { get { throw null; } set { } } + public string TimeZone { get { throw null; } set { } } + protected override Azure.AI.Projects.RoutineTrigger JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.RoutineTrigger PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.ScheduleRoutineTrigger System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.ScheduleRoutineTrigger System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SimpleQnADataGenerationJobOptions : Azure.AI.Projects.DataGenerationJobOptions, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SimpleQnADataGenerationJobOptions(int maxSamples) { } + public System.Collections.Generic.IList QuestionTypes { get { throw null; } } + protected override Azure.AI.Projects.DataGenerationJobOptions JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.DataGenerationJobOptions PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.SimpleQnADataGenerationJobOptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.SimpleQnADataGenerationJobOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SimpleQnAFineTuningQuestionType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SimpleQnAFineTuningQuestionType(string value) { throw null; } + public static Azure.AI.Projects.SimpleQnAFineTuningQuestionType LongAnswer { get { throw null; } } + public static Azure.AI.Projects.SimpleQnAFineTuningQuestionType ShortAnswer { get { throw null; } } + public bool Equals(Azure.AI.Projects.SimpleQnAFineTuningQuestionType other) { throw null; } + public override bool Equals(object obj) { throw null; } + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.AI.Projects.SimpleQnAFineTuningQuestionType left, Azure.AI.Projects.SimpleQnAFineTuningQuestionType right) { throw null; } + public static implicit operator Azure.AI.Projects.SimpleQnAFineTuningQuestionType (string value) { throw null; } + public static implicit operator Azure.AI.Projects.SimpleQnAFineTuningQuestionType? (string value) { throw null; } + public static bool operator !=(Azure.AI.Projects.SimpleQnAFineTuningQuestionType left, Azure.AI.Projects.SimpleQnAFineTuningQuestionType right) { throw null; } + public override string ToString() { throw null; } + } public partial class SystemDataV3 : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal SystemDataV3() { } @@ -1199,6 +2117,21 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class TimerRoutineTrigger : Azure.AI.Projects.RoutineTrigger, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public TimerRoutineTrigger(string at) { } + public string At { get { throw null; } set { } } + public string TimeZone { get { throw null; } set { } } + protected override Azure.AI.Projects.RoutineTrigger JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.RoutineTrigger PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.TimerRoutineTrigger System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.TimerRoutineTrigger System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ToolDescription : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ToolDescription() { } @@ -1214,6 +2147,70 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class ToolUseFineTuningDataGenerationJobOptions : Azure.AI.Projects.DataGenerationJobOptions, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ToolUseFineTuningDataGenerationJobOptions(int maxSamples) { } + protected override Azure.AI.Projects.DataGenerationJobOptions JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.DataGenerationJobOptions PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.ToolUseFineTuningDataGenerationJobOptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.ToolUseFineTuningDataGenerationJobOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TracesDataGenerationJobOptions : Azure.AI.Projects.DataGenerationJobOptions, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public TracesDataGenerationJobOptions(int maxSamples) { } + protected override Azure.AI.Projects.DataGenerationJobOptions JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.DataGenerationJobOptions PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.TracesDataGenerationJobOptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.TracesDataGenerationJobOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TracesDataGenerationJobSource : Azure.AI.Projects.DataGenerationJobSource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public TracesDataGenerationJobSource(System.DateTimeOffset startTime) { } + public string AgentId { get { throw null; } set { } } + public string AgentName { get { throw null; } set { } } + public string AgentVersion { get { throw null; } set { } } + public override string Description { get { throw null; } set { } } + public System.DateTimeOffset? EndTime { get { throw null; } set { } } + public System.DateTimeOffset StartTime { get { throw null; } set { } } + protected override Azure.AI.Projects.DataGenerationJobSource JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.DataGenerationJobSource PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.TracesDataGenerationJobSource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.TracesDataGenerationJobSource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TracesEvaluatorGenerationJobSource : Azure.AI.Projects.EvaluatorGenerationJobSource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public TracesEvaluatorGenerationJobSource(System.DateTimeOffset startTime) { } + public string AgentId { get { throw null; } set { } } + public string AgentName { get { throw null; } set { } } + public string AgentVersion { get { throw null; } set { } } + public string Description { get { throw null; } set { } } + public System.DateTimeOffset? EndTime { get { throw null; } set { } } + public System.DateTimeOffset StartTime { get { throw null; } set { } } + protected override Azure.AI.Projects.EvaluatorGenerationJobSource JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.EvaluatorGenerationJobSource PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.TracesEvaluatorGenerationJobSource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.TracesEvaluatorGenerationJobSource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct TreatmentEffectType : System.IEquatable { @@ -1329,6 +2326,7 @@ public partial class AzureAIAgentTarget : Azure.AI.Projects.Evaluation.Evaluatio public AzureAIAgentTarget(string name) { } public string Name { get { throw null; } set { } } public System.Collections.Generic.IList ToolDescriptions { get { throw null; } } + public System.Collections.Generic.IList Tools { get { throw null; } } public string Version { get { throw null; } set { } } protected override Azure.AI.Projects.Evaluation.EvaluationTarget JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1730,6 +2728,23 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class EvaluationsDimension : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EvaluationsDimension(string id, string description, int weight) { } + public bool? AlwaysApplicable { get { throw null; } set { } } + public string Description { get { throw null; } set { } } + public string Id { get { throw null; } set { } } + public int Weight { get { throw null; } set { } } + protected virtual Azure.AI.Projects.Evaluation.EvaluationsDimension JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.Evaluation.EvaluationsDimension PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.Evaluation.EvaluationsDimension System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.Evaluation.EvaluationsDimension System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public abstract partial class EvaluationTarget : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal EvaluationTarget() { } @@ -1846,6 +2861,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static Azure.AI.Projects.Evaluation.EvaluatorDefinitionType OpenaiGraders { get { throw null; } } public static Azure.AI.Projects.Evaluation.EvaluatorDefinitionType Prompt { get { throw null; } } public static Azure.AI.Projects.Evaluation.EvaluatorDefinitionType PromptAndCode { get { throw null; } } + public static Azure.AI.Projects.Evaluation.EvaluatorDefinitionType Rubric { get { throw null; } } public static Azure.AI.Projects.Evaluation.EvaluatorDefinitionType Service { get { throw null; } } public bool Equals(Azure.AI.Projects.Evaluation.EvaluatorDefinitionType other) { throw null; } public override bool Equals(object obj) { throw null; } @@ -1921,6 +2937,7 @@ public EvaluatorVersion(Azure.AI.Projects.EvaluatorType evaluatorType, System.Co public string Description { get { throw null; } set { } } public string DisplayName { get { throw null; } set { } } public Azure.AI.Projects.EvaluatorType EvaluatorType { get { throw null; } set { } } + public Azure.AI.Projects.EvaluatorGenerationArtifacts GenerationArtifacts { get { throw null; } } public string Id { get { throw null; } } public System.Collections.Generic.IDictionary Metadata { get { throw null; } } public string ModifiedAt { get { throw null; } } @@ -2207,6 +3224,10 @@ protected ProjectEvaluators() { } public virtual System.ClientModel.ClientResult DeleteVersion(string name, string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteVersionAsync(string name, string version, System.ClientModel.Primitives.RequestOptions options) { throw null; } public virtual System.Threading.Tasks.Task DeleteVersionAsync(string name, string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.ClientResult GetCredentials(string name, string version, Azure.AI.Projects.EvaluatorCredentialRequest credentialRequest, Azure.AI.Projects.FoundryFeaturesOptInKeys? foundryFeatures = default(Azure.AI.Projects.FoundryFeaturesOptInKeys?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.ClientResult GetCredentials(string name, string version, System.ClientModel.BinaryContent content, string foundryFeatures = null, System.ClientModel.Primitives.RequestOptions options = null) { throw null; } + public virtual System.Threading.Tasks.Task> GetCredentialsAsync(string name, string version, Azure.AI.Projects.EvaluatorCredentialRequest credentialRequest, Azure.AI.Projects.FoundryFeaturesOptInKeys? foundryFeatures = default(Azure.AI.Projects.FoundryFeaturesOptInKeys?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetCredentialsAsync(string name, string version, System.ClientModel.BinaryContent content, string foundryFeatures = null, System.ClientModel.Primitives.RequestOptions options = null) { throw null; } public virtual System.ClientModel.CollectionResult GetLatestVersions(Azure.AI.Projects.Evaluation.ListVersionsRequestType? type = default(Azure.AI.Projects.Evaluation.ListVersionsRequestType?), int? limit = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.ClientModel.Primitives.CollectionResult GetLatestVersions(string type, int? limit, System.ClientModel.Primitives.RequestOptions options) { throw null; } public virtual System.ClientModel.AsyncCollectionResult GetLatestVersionsAsync(Azure.AI.Projects.Evaluation.ListVersionsRequestType? type = default(Azure.AI.Projects.Evaluation.ListVersionsRequestType?), int? limit = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -2219,6 +3240,10 @@ protected ProjectEvaluators() { } public virtual System.ClientModel.Primitives.CollectionResult GetVersions(string name, string type, int? limit, System.ClientModel.Primitives.RequestOptions options) { throw null; } public virtual System.ClientModel.AsyncCollectionResult GetVersionsAsync(string name, Azure.AI.Projects.Evaluation.ListVersionsRequestType? type = default(Azure.AI.Projects.Evaluation.ListVersionsRequestType?), int? limit = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.ClientModel.Primitives.AsyncCollectionResult GetVersionsAsync(string name, string type, int? limit, System.ClientModel.Primitives.RequestOptions options) { throw null; } + public virtual System.ClientModel.ClientResult StartPendingUpload(string name, string version, Azure.AI.Projects.PendingUploadConfiguration pendingUploadRequest, Azure.AI.Projects.FoundryFeaturesOptInKeys? foundryFeatures = default(Azure.AI.Projects.FoundryFeaturesOptInKeys?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.ClientResult StartPendingUpload(string name, string version, System.ClientModel.BinaryContent content, string foundryFeatures = null, System.ClientModel.Primitives.RequestOptions options = null) { throw null; } + public virtual System.Threading.Tasks.Task> StartPendingUploadAsync(string name, string version, Azure.AI.Projects.PendingUploadConfiguration pendingUploadRequest, Azure.AI.Projects.FoundryFeaturesOptInKeys? foundryFeatures = default(Azure.AI.Projects.FoundryFeaturesOptInKeys?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task StartPendingUploadAsync(string name, string version, System.ClientModel.BinaryContent content, string foundryFeatures = null, System.ClientModel.Primitives.RequestOptions options = null) { throw null; } public virtual System.ClientModel.ClientResult UpdateVersion(string name, string version, System.ClientModel.BinaryContent content, System.ClientModel.Primitives.RequestOptions options = null) { throw null; } public virtual System.Threading.Tasks.Task UpdateVersionAsync(string name, string version, System.ClientModel.BinaryContent content, System.ClientModel.Primitives.RequestOptions options = null) { throw null; } } @@ -2569,10 +3594,9 @@ protected AIProjectMemoryStores() { } public virtual System.ClientModel.ClientResult DeleteScope(string name, string scope, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteScopeAsync(string name, System.ClientModel.BinaryContent content, System.ClientModel.Primitives.RequestOptions options = null) { throw null; } public virtual System.Threading.Tasks.Task> DeleteScopeAsync(string name, string scope, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.ClientModel.CollectionResult GetMemories(string name, int? limit = default(int?), Azure.AI.Projects.Memory.MemoryStoreListOrder? order = default(Azure.AI.Projects.Memory.MemoryStoreListOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.ClientModel.Primitives.CollectionResult GetMemories(string name, int? limit, string order, string after, string before, System.ClientModel.Primitives.RequestOptions options) { throw null; } - public virtual System.ClientModel.AsyncCollectionResult GetMemoriesAsync(string name, int? limit = default(int?), Azure.AI.Projects.Memory.MemoryStoreListOrder? order = default(Azure.AI.Projects.Memory.MemoryStoreListOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.ClientModel.Primitives.AsyncCollectionResult GetMemoriesAsync(string name, int? limit, string order, string after, string before, System.ClientModel.Primitives.RequestOptions options) { throw null; } + public virtual System.ClientModel.CollectionResult GetMemories(string name, string scope, Azure.AI.Projects.Memory.MemoryItemKind? kind = default(Azure.AI.Projects.Memory.MemoryItemKind?), int? limit = default(int?), Azure.AI.Projects.Memory.MemoryStoreListOrder? order = default(Azure.AI.Projects.Memory.MemoryStoreListOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.Primitives.AsyncCollectionResult GetMemoriesAsync(string name, System.ClientModel.BinaryContent content, string kind = null, int? limit = default(int?), string order = null, string after = null, string before = null, System.ClientModel.Primitives.RequestOptions options = null) { throw null; } + public virtual System.ClientModel.AsyncCollectionResult GetMemoriesAsync(string name, string scope, Azure.AI.Projects.Memory.MemoryItemKind? kind = default(Azure.AI.Projects.Memory.MemoryItemKind?), int? limit = default(int?), Azure.AI.Projects.Memory.MemoryStoreListOrder? order = default(Azure.AI.Projects.Memory.MemoryStoreListOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.ClientModel.ClientResult GetMemory(string name, string memoryId, System.ClientModel.Primitives.RequestOptions options) { throw null; } public virtual System.ClientModel.ClientResult GetMemory(string name, string memoryId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task GetMemoryAsync(string name, string memoryId, System.ClientModel.Primitives.RequestOptions options) { throw null; } @@ -2661,6 +3685,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer private readonly int _dummyPrimitive; public MemoryItemKind(string value) { throw null; } public static Azure.AI.Projects.Memory.MemoryItemKind ChatSummary { get { throw null; } } + public static Azure.AI.Projects.Memory.MemoryItemKind Procedural { get { throw null; } } public static Azure.AI.Projects.Memory.MemoryItemKind UserProfile { get { throw null; } } public bool Equals(Azure.AI.Projects.Memory.MemoryItemKind other) { throw null; } public override bool Equals(object obj) { throw null; } @@ -2785,8 +3810,10 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class MemoryStoreDefaultOptions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public MemoryStoreDefaultOptions(bool isUserProfileEnabled, bool isChatSummaryEnabled) { } + public System.TimeSpan? DefaultTtlSeconds { get { throw null; } set { } } public bool IsChatSummaryEnabled { get { throw null; } set { } } public bool IsUserProfileEnabled { get { throw null; } set { } } + public bool? ProceduralMemoryEnabled { get { throw null; } set { } } public string UserProfileDetails { get { throw null; } set { } } protected virtual Azure.AI.Projects.Memory.MemoryStoreDefaultOptions JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } diff --git a/sdk/ai/Azure.AI.Projects/api/Azure.AI.Projects.netstandard2.0.cs b/sdk/ai/Azure.AI.Projects/api/Azure.AI.Projects.netstandard2.0.cs index 7102c7b5ba29..cc13b71df0d6 100644 --- a/sdk/ai/Azure.AI.Projects/api/Azure.AI.Projects.netstandard2.0.cs +++ b/sdk/ai/Azure.AI.Projects/api/Azure.AI.Projects.netstandard2.0.cs @@ -1,5 +1,37 @@ namespace Azure.AI.Projects { + public partial class AgentDataGenerationJobSource : Azure.AI.Projects.DataGenerationJobSource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AgentDataGenerationJobSource(string agentName) { } + public string AgentName { get { throw null; } set { } } + public string AgentVersion { get { throw null; } set { } } + public override string Description { get { throw null; } set { } } + protected override Azure.AI.Projects.DataGenerationJobSource JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.DataGenerationJobSource PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.AgentDataGenerationJobSource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.AgentDataGenerationJobSource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class AgentEvaluatorGenerationJobSource : Azure.AI.Projects.EvaluatorGenerationJobSource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public AgentEvaluatorGenerationJobSource(string agentName) { } + public string AgentName { get { throw null; } set { } } + public string AgentVersion { get { throw null; } set { } } + public string Description { get { throw null; } set { } } + protected override Azure.AI.Projects.EvaluatorGenerationJobSource JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.EvaluatorGenerationJobSource PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.AgentEvaluatorGenerationJobSource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.AgentEvaluatorGenerationJobSource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class AgenticIdentityPreviewCredentials : Azure.AI.Projects.AIProjectConnectionBaseCredential, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal AgenticIdentityPreviewCredentials() { } @@ -37,10 +69,12 @@ public AIProjectClient(System.Uri endpoint, System.ClientModel.AuthenticationTok public AIProjectClient(System.Uri endpoint, System.ClientModel.AuthenticationTokenProvider tokenProvider, Azure.AI.Projects.AIProjectClientOptions options) : base (default(int)) { } public virtual Azure.AI.Projects.Agents.AgentAdministrationClient AgentAdministrationClient { get { throw null; } } public virtual Azure.AI.Projects.AIProjectConnectionsOperations Connections { get { throw null; } } + public virtual Azure.AI.Projects.DataGenerationJobs DataGenerationJobs { get { throw null; } } public virtual Azure.AI.Projects.AIProjectDatasetsOperations Datasets { get { throw null; } } public virtual Azure.AI.Projects.AIProjectDeploymentsOperations Deployments { get { throw null; } } public virtual Azure.AI.Projects.Evaluation.EvaluationRules EvaluationRules { get { throw null; } } public virtual Azure.AI.Projects.Evaluation.EvaluationTaxonomies EvaluationTaxonomies { get { throw null; } } + public virtual Azure.AI.Projects.EvaluatorGenerationJobs EvaluatorGenerationJobs { get { throw null; } } public virtual Azure.AI.Projects.Evaluation.ProjectEvaluators Evaluators { get { throw null; } } public virtual Azure.AI.Projects.AIProjectIndexesOperations Indexes { get { throw null; } } public virtual Azure.AI.Projects.Evaluation.ProjectInsights Insights { get { throw null; } } @@ -52,6 +86,7 @@ public AIProjectClient(System.Uri endpoint, System.ClientModel.AuthenticationTok public virtual Azure.AI.Projects.ProjectSchedules Schedules { get { throw null; } } public virtual Azure.AI.Projects.AIProjectTelemetry Telemetry { get { throw null; } } public virtual Azure.AI.Projects.Memory.AIProjectMemoryStores GetAIProjectMemoryStoresClient() { throw null; } + public virtual Azure.AI.Projects.AIProjectRoutines GetAIProjectRoutinesClient() { throw null; } public override System.Collections.Generic.IEnumerable GetAllConnections() { throw null; } public override System.ClientModel.Primitives.ClientConnection GetConnection(string connectionId) { throw null; } } @@ -419,6 +454,43 @@ protected AIProjectModels() { } public virtual System.ClientModel.ClientResult UpdateModelVersion(string name, string version, System.ClientModel.BinaryContent content, System.ClientModel.Primitives.RequestOptions options = null) { throw null; } public virtual System.Threading.Tasks.Task UpdateModelVersionAsync(string name, string version, System.ClientModel.BinaryContent content, System.ClientModel.Primitives.RequestOptions options = null) { throw null; } } + public partial class AIProjectRoutines + { + protected AIProjectRoutines() { } + public System.ClientModel.Primitives.ClientPipeline Pipeline { get { throw null; } } + public virtual System.ClientModel.ClientResult CreateOrUpdateRoutine(string routineName, System.ClientModel.BinaryContent content, string foundryFeatures = null, System.ClientModel.Primitives.RequestOptions options = null) { throw null; } + public virtual System.ClientModel.ClientResult CreateOrUpdateRoutine(string routineName, System.Collections.Generic.IDictionary triggers, Azure.AI.Projects.RoutineAction action, string description = null, bool? enabled = default(bool?), Azure.AI.Projects.FoundryFeaturesOptInKeys? foundryFeatures = default(Azure.AI.Projects.FoundryFeaturesOptInKeys?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task CreateOrUpdateRoutineAsync(string routineName, System.ClientModel.BinaryContent content, string foundryFeatures = null, System.ClientModel.Primitives.RequestOptions options = null) { throw null; } + public virtual System.Threading.Tasks.Task> CreateOrUpdateRoutineAsync(string routineName, System.Collections.Generic.IDictionary triggers, Azure.AI.Projects.RoutineAction action, string description = null, bool? enabled = default(bool?), Azure.AI.Projects.FoundryFeaturesOptInKeys? foundryFeatures = default(Azure.AI.Projects.FoundryFeaturesOptInKeys?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.ClientResult DeleteRoutine(string routineName, Azure.AI.Projects.FoundryFeaturesOptInKeys? foundryFeatures = default(Azure.AI.Projects.FoundryFeaturesOptInKeys?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.ClientResult DeleteRoutine(string routineName, string foundryFeatures, System.ClientModel.Primitives.RequestOptions options) { throw null; } + public virtual System.Threading.Tasks.Task DeleteRoutineAsync(string routineName, Azure.AI.Projects.FoundryFeaturesOptInKeys? foundryFeatures = default(Azure.AI.Projects.FoundryFeaturesOptInKeys?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DeleteRoutineAsync(string routineName, string foundryFeatures, System.ClientModel.Primitives.RequestOptions options) { throw null; } + public virtual System.ClientModel.ClientResult DisableRoutine(string routineName, Azure.AI.Projects.FoundryFeaturesOptInKeys? foundryFeatures = default(Azure.AI.Projects.FoundryFeaturesOptInKeys?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.ClientResult DisableRoutine(string routineName, string foundryFeatures, System.ClientModel.Primitives.RequestOptions options) { throw null; } + public virtual System.Threading.Tasks.Task> DisableRoutineAsync(string routineName, Azure.AI.Projects.FoundryFeaturesOptInKeys? foundryFeatures = default(Azure.AI.Projects.FoundryFeaturesOptInKeys?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DisableRoutineAsync(string routineName, string foundryFeatures, System.ClientModel.Primitives.RequestOptions options) { throw null; } + public virtual System.ClientModel.ClientResult DispatchRoutineAsync(string routineName, Azure.AI.Projects.RoutineDispatchPayload payload = null, Azure.AI.Projects.FoundryFeaturesOptInKeys? foundryFeatures = default(Azure.AI.Projects.FoundryFeaturesOptInKeys?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.ClientResult DispatchRoutineAsync(string routineName, System.ClientModel.BinaryContent content, string foundryFeatures = null, System.ClientModel.Primitives.RequestOptions options = null) { throw null; } + public virtual System.Threading.Tasks.Task> DispatchRoutineAsyncAsync(string routineName, Azure.AI.Projects.RoutineDispatchPayload payload = null, Azure.AI.Projects.FoundryFeaturesOptInKeys? foundryFeatures = default(Azure.AI.Projects.FoundryFeaturesOptInKeys?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task DispatchRoutineAsyncAsync(string routineName, System.ClientModel.BinaryContent content, string foundryFeatures = null, System.ClientModel.Primitives.RequestOptions options = null) { throw null; } + public virtual System.ClientModel.ClientResult EnableRoutine(string routineName, Azure.AI.Projects.FoundryFeaturesOptInKeys? foundryFeatures = default(Azure.AI.Projects.FoundryFeaturesOptInKeys?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.ClientResult EnableRoutine(string routineName, string foundryFeatures, System.ClientModel.Primitives.RequestOptions options) { throw null; } + public virtual System.Threading.Tasks.Task> EnableRoutineAsync(string routineName, Azure.AI.Projects.FoundryFeaturesOptInKeys? foundryFeatures = default(Azure.AI.Projects.FoundryFeaturesOptInKeys?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task EnableRoutineAsync(string routineName, string foundryFeatures, System.ClientModel.Primitives.RequestOptions options) { throw null; } + public virtual System.ClientModel.ClientResult GetRoutine(string routineName, Azure.AI.Projects.FoundryFeaturesOptInKeys? foundryFeatures = default(Azure.AI.Projects.FoundryFeaturesOptInKeys?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.ClientResult GetRoutine(string routineName, string foundryFeatures, System.ClientModel.Primitives.RequestOptions options) { throw null; } + public virtual System.Threading.Tasks.Task> GetRoutineAsync(string routineName, Azure.AI.Projects.FoundryFeaturesOptInKeys? foundryFeatures = default(Azure.AI.Projects.FoundryFeaturesOptInKeys?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetRoutineAsync(string routineName, string foundryFeatures, System.ClientModel.Primitives.RequestOptions options) { throw null; } + public virtual System.ClientModel.CollectionResult GetRoutineRuns(string routineName, Azure.AI.Projects.FoundryFeaturesOptInKeys? foundryFeatures = default(Azure.AI.Projects.FoundryFeaturesOptInKeys?), string filter = null, int? limit = default(int?), Azure.AI.Projects.Memory.MemoryStoreListOrder? order = default(Azure.AI.Projects.Memory.MemoryStoreListOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.Primitives.CollectionResult GetRoutineRuns(string routineName, string foundryFeatures, string filter, int? limit, string order, string after, string before, System.ClientModel.Primitives.RequestOptions options) { throw null; } + public virtual System.ClientModel.AsyncCollectionResult GetRoutineRunsAsync(string routineName, Azure.AI.Projects.FoundryFeaturesOptInKeys? foundryFeatures = default(Azure.AI.Projects.FoundryFeaturesOptInKeys?), string filter = null, int? limit = default(int?), Azure.AI.Projects.Memory.MemoryStoreListOrder? order = default(Azure.AI.Projects.Memory.MemoryStoreListOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.Primitives.AsyncCollectionResult GetRoutineRunsAsync(string routineName, string foundryFeatures, string filter, int? limit, string order, string after, string before, System.ClientModel.Primitives.RequestOptions options) { throw null; } + public virtual System.ClientModel.CollectionResult GetRoutines(Azure.AI.Projects.FoundryFeaturesOptInKeys? foundryFeatures = default(Azure.AI.Projects.FoundryFeaturesOptInKeys?), int? limit = default(int?), Azure.AI.Projects.Memory.MemoryStoreListOrder? order = default(Azure.AI.Projects.Memory.MemoryStoreListOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.Primitives.CollectionResult GetRoutines(string foundryFeatures, int? limit, string order, string after, string before, System.ClientModel.Primitives.RequestOptions options) { throw null; } + public virtual System.ClientModel.AsyncCollectionResult GetRoutinesAsync(Azure.AI.Projects.FoundryFeaturesOptInKeys? foundryFeatures = default(Azure.AI.Projects.FoundryFeaturesOptInKeys?), int? limit = default(int?), Azure.AI.Projects.Memory.MemoryStoreListOrder? order = default(Azure.AI.Projects.Memory.MemoryStoreListOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.Primitives.AsyncCollectionResult GetRoutinesAsync(string foundryFeatures, int? limit, string order, string after, string before, System.ClientModel.Primitives.RequestOptions options) { throw null; } + } public partial class AIProjectTelemetry { public AIProjectTelemetry(Azure.AI.Projects.AIProjectClient outerInstance) { } @@ -450,6 +522,8 @@ public static partial class AzureAIProjectsModelFactory { public static Azure.AI.Projects.Evaluation.AgentClusterInsightRequest AgentClusterInsightRequest(string agentName = null, Azure.AI.Projects.Evaluation.InsightModelConfiguration modelConfiguration = null) { throw null; } public static Azure.AI.Projects.Evaluation.AgentClusterInsightResult AgentClusterInsightResult(Azure.AI.Projects.Evaluation.ClusterInsightResult clusterInsight = null) { throw null; } + public static Azure.AI.Projects.AgentDataGenerationJobSource AgentDataGenerationJobSource(string description = null, string agentName = null, string agentVersion = null) { throw null; } + public static Azure.AI.Projects.AgentEvaluatorGenerationJobSource AgentEvaluatorGenerationJobSource(string description = null, string agentName = null, string agentVersion = null) { throw null; } public static Azure.AI.Projects.AgenticIdentityPreviewCredentials AgenticIdentityPreviewCredentials() { throw null; } public static Azure.AI.Projects.AIProjectBlobReference AIProjectBlobReference(System.Uri blobUri = null, string storageAccountArmId = null, Azure.AI.Projects.BlobReferenceSasCredential credential = null) { throw null; } public static Azure.AI.Projects.AIProjectConnection AIProjectConnection(string name = null, string id = null, Azure.AI.Projects.ConnectionType type = default(Azure.AI.Projects.ConnectionType), string target = null, bool isDefault = false, Azure.AI.Projects.AIProjectConnectionBaseCredential credentials = null, System.Collections.Generic.IReadOnlyDictionary metadata = null) { throw null; } @@ -478,9 +552,22 @@ public static partial class AzureAIProjectsModelFactory public static Azure.AI.Projects.Evaluation.CodeBasedEvaluatorDefinition CodeBasedEvaluatorDefinition(System.BinaryData initParameters = null, System.BinaryData dataSchema = null, System.Collections.Generic.IDictionary metrics = null, string codeText = null, string entryPoint = null, string imageTag = null, System.Uri blobUri = null) { throw null; } public static Azure.AI.Projects.Evaluation.ContinuousEvaluationRuleAction ContinuousEvaluationRuleAction(string evalId = null, int? maxHourlyRuns = default(int?)) { throw null; } public static Azure.AI.Projects.CreateAsyncResponse CreateAsyncResponse(System.Uri location = null, System.Uri operationResult = null) { throw null; } + public static Azure.AI.Projects.DataGenerationJobInputs DataGenerationJobInputs(string name = null, System.Collections.Generic.IEnumerable sources = null, Azure.AI.Projects.DataGenerationJobOptions options = null, Azure.AI.Projects.DataGenerationJobScenario scenario = default(Azure.AI.Projects.DataGenerationJobScenario), Azure.AI.Projects.DataGenerationJobOutputOptions outputOptions = null) { throw null; } + public static Azure.AI.Projects.DataGenerationJobOptions DataGenerationJobOptions(string type = null, int maxSamples = 0, float? trainSplit = default(float?), Azure.AI.Projects.DataGenerationModelOptions modelOptions = null) { throw null; } + public static Azure.AI.Projects.DataGenerationJobOutput DataGenerationJobOutput(string type = null) { throw null; } + public static Azure.AI.Projects.DataGenerationJobOutputOptions DataGenerationJobOutputOptions(string name = null, string description = null, System.Collections.Generic.IDictionary tags = null) { throw null; } + public static Azure.AI.Projects.DataGenerationJobResult DataGenerationJobResult(System.Collections.Generic.IEnumerable outputs = null, int generatedSamples = 0, Azure.AI.Projects.DataGenerationTokenUsage tokenUsage = null) { throw null; } + public static Azure.AI.Projects.DataGenerationJobSource DataGenerationJobSource(string type = null, string description = null) { throw null; } + public static Azure.AI.Projects.DataGenerationModelOptions DataGenerationModelOptions(string model = null) { throw null; } + public static Azure.AI.Projects.DataGenerationTokenUsage DataGenerationTokenUsage(long promptTokens = (long)0, long completionTokens = (long)0, long totalTokens = (long)0) { throw null; } public static Azure.AI.Projects.DatasetCredential DatasetCredential(Azure.AI.Projects.AIProjectBlobReference blobReference = null) { throw null; } - public static Azure.AI.Projects.DeleteMemoryResponse DeleteMemoryResponse(string name = null, string memoryId = null, bool deleted = false) { throw null; } + public static Azure.AI.Projects.DatasetDataGenerationJobOutput DatasetDataGenerationJobOutput(string id = null, string name = null, string version = null, string description = null, System.Collections.Generic.IReadOnlyDictionary tags = null) { throw null; } + public static Azure.AI.Projects.DatasetDataGenerationJobSource DatasetDataGenerationJobSource(string description = null, string name = null, string version = null) { throw null; } + public static Azure.AI.Projects.DatasetEvaluatorGenerationJobSource DatasetEvaluatorGenerationJobSource(string description = null, string name = null, string version = null) { throw null; } + public static Azure.AI.Projects.DatasetReference DatasetReference(string name = null, string version = null) { throw null; } + public static Azure.AI.Projects.DeleteMemoryResponse DeleteMemoryResponse(string memoryId = null, bool deleted = false) { throw null; } public static Azure.AI.Projects.Memory.DeleteMemoryStoreResponse DeleteMemoryStoreResponse(string name = null, bool isDeleted = false) { throw null; } + public static Azure.AI.Projects.DispatchRoutineResponse DispatchRoutineResponse(string dispatchId = null, string actionCorrelationId = null, string taskId = null) { throw null; } public static Azure.AI.Projects.EmbeddingConfiguration EmbeddingConfiguration(string modelDeploymentName = null, string embeddingField = null) { throw null; } public static Azure.AI.Projects.Evaluation.EvalResult EvalResult(string name = null, string type = null, float score = 0f, bool isPassed = false) { throw null; } public static Azure.AI.Projects.Evaluation.EvalRunResultCompareItem EvalRunResultCompareItem(string treatmentRunId = null, Azure.AI.Projects.Evaluation.EvalRunResultSummary treatmentRunSummary = null, float deltaEstimate = 0f, float pValue = 0f, Azure.AI.Projects.TreatmentEffectType treatmentEffect = default(Azure.AI.Projects.TreatmentEffectType)) { throw null; } @@ -494,15 +581,25 @@ public static partial class AzureAIProjectsModelFactory public static Azure.AI.Projects.Evaluation.EvaluationRunClusterInsightRequest EvaluationRunClusterInsightRequest(string evalId = null, System.Collections.Generic.IEnumerable runIds = null, Azure.AI.Projects.Evaluation.InsightModelConfiguration modelConfiguration = null) { throw null; } public static Azure.AI.Projects.Evaluation.EvaluationRunClusterInsightResult EvaluationRunClusterInsightResult(Azure.AI.Projects.Evaluation.ClusterInsightResult clusterInsight = null) { throw null; } public static Azure.AI.Projects.Evaluation.EvaluationScheduleTask EvaluationScheduleTask(System.Collections.Generic.IDictionary configuration = null, string evalId = null, System.BinaryData evalRun = null) { throw null; } + public static Azure.AI.Projects.Evaluation.EvaluationsDimension EvaluationsDimension(string id = null, string description = null, int weight = 0, bool? alwaysApplicable = default(bool?)) { throw null; } public static Azure.AI.Projects.Evaluation.EvaluationTarget EvaluationTarget(string type = null) { throw null; } public static Azure.AI.Projects.Evaluation.EvaluationTaxonomy EvaluationTaxonomy(string id = null, string name = null, string version = null, string description = null, System.Collections.Generic.IDictionary tags = null, Azure.AI.Projects.Evaluation.EvaluationTaxonomyInput taxonomyInput = null, System.Collections.Generic.IEnumerable taxonomyCategories = null, System.Collections.Generic.IDictionary properties = null) { throw null; } + public static Azure.AI.Projects.EvaluatorCredentialRequest EvaluatorCredentialRequest(System.Uri blobUri = null) { throw null; } public static Azure.AI.Projects.Evaluation.EvaluatorDefinition EvaluatorDefinition(string type = null, System.BinaryData initParameters = null, System.BinaryData dataSchema = null, System.Collections.Generic.IDictionary metrics = null) { throw null; } + public static Azure.AI.Projects.EvaluatorGenerationArtifacts EvaluatorGenerationArtifacts(Azure.AI.Projects.DatasetReference dataset = null, System.Collections.Generic.IEnumerable kinds = null) { throw null; } + public static Azure.AI.Projects.EvaluatorGenerationInputs EvaluatorGenerationInputs(System.Collections.Generic.IEnumerable sources = null, string model = null, string evaluatorName = null, string evaluatorDisplayName = null, string evaluatorDescription = null) { throw null; } + public static Azure.AI.Projects.EvaluatorGenerationJobSource EvaluatorGenerationJobSource(string type = null) { throw null; } + public static Azure.AI.Projects.EvaluatorGenerationTokenUsage EvaluatorGenerationTokenUsage(long inputTokens = (long)0, long outputTokens = (long)0, long totalTokens = (long)0) { throw null; } public static Azure.AI.Projects.Evaluation.EvaluatorMetric EvaluatorMetric(Azure.AI.Projects.Evaluation.EvaluatorMetricType? type, Azure.AI.Projects.Evaluation.EvaluatorMetricDirection? desirableDirection, float? minValue, float? maxValue, bool? isPrimary) { throw null; } public static Azure.AI.Projects.Evaluation.EvaluatorMetric EvaluatorMetric(Azure.AI.Projects.Evaluation.EvaluatorMetricType? type = default(Azure.AI.Projects.Evaluation.EvaluatorMetricType?), Azure.AI.Projects.Evaluation.EvaluatorMetricDirection? desirableDirection = default(Azure.AI.Projects.Evaluation.EvaluatorMetricDirection?), float? minValue = default(float?), float? maxValue = default(float?), float? threshold = default(float?), bool? isPrimary = default(bool?)) { throw null; } - public static Azure.AI.Projects.Evaluation.EvaluatorVersion EvaluatorVersion(string displayName = null, System.Collections.Generic.IDictionary metadata = null, Azure.AI.Projects.EvaluatorType evaluatorType = default(Azure.AI.Projects.EvaluatorType), System.Collections.Generic.IEnumerable categories = null, Azure.AI.Projects.Evaluation.EvaluatorDefinition definition = null, string createdBy = null, string createdAt = null, string modifiedAt = null, string id = null, string name = null, string version = null, string description = null, System.Collections.Generic.IDictionary tags = null) { throw null; } + public static Azure.AI.Projects.Evaluation.EvaluatorVersion EvaluatorVersion(string displayName = null, System.Collections.Generic.IDictionary metadata = null, Azure.AI.Projects.EvaluatorType evaluatorType = default(Azure.AI.Projects.EvaluatorType), System.Collections.Generic.IEnumerable categories = null, Azure.AI.Projects.Evaluation.EvaluatorDefinition definition = null, Azure.AI.Projects.EvaluatorGenerationArtifacts generationArtifacts = null, string createdBy = null, string createdAt = null, string modifiedAt = null, string id = null, string name = null, string version = null, string description = null, System.Collections.Generic.IDictionary tags = null) { throw null; } + public static Azure.AI.Projects.Evaluation.EvaluatorVersion EvaluatorVersion(string displayName, System.Collections.Generic.IDictionary metadata, Azure.AI.Projects.EvaluatorType evaluatorType, System.Collections.Generic.IEnumerable categories, Azure.AI.Projects.Evaluation.EvaluatorDefinition definition, string createdBy, string createdAt, string modifiedAt, string id, string name, string version, string description, System.Collections.Generic.IDictionary tags) { throw null; } + public static Azure.AI.Projects.FileDataGenerationJobOutput FileDataGenerationJobOutput(string id = null, string filename = null) { throw null; } + public static Azure.AI.Projects.FileDataGenerationJobSource FileDataGenerationJobSource(string description = null, string id = null) { throw null; } public static Azure.AI.Projects.FileDataset FileDataset(System.Uri dataUri = null, bool? isReference = default(bool?), string connectionName = null, string id = null, string name = null, string version = null, string description = null, System.Collections.Generic.IDictionary tags = null) { throw null; } public static Azure.AI.Projects.FolderDataset FolderDataset(System.Uri dataUri = null, bool? isReference = default(bool?), string connectionName = null, string id = null, string name = null, string version = null, string description = null, System.Collections.Generic.IDictionary tags = null) { throw null; } public static Azure.AI.Projects.FoundryModelWarning FoundryModelWarning(Azure.AI.Projects.FoundryModelWarningCode? code = default(Azure.AI.Projects.FoundryModelWarningCode?), string message = null) { throw null; } + public static Azure.AI.Projects.GitHubIssueOpenedRoutineTrigger GitHubIssueOpenedRoutineTrigger(string connectionId = null, string assignee = null, string repository = null) { throw null; } public static Azure.AI.Projects.Evaluation.HumanEvaluationPreviewRuleAction HumanEvaluationPreviewRuleAction(string templateId = null) { throw null; } public static Azure.AI.Projects.InputFileContentParam InputFileContentParam(string fileId = null, string filename = null, string fileData = null, System.Uri fileUri = null) { throw null; } public static Azure.AI.Projects.InputTextContentParam InputTextContentParam(string text = null) { throw null; } @@ -513,6 +610,10 @@ public static partial class AzureAIProjectsModelFactory public static Azure.AI.Projects.Evaluation.InsightScheduleTask InsightScheduleTask(System.Collections.Generic.IDictionary configuration = null, Azure.AI.Projects.Evaluation.ProjectsInsight insight = null) { throw null; } public static Azure.AI.Projects.Evaluation.InsightsMetadata InsightsMetadata(System.DateTimeOffset createdAt = default(System.DateTimeOffset), System.DateTimeOffset? completedAt = default(System.DateTimeOffset?)) { throw null; } public static Azure.AI.Projects.Evaluation.InsightSummary InsightSummary(int sampleCount = 0, int uniqueSubclusterCount = 0, int uniqueClusterCount = 0, string methodName = null, Azure.AI.Projects.Evaluation.ClusterTokenUsage usage = null) { throw null; } + public static Azure.AI.Projects.InvokeAgentInvocationsApiDispatchPayload InvokeAgentInvocationsApiDispatchPayload(string input = null) { throw null; } + public static Azure.AI.Projects.InvokeAgentInvocationsApiRoutineAction InvokeAgentInvocationsApiRoutineAction(string agentEndpointId = null, string sessionId = null) { throw null; } + public static Azure.AI.Projects.InvokeAgentResponsesApiDispatchPayload InvokeAgentResponsesApiDispatchPayload(string input = null) { throw null; } + public static Azure.AI.Projects.InvokeAgentResponsesApiRoutineAction InvokeAgentResponsesApiRoutineAction(string agentName = null, string agentEndpointId = null, string conversationId = null) { throw null; } public static Azure.AI.Projects.LoraConfig LoraConfig(int? rank = default(int?), int? alpha = default(int?), System.Collections.Generic.IEnumerable targetModules = null, float? dropout = default(float?)) { throw null; } public static Azure.AI.Projects.ManagedAzureAISearchIndex ManagedAzureAISearchIndex(string id = null, string name = null, string version = null, string description = null, System.Collections.Generic.IDictionary tags = null, string vectorStoreId = null) { throw null; } public static Azure.AI.Projects.Memory.MemoryItem MemoryItem(string memoryId = null, System.DateTimeOffset updatedAt = default(System.DateTimeOffset), string scope = null, string content = null, string kind = null) { throw null; } @@ -520,7 +621,8 @@ public static partial class AzureAIProjectsModelFactory public static Azure.AI.Projects.Memory.MemorySearchItem MemorySearchItem(Azure.AI.Projects.Memory.MemoryItem memoryItem = null) { throw null; } public static Azure.AI.Projects.Memory.MemorySearchResultOptions MemorySearchResultOptions(int? maxMemories = default(int?)) { throw null; } public static Azure.AI.Projects.Memory.MemoryStore MemoryStore(string id = null, System.DateTimeOffset createdAt = default(System.DateTimeOffset), System.DateTimeOffset updatedAt = default(System.DateTimeOffset), string name = null, string description = null, System.Collections.Generic.IDictionary metadata = null, Azure.AI.Projects.Memory.MemoryStoreDefinition definition = null) { throw null; } - public static Azure.AI.Projects.Memory.MemoryStoreDefaultOptions MemoryStoreDefaultOptions(bool isUserProfileEnabled = false, string userProfileDetails = null, bool isChatSummaryEnabled = false) { throw null; } + public static Azure.AI.Projects.Memory.MemoryStoreDefaultOptions MemoryStoreDefaultOptions(bool isUserProfileEnabled, string userProfileDetails, bool isChatSummaryEnabled) { throw null; } + public static Azure.AI.Projects.Memory.MemoryStoreDefaultOptions MemoryStoreDefaultOptions(bool isUserProfileEnabled = false, string userProfileDetails = null, bool isChatSummaryEnabled = false, bool? proceduralMemoryEnabled = default(bool?), System.TimeSpan? defaultTtlSeconds = default(System.TimeSpan?)) { throw null; } public static Azure.AI.Projects.Memory.MemoryStoreDeleteScopeResponse MemoryStoreDeleteScopeResponse(string name = null, string scope = null, bool isDeleted = false) { throw null; } public static Azure.AI.Projects.Memory.MemoryStoreOperationUsage MemoryStoreOperationUsage(int embeddingTokens = 0, long inputTokens = (long)0, Azure.AI.Projects.ResponseUsageInputTokensDetails inputTokensDetails = null, long outputTokens = (long)0, Azure.AI.Projects.ResponseUsageOutputTokensDetails outputTokensDetails = null, long totalTokens = (long)0) { throw null; } public static Azure.AI.Projects.Memory.MemoryStoreSearchResponse MemoryStoreSearchResponse(string searchId = null, System.Collections.Generic.IEnumerable memories = null, Azure.AI.Projects.Memory.MemoryStoreOperationUsage usage = null) { throw null; } @@ -538,19 +640,36 @@ public static partial class AzureAIProjectsModelFactory public static Azure.AI.Projects.PendingUploadConfiguration PendingUploadConfiguration(string pendingUploadId, string connectionName, Azure.AI.Projects.PendingUploadType pendingUploadType) { throw null; } public static Azure.AI.Projects.PendingUploadResult PendingUploadResult(Azure.AI.Projects.AIProjectBlobReference blobReference = null, string pendingUploadId = null, string version = null) { throw null; } public static Azure.AI.Projects.PendingUploadResult PendingUploadResult(Azure.AI.Projects.AIProjectBlobReference blobReference, string pendingUploadId, string version, Azure.AI.Projects.PendingUploadType pendingUploadType) { throw null; } + public static Azure.AI.Projects.ProceduralMemoryItem ProceduralMemoryItem(string memoryId = null, System.DateTimeOffset updatedAt = default(System.DateTimeOffset), string scope = null, string content = null) { throw null; } public static Azure.AI.Projects.Evaluation.ProjectsInsight ProjectsInsight(string id = null, Azure.AI.Projects.Evaluation.InsightsMetadata metadata = null, Azure.AI.Projects.Evaluation.OperationStatus state = default(Azure.AI.Projects.Evaluation.OperationStatus), string displayName = null, Azure.AI.Projects.Evaluation.InsightRequest request = null, Azure.AI.Projects.Evaluation.InsightResult result = null) { throw null; } + public static Azure.AI.Projects.ProjectsRoutine ProjectsRoutine(string name = null, string description = null, bool enabled = false, System.Collections.Generic.IDictionary triggers = null, Azure.AI.Projects.RoutineAction action = null, System.DateTimeOffset? createdAt = default(System.DateTimeOffset?), System.DateTimeOffset? updatedAt = default(System.DateTimeOffset?)) { throw null; } public static Azure.AI.Projects.Evaluation.ProjectsSchedule ProjectsSchedule(string id = null, string displayName = null, string description = null, bool enabled = false, Azure.AI.Projects.Evaluation.ScheduleProvisioningStatus? provisioningStatus = default(Azure.AI.Projects.Evaluation.ScheduleProvisioningStatus?), Azure.AI.Projects.Evaluation.ScheduleTrigger trigger = null, Azure.AI.Projects.ProjectsScheduleTask task = null, System.Collections.Generic.IDictionary tags = null, System.Collections.Generic.IDictionary properties = null, System.Collections.Generic.IReadOnlyDictionary systemData = null) { throw null; } public static Azure.AI.Projects.ProjectsScheduleTask ProjectsScheduleTask(string type = null, System.Collections.Generic.IDictionary configuration = null) { throw null; } public static Azure.AI.Projects.Evaluation.PromptBasedEvaluatorDefinition PromptBasedEvaluatorDefinition(System.BinaryData initParameters = null, System.BinaryData dataSchema = null, System.Collections.Generic.IDictionary metrics = null, string promptText = null) { throw null; } + public static Azure.AI.Projects.PromptDataGenerationJobSource PromptDataGenerationJobSource(string description = null, string prompt = null) { throw null; } + public static Azure.AI.Projects.PromptEvaluatorGenerationJobSource PromptEvaluatorGenerationJobSource(string description = null, string prompt = null) { throw null; } public static Azure.AI.Projects.Evaluation.RedTeam RedTeam(string name = null, string displayName = null, int? turnCount = default(int?), System.Collections.Generic.IEnumerable attackStrategies = null, bool? isSimulationOnly = default(bool?), System.Collections.Generic.IEnumerable riskCategories = null, string applicationScenario = null, System.Collections.Generic.IDictionary tags = null, System.Collections.Generic.IDictionary properties = null, string status = null, Azure.AI.Projects.Evaluation.TargetConfig target = null) { throw null; } public static Azure.AI.Projects.ResponseUsageInputTokensDetails ResponseUsageInputTokensDetails(long cachedTokens = (long)0) { throw null; } public static Azure.AI.Projects.ResponseUsageOutputTokensDetails ResponseUsageOutputTokensDetails(long reasoningTokens = (long)0) { throw null; } + public static Azure.AI.Projects.RoutineAction RoutineAction(string type = null) { throw null; } + public static Azure.AI.Projects.RoutineDispatchPayload RoutineDispatchPayload(string type = null) { throw null; } + public static Azure.AI.Projects.RoutineRun RoutineRun(string id = null, string status = null, Azure.AI.Projects.RoutineRunPhase? phase = default(Azure.AI.Projects.RoutineRunPhase?), Azure.AI.Projects.RoutineTriggerType triggerType = default(Azure.AI.Projects.RoutineTriggerType), Azure.AI.Projects.RoutineAttemptSource? attemptSource = default(Azure.AI.Projects.RoutineAttemptSource?), Azure.AI.Projects.RoutineActionType? actionType = default(Azure.AI.Projects.RoutineActionType?), System.DateTimeOffset? triggeredAt = default(System.DateTimeOffset?), System.DateTimeOffset startedAt = default(System.DateTimeOffset), System.DateTimeOffset? endedAt = default(System.DateTimeOffset?), string dispatchId = null, string actionCorrelationId = null, string responseId = null, string taskId = null, string errorType = null, string errorMessage = null, Azure.AI.Projects.RoutineRunDiagnostics diagnostics = null) { throw null; } + public static Azure.AI.Projects.RoutineRunDiagnostics RoutineRunDiagnostics(System.Collections.Generic.IDictionary parameters = null, System.Collections.Generic.IDictionary tags = null, System.Collections.Generic.IDictionary metrics = null) { throw null; } + public static Azure.AI.Projects.RoutineTrigger RoutineTrigger(string type = null) { throw null; } + public static Azure.AI.Projects.RubricBasedEvaluatorDefinition RubricBasedEvaluatorDefinition(System.BinaryData initParameters = null, System.BinaryData dataSchema = null, System.Collections.Generic.IDictionary metrics = null, System.Collections.Generic.IEnumerable dimensions = null, float? passThreshold = default(float?)) { throw null; } + public static Azure.AI.Projects.ScheduleRoutineTrigger ScheduleRoutineTrigger(string cronExpression = null, string timeZone = null) { throw null; } public static Azure.AI.Projects.Evaluation.ScheduleRun ScheduleRun(string runId = null, string scheduleId = null, bool success = false, System.DateTimeOffset? triggerTime = default(System.DateTimeOffset?), string error = null, System.Collections.Generic.IReadOnlyDictionary properties = null) { throw null; } + public static Azure.AI.Projects.SimpleQnADataGenerationJobOptions SimpleQnADataGenerationJobOptions(int maxSamples = 0, float? trainSplit = default(float?), Azure.AI.Projects.DataGenerationModelOptions modelOptions = null, System.Collections.Generic.IEnumerable questionTypes = null) { throw null; } public static Azure.AI.Projects.SystemDataV3 SystemDataV3(System.DateTimeOffset? createdAt = default(System.DateTimeOffset?), string createdBy = null, string createdByType = null, System.DateTimeOffset? lastModifiedAt = default(System.DateTimeOffset?)) { throw null; } public static Azure.AI.Projects.Evaluation.TargetConfig TargetConfig(string type = null) { throw null; } public static Azure.AI.Projects.Evaluation.TaxonomyCategory TaxonomyCategory(string id = null, string name = null, string description = null, Azure.AI.Projects.Evaluation.RiskCategory riskCategory = default(Azure.AI.Projects.Evaluation.RiskCategory), System.Collections.Generic.IEnumerable subCategories = null, System.Collections.Generic.IDictionary properties = null) { throw null; } public static Azure.AI.Projects.Evaluation.TaxonomySubCategory TaxonomySubCategory(string id = null, string name = null, string description = null, bool isEnabled = false, System.Collections.Generic.IDictionary properties = null) { throw null; } + public static Azure.AI.Projects.TimerRoutineTrigger TimerRoutineTrigger(string at = null, string timeZone = null) { throw null; } public static Azure.AI.Projects.ToolDescription ToolDescription(string name = null, string description = null) { throw null; } + public static Azure.AI.Projects.ToolUseFineTuningDataGenerationJobOptions ToolUseFineTuningDataGenerationJobOptions(int maxSamples = 0, float? trainSplit = default(float?), Azure.AI.Projects.DataGenerationModelOptions modelOptions = null) { throw null; } + public static Azure.AI.Projects.TracesDataGenerationJobOptions TracesDataGenerationJobOptions(int maxSamples = 0, float? trainSplit = default(float?), Azure.AI.Projects.DataGenerationModelOptions modelOptions = null) { throw null; } + public static Azure.AI.Projects.TracesDataGenerationJobSource TracesDataGenerationJobSource(string description = null, string agentId = null, string agentName = null, string agentVersion = null, System.DateTimeOffset startTime = default(System.DateTimeOffset), System.DateTimeOffset? endTime = default(System.DateTimeOffset?)) { throw null; } + public static Azure.AI.Projects.TracesEvaluatorGenerationJobSource TracesEvaluatorGenerationJobSource(string description = null, string agentId = null, string agentName = null, string agentVersion = null, System.DateTimeOffset startTime = default(System.DateTimeOffset), System.DateTimeOffset? endTime = default(System.DateTimeOffset?)) { throw null; } public static Azure.AI.Projects.Memory.UserProfileMemoryItem UserProfileMemoryItem(string memoryId = null, System.DateTimeOffset updatedAt = default(System.DateTimeOffset), string scope = null, string content = null) { throw null; } } public partial class AzureAISearchIndex : Azure.AI.Projects.AIProjectIndex, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel @@ -625,6 +744,201 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class DataGenerationJob : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataGenerationJob() { } + public System.DateTimeOffset CreatedAt { get { throw null; } } + public System.DateTimeOffset? FinishedAt { get { throw null; } } + public string Id { get { throw null; } } + public Azure.AI.Projects.DataGenerationJobInputs Inputs { get { throw null; } set { } } + public Azure.AI.Projects.DataGenerationJobResult Result { get { throw null; } } + public Azure.AI.Projects.JobStatus Status { get { throw null; } } + protected virtual Azure.AI.Projects.DataGenerationJob JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + public static explicit operator Azure.AI.Projects.DataGenerationJob (System.ClientModel.ClientResult result) { throw null; } + public static implicit operator System.ClientModel.BinaryContent (Azure.AI.Projects.DataGenerationJob dataGenerationJob) { throw null; } + protected virtual Azure.AI.Projects.DataGenerationJob PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.DataGenerationJob System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.DataGenerationJob System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataGenerationJobInputs : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataGenerationJobInputs(string name, System.Collections.Generic.IEnumerable sources, Azure.AI.Projects.DataGenerationJobOptions options, Azure.AI.Projects.DataGenerationJobScenario scenario) { } + public string Name { get { throw null; } set { } } + public Azure.AI.Projects.DataGenerationJobOptions Options { get { throw null; } set { } } + public Azure.AI.Projects.DataGenerationJobOutputOptions OutputOptions { get { throw null; } set { } } + public Azure.AI.Projects.DataGenerationJobScenario Scenario { get { throw null; } set { } } + public System.Collections.Generic.IList Sources { get { throw null; } } + protected virtual Azure.AI.Projects.DataGenerationJobInputs JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.DataGenerationJobInputs PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.DataGenerationJobInputs System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.DataGenerationJobInputs System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DataGenerationJobKind : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DataGenerationJobKind(string value) { throw null; } + public static Azure.AI.Projects.DataGenerationJobKind SimpleQna { get { throw null; } } + public static Azure.AI.Projects.DataGenerationJobKind ToolUse { get { throw null; } } + public static Azure.AI.Projects.DataGenerationJobKind Traces { get { throw null; } } + public bool Equals(Azure.AI.Projects.DataGenerationJobKind other) { throw null; } + public override bool Equals(object obj) { throw null; } + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.AI.Projects.DataGenerationJobKind left, Azure.AI.Projects.DataGenerationJobKind right) { throw null; } + public static implicit operator Azure.AI.Projects.DataGenerationJobKind (string value) { throw null; } + public static implicit operator Azure.AI.Projects.DataGenerationJobKind? (string value) { throw null; } + public static bool operator !=(Azure.AI.Projects.DataGenerationJobKind left, Azure.AI.Projects.DataGenerationJobKind right) { throw null; } + public override string ToString() { throw null; } + } + public abstract partial class DataGenerationJobOptions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DataGenerationJobOptions() { } + public int MaxSamples { get { throw null; } set { } } + public Azure.AI.Projects.DataGenerationModelOptions ModelOptions { get { throw null; } set { } } + public float? TrainSplit { get { throw null; } set { } } + protected virtual Azure.AI.Projects.DataGenerationJobOptions JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.DataGenerationJobOptions PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.DataGenerationJobOptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.DataGenerationJobOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public abstract partial class DataGenerationJobOutput : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DataGenerationJobOutput() { } + protected virtual Azure.AI.Projects.DataGenerationJobOutput JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.DataGenerationJobOutput PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.DataGenerationJobOutput System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.DataGenerationJobOutput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataGenerationJobOutputOptions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataGenerationJobOutputOptions() { } + public string Description { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual Azure.AI.Projects.DataGenerationJobOutputOptions JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.DataGenerationJobOutputOptions PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.DataGenerationJobOutputOptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.DataGenerationJobOutputOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataGenerationJobResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DataGenerationJobResult() { } + public int GeneratedSamples { get { throw null; } } + public System.Collections.Generic.IList Outputs { get { throw null; } } + public Azure.AI.Projects.DataGenerationTokenUsage TokenUsage { get { throw null; } } + protected virtual Azure.AI.Projects.DataGenerationJobResult JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.DataGenerationJobResult PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.DataGenerationJobResult System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.DataGenerationJobResult System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataGenerationJobs + { + protected DataGenerationJobs() { } + public System.ClientModel.Primitives.ClientPipeline Pipeline { get { throw null; } } + public virtual System.ClientModel.ClientResult CancelGenerationJob(string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CancelGenerationJobAsync(string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.ClientResult CreateGenerationJob(Azure.AI.Projects.DataGenerationJob job, string operationId = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateGenerationJobAsync(Azure.AI.Projects.DataGenerationJob job, string operationId = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual void DeleteGenerationJob(string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { } + public virtual System.Threading.Tasks.Task DeleteGenerationJobAsync(string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.ClientResult GetGenerationJob(string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetGenerationJobAsync(string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.CollectionResult GetGenerationJobs(int? limit = default(int?), Azure.AI.Projects.Memory.MemoryStoreListOrder? order = default(Azure.AI.Projects.Memory.MemoryStoreListOrder?), string after = null, string before = null, Azure.AI.Projects.DataGenerationJobScenario? scenario = default(Azure.AI.Projects.DataGenerationJobScenario?), System.Collections.Generic.IEnumerable kind = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.AsyncCollectionResult GetGenerationJobsAsync(int? limit = default(int?), Azure.AI.Projects.Memory.MemoryStoreListOrder? order = default(Azure.AI.Projects.Memory.MemoryStoreListOrder?), string after = null, string before = null, Azure.AI.Projects.DataGenerationJobScenario? scenario = default(Azure.AI.Projects.DataGenerationJobScenario?), System.Collections.Generic.IEnumerable kind = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct DataGenerationJobScenario : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public DataGenerationJobScenario(string value) { throw null; } + public static Azure.AI.Projects.DataGenerationJobScenario Evaluation { get { throw null; } } + public static Azure.AI.Projects.DataGenerationJobScenario ReinforcementFinetuning { get { throw null; } } + public static Azure.AI.Projects.DataGenerationJobScenario SupervisedFinetuning { get { throw null; } } + public bool Equals(Azure.AI.Projects.DataGenerationJobScenario other) { throw null; } + public override bool Equals(object obj) { throw null; } + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.AI.Projects.DataGenerationJobScenario left, Azure.AI.Projects.DataGenerationJobScenario right) { throw null; } + public static implicit operator Azure.AI.Projects.DataGenerationJobScenario (string value) { throw null; } + public static implicit operator Azure.AI.Projects.DataGenerationJobScenario? (string value) { throw null; } + public static bool operator !=(Azure.AI.Projects.DataGenerationJobScenario left, Azure.AI.Projects.DataGenerationJobScenario right) { throw null; } + public override string ToString() { throw null; } + } + public abstract partial class DataGenerationJobSource : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DataGenerationJobSource() { } + public virtual string Description { get { throw null; } set { } } + protected virtual Azure.AI.Projects.DataGenerationJobSource JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.DataGenerationJobSource PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.DataGenerationJobSource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.DataGenerationJobSource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataGenerationModelOptions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DataGenerationModelOptions(string model) { } + public string Model { get { throw null; } set { } } + protected virtual Azure.AI.Projects.DataGenerationModelOptions JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.DataGenerationModelOptions PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.DataGenerationModelOptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.DataGenerationModelOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DataGenerationTokenUsage : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DataGenerationTokenUsage() { } + public long CompletionTokens { get { throw null; } } + public long PromptTokens { get { throw null; } } + public long TotalTokens { get { throw null; } } + protected virtual Azure.AI.Projects.DataGenerationTokenUsage JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.DataGenerationTokenUsage PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.DataGenerationTokenUsage System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.DataGenerationTokenUsage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class DatasetCredential : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal DatasetCredential() { } @@ -640,12 +954,76 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class DatasetDataGenerationJobOutput : Azure.AI.Projects.DataGenerationJobOutput, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DatasetDataGenerationJobOutput() { } + public string Description { get { throw null; } } + public string Id { get { throw null; } } + public string Name { get { throw null; } } + public System.Collections.Generic.IReadOnlyDictionary Tags { get { throw null; } } + public string Version { get { throw null; } } + protected override Azure.AI.Projects.DataGenerationJobOutput JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.DataGenerationJobOutput PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.DatasetDataGenerationJobOutput System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.DatasetDataGenerationJobOutput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DatasetDataGenerationJobSource : Azure.AI.Projects.DataGenerationJobSource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DatasetDataGenerationJobSource(string name) { } + public override string Description { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public string Version { get { throw null; } set { } } + protected override Azure.AI.Projects.DataGenerationJobSource JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.DataGenerationJobSource PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.DatasetDataGenerationJobSource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.DatasetDataGenerationJobSource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DatasetEvaluatorGenerationJobSource : Azure.AI.Projects.EvaluatorGenerationJobSource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public DatasetEvaluatorGenerationJobSource(string name) { } + public string Description { get { throw null; } set { } } + public string Name { get { throw null; } set { } } + public string Version { get { throw null; } set { } } + protected override Azure.AI.Projects.EvaluatorGenerationJobSource JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.EvaluatorGenerationJobSource PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.DatasetEvaluatorGenerationJobSource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.DatasetEvaluatorGenerationJobSource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class DatasetReference : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DatasetReference() { } + public string Name { get { throw null; } } + public string Version { get { throw null; } } + protected virtual Azure.AI.Projects.DatasetReference JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.DatasetReference PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.DatasetReference System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.DatasetReference System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class DeleteMemoryResponse : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal DeleteMemoryResponse() { } public bool Deleted { get { throw null; } } public string MemoryId { get { throw null; } } - public string Name { get { throw null; } } public Azure.AI.Projects.Memory.MemoryStoreObjectType Object { get { throw null; } } protected virtual Azure.AI.Projects.DeleteMemoryResponse JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -658,6 +1036,23 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class DispatchRoutineResponse : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal DispatchRoutineResponse() { } + public string ActionCorrelationId { get { throw null; } } + public string DispatchId { get { throw null; } } + public string TaskId { get { throw null; } } + protected virtual Azure.AI.Projects.DispatchRoutineResponse JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + public static explicit operator Azure.AI.Projects.DispatchRoutineResponse (System.ClientModel.ClientResult result) { throw null; } + protected virtual Azure.AI.Projects.DispatchRoutineResponse PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.DispatchRoutineResponse System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.DispatchRoutineResponse System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class EmbeddingConfiguration : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public EmbeddingConfiguration(string modelDeploymentName, string embeddingField) { } @@ -690,6 +1085,120 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.AI.Projects.EvaluationRuleActionType left, Azure.AI.Projects.EvaluationRuleActionType right) { throw null; } public override string ToString() { throw null; } } + public partial class EvaluatorCredentialRequest : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EvaluatorCredentialRequest(System.Uri blobUri) { } + public System.Uri BlobUri { get { throw null; } } + protected virtual Azure.AI.Projects.EvaluatorCredentialRequest JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + public static implicit operator System.ClientModel.BinaryContent (Azure.AI.Projects.EvaluatorCredentialRequest evaluatorCredentialRequest) { throw null; } + protected virtual Azure.AI.Projects.EvaluatorCredentialRequest PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.EvaluatorCredentialRequest System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.EvaluatorCredentialRequest System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EvaluatorGenerationArtifacts : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EvaluatorGenerationArtifacts() { } + public Azure.AI.Projects.DatasetReference Dataset { get { throw null; } } + public System.Collections.Generic.IList Kinds { get { throw null; } } + protected virtual Azure.AI.Projects.EvaluatorGenerationArtifacts JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.EvaluatorGenerationArtifacts PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.EvaluatorGenerationArtifacts System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.EvaluatorGenerationArtifacts System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EvaluatorGenerationInputs : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EvaluatorGenerationInputs(System.Collections.Generic.IEnumerable sources, string model, string evaluatorName) { } + public string EvaluatorDescription { get { throw null; } set { } } + public string EvaluatorDisplayName { get { throw null; } set { } } + public string EvaluatorName { get { throw null; } set { } } + public string Model { get { throw null; } set { } } + public System.Collections.Generic.IList Sources { get { throw null; } } + protected virtual Azure.AI.Projects.EvaluatorGenerationInputs JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.EvaluatorGenerationInputs PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.EvaluatorGenerationInputs System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.EvaluatorGenerationInputs System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EvaluatorGenerationJob : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EvaluatorGenerationJob() { } + public System.DateTimeOffset CreatedAt { get { throw null; } } + public System.DateTimeOffset? FinishedAt { get { throw null; } } + public string Id { get { throw null; } } + public Azure.AI.Projects.EvaluatorGenerationInputs Inputs { get { throw null; } set { } } + public Azure.AI.Projects.Evaluation.EvaluatorVersion Result { get { throw null; } } + public Azure.AI.Projects.JobStatus Status { get { throw null; } } + public Azure.AI.Projects.EvaluatorGenerationTokenUsage Usage { get { throw null; } } + protected virtual Azure.AI.Projects.EvaluatorGenerationJob JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + public static explicit operator Azure.AI.Projects.EvaluatorGenerationJob (System.ClientModel.ClientResult result) { throw null; } + public static implicit operator System.ClientModel.BinaryContent (Azure.AI.Projects.EvaluatorGenerationJob evaluatorGenerationJob) { throw null; } + protected virtual Azure.AI.Projects.EvaluatorGenerationJob PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.EvaluatorGenerationJob System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.EvaluatorGenerationJob System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EvaluatorGenerationJobs + { + protected EvaluatorGenerationJobs() { } + public System.ClientModel.Primitives.ClientPipeline Pipeline { get { throw null; } } + public virtual System.ClientModel.ClientResult Cancel(string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CancelAsync(string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.ClientResult Create(Azure.AI.Projects.EvaluatorGenerationJob job, string operationId = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> CreateAsync(Azure.AI.Projects.EvaluatorGenerationJob job, string operationId = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual void Delete(string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { } + public virtual System.Threading.Tasks.Task DeleteAsync(string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.ClientResult Get(string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.CollectionResult GetAll(int? limit = default(int?), Azure.AI.Projects.Memory.MemoryStoreListOrder? order = default(Azure.AI.Projects.Memory.MemoryStoreListOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.AsyncCollectionResult GetAllAsync(int? limit = default(int?), Azure.AI.Projects.Memory.MemoryStoreListOrder? order = default(Azure.AI.Projects.Memory.MemoryStoreListOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> GetAsync(string jobId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + } + public abstract partial class EvaluatorGenerationJobSource : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EvaluatorGenerationJobSource() { } + protected virtual Azure.AI.Projects.EvaluatorGenerationJobSource JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.EvaluatorGenerationJobSource PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.EvaluatorGenerationJobSource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.EvaluatorGenerationJobSource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class EvaluatorGenerationTokenUsage : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal EvaluatorGenerationTokenUsage() { } + public long InputTokens { get { throw null; } } + public long OutputTokens { get { throw null; } } + public long TotalTokens { get { throw null; } } + protected virtual Azure.AI.Projects.EvaluatorGenerationTokenUsage JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.EvaluatorGenerationTokenUsage PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.EvaluatorGenerationTokenUsage System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.EvaluatorGenerationTokenUsage System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct EvaluatorType : System.IEquatable { @@ -707,6 +1216,35 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.AI.Projects.EvaluatorType left, Azure.AI.Projects.EvaluatorType right) { throw null; } public override string ToString() { throw null; } } + public partial class FileDataGenerationJobOutput : Azure.AI.Projects.DataGenerationJobOutput, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal FileDataGenerationJobOutput() { } + public string Filename { get { throw null; } } + public string Id { get { throw null; } } + protected override Azure.AI.Projects.DataGenerationJobOutput JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.DataGenerationJobOutput PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.FileDataGenerationJobOutput System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.FileDataGenerationJobOutput System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class FileDataGenerationJobSource : Azure.AI.Projects.DataGenerationJobSource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public FileDataGenerationJobSource(string id) { } + public string Id { get { throw null; } set { } } + protected override Azure.AI.Projects.DataGenerationJobSource JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.DataGenerationJobSource PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.FileDataGenerationJobSource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.FileDataGenerationJobSource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class FileDataset : Azure.AI.Projects.AIProjectDataset, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public FileDataset(System.Uri dataUri) { } @@ -740,7 +1278,7 @@ public enum FoundryFeaturesOptInKeys RedTeamsV1Preview = 2, InsightsV1Preview = 3, MemoryStoresV1Preview = 4, - ToolboxesV1Preview = 5, + RoutinesV1Preview = 5, SkillsV1Preview = 6, DataGenerationJobsV1Preview = 7, ModelsV1Preview = 8, @@ -851,6 +1389,22 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.AI.Projects.FoundryModelWeightType left, Azure.AI.Projects.FoundryModelWeightType right) { throw null; } public override string ToString() { throw null; } } + public partial class GitHubIssueOpenedRoutineTrigger : Azure.AI.Projects.RoutineTrigger, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public GitHubIssueOpenedRoutineTrigger(string connectionId, string assignee, string repository) { } + public string Assignee { get { throw null; } set { } } + public string ConnectionId { get { throw null; } set { } } + public string Repository { get { throw null; } set { } } + protected override Azure.AI.Projects.RoutineTrigger JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.RoutineTrigger PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.GitHubIssueOpenedRoutineTrigger System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.GitHubIssueOpenedRoutineTrigger System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class InputFileContentParam : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public InputFileContentParam() { } @@ -882,6 +1436,85 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class InvokeAgentInvocationsApiDispatchPayload : Azure.AI.Projects.RoutineDispatchPayload, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public InvokeAgentInvocationsApiDispatchPayload() { } + public string Input { get { throw null; } set { } } + protected override Azure.AI.Projects.RoutineDispatchPayload JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.RoutineDispatchPayload PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.InvokeAgentInvocationsApiDispatchPayload System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.InvokeAgentInvocationsApiDispatchPayload System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class InvokeAgentInvocationsApiRoutineAction : Azure.AI.Projects.RoutineAction, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public InvokeAgentInvocationsApiRoutineAction(string agentEndpointId) { } + public string AgentEndpointId { get { throw null; } set { } } + public string SessionId { get { throw null; } set { } } + protected override Azure.AI.Projects.RoutineAction JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.RoutineAction PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.InvokeAgentInvocationsApiRoutineAction System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.InvokeAgentInvocationsApiRoutineAction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class InvokeAgentResponsesApiDispatchPayload : Azure.AI.Projects.RoutineDispatchPayload, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public InvokeAgentResponsesApiDispatchPayload() { } + public string Input { get { throw null; } set { } } + protected override Azure.AI.Projects.RoutineDispatchPayload JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.RoutineDispatchPayload PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.InvokeAgentResponsesApiDispatchPayload System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.InvokeAgentResponsesApiDispatchPayload System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class InvokeAgentResponsesApiRoutineAction : Azure.AI.Projects.RoutineAction, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public InvokeAgentResponsesApiRoutineAction() { } + public string AgentEndpointId { get { throw null; } set { } } + public string AgentName { get { throw null; } set { } } + public string ConversationId { get { throw null; } set { } } + protected override Azure.AI.Projects.RoutineAction JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.RoutineAction PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.InvokeAgentResponsesApiRoutineAction System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.InvokeAgentResponsesApiRoutineAction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct JobStatus : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public JobStatus(string value) { throw null; } + public static Azure.AI.Projects.JobStatus Cancelled { get { throw null; } } + public static Azure.AI.Projects.JobStatus Failed { get { throw null; } } + public static Azure.AI.Projects.JobStatus InProgress { get { throw null; } } + public static Azure.AI.Projects.JobStatus Queued { get { throw null; } } + public static Azure.AI.Projects.JobStatus Succeeded { get { throw null; } } + public bool Equals(Azure.AI.Projects.JobStatus other) { throw null; } + public override bool Equals(object obj) { throw null; } + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.AI.Projects.JobStatus left, Azure.AI.Projects.JobStatus right) { throw null; } + public static implicit operator Azure.AI.Projects.JobStatus (string value) { throw null; } + public static implicit operator Azure.AI.Projects.JobStatus? (string value) { throw null; } + public static bool operator !=(Azure.AI.Projects.JobStatus left, Azure.AI.Projects.JobStatus right) { throw null; } + public override string ToString() { throw null; } + } public partial class LoraConfig : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public LoraConfig() { } @@ -1108,6 +1741,19 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static bool operator !=(Azure.AI.Projects.PendingUploadType left, Azure.AI.Projects.PendingUploadType right) { throw null; } public override string ToString() { throw null; } } + public partial class ProceduralMemoryItem : Azure.AI.Projects.Memory.MemoryItem, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ProceduralMemoryItem() { } + protected override Azure.AI.Projects.Memory.MemoryItem JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.Memory.MemoryItem PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.ProceduralMemoryItem System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.ProceduralMemoryItem System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ProjectSchedules { protected ProjectSchedules() { } @@ -1137,6 +1783,27 @@ protected ProjectSchedules() { } public virtual System.ClientModel.AsyncCollectionResult GetRunsAsync(string id, Azure.AI.Projects.Evaluation.ScheduleTaskType? type = default(Azure.AI.Projects.Evaluation.ScheduleTaskType?), bool? enabled = default(bool?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.ClientModel.Primitives.AsyncCollectionResult GetRunsAsync(string id, string type, bool? enabled, System.ClientModel.Primitives.RequestOptions options) { throw null; } } + public partial class ProjectsRoutine : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal ProjectsRoutine() { } + public Azure.AI.Projects.RoutineAction Action { get { throw null; } } + public System.DateTimeOffset? CreatedAt { get { throw null; } } + public string Description { get { throw null; } } + public bool Enabled { get { throw null; } } + public string Name { get { throw null; } } + public System.Collections.Generic.IDictionary Triggers { get { throw null; } } + public System.DateTimeOffset? UpdatedAt { get { throw null; } } + protected virtual Azure.AI.Projects.ProjectsRoutine JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + public static explicit operator Azure.AI.Projects.ProjectsRoutine (System.ClientModel.ClientResult result) { throw null; } + protected virtual Azure.AI.Projects.ProjectsRoutine PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.ProjectsRoutine System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.ProjectsRoutine System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public abstract partial class ProjectsScheduleTask : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ProjectsScheduleTask() { } @@ -1151,6 +1818,36 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class PromptDataGenerationJobSource : Azure.AI.Projects.DataGenerationJobSource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PromptDataGenerationJobSource(string prompt) { } + public override string Description { get { throw null; } set { } } + public string Prompt { get { throw null; } set { } } + protected override Azure.AI.Projects.DataGenerationJobSource JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.DataGenerationJobSource PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.PromptDataGenerationJobSource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.PromptDataGenerationJobSource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class PromptEvaluatorGenerationJobSource : Azure.AI.Projects.EvaluatorGenerationJobSource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public PromptEvaluatorGenerationJobSource(string prompt) { } + public string Description { get { throw null; } set { } } + public string Prompt { get { throw null; } set { } } + protected override Azure.AI.Projects.EvaluatorGenerationJobSource JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.EvaluatorGenerationJobSource PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.PromptEvaluatorGenerationJobSource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.PromptEvaluatorGenerationJobSource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ResponseUsageInputTokensDetails : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal ResponseUsageInputTokensDetails() { } @@ -1179,6 +1876,225 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public abstract partial class RoutineAction : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal RoutineAction() { } + protected virtual Azure.AI.Projects.RoutineAction JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.RoutineAction PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.RoutineAction System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.RoutineAction System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct RoutineActionType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public RoutineActionType(string value) { throw null; } + public static Azure.AI.Projects.RoutineActionType InvokeAgentInvocationsApi { get { throw null; } } + public static Azure.AI.Projects.RoutineActionType InvokeAgentResponsesApi { get { throw null; } } + public bool Equals(Azure.AI.Projects.RoutineActionType other) { throw null; } + public override bool Equals(object obj) { throw null; } + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.AI.Projects.RoutineActionType left, Azure.AI.Projects.RoutineActionType right) { throw null; } + public static implicit operator Azure.AI.Projects.RoutineActionType (string value) { throw null; } + public static implicit operator Azure.AI.Projects.RoutineActionType? (string value) { throw null; } + public static bool operator !=(Azure.AI.Projects.RoutineActionType left, Azure.AI.Projects.RoutineActionType right) { throw null; } + public override string ToString() { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct RoutineAttemptSource : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public RoutineAttemptSource(string value) { throw null; } + public static Azure.AI.Projects.RoutineAttemptSource EventFire { get { throw null; } } + public static Azure.AI.Projects.RoutineAttemptSource ManualDispatch { get { throw null; } } + public static Azure.AI.Projects.RoutineAttemptSource QueuedDispatch { get { throw null; } } + public static Azure.AI.Projects.RoutineAttemptSource ScheduleDelivery { get { throw null; } } + public static Azure.AI.Projects.RoutineAttemptSource TimerDelivery { get { throw null; } } + public bool Equals(Azure.AI.Projects.RoutineAttemptSource other) { throw null; } + public override bool Equals(object obj) { throw null; } + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.AI.Projects.RoutineAttemptSource left, Azure.AI.Projects.RoutineAttemptSource right) { throw null; } + public static implicit operator Azure.AI.Projects.RoutineAttemptSource (string value) { throw null; } + public static implicit operator Azure.AI.Projects.RoutineAttemptSource? (string value) { throw null; } + public static bool operator !=(Azure.AI.Projects.RoutineAttemptSource left, Azure.AI.Projects.RoutineAttemptSource right) { throw null; } + public override string ToString() { throw null; } + } + public abstract partial class RoutineDispatchPayload : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal RoutineDispatchPayload() { } + protected virtual Azure.AI.Projects.RoutineDispatchPayload JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.RoutineDispatchPayload PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.RoutineDispatchPayload System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.RoutineDispatchPayload System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class RoutineRun : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal RoutineRun() { } + public string ActionCorrelationId { get { throw null; } } + public Azure.AI.Projects.RoutineActionType? ActionType { get { throw null; } } + public Azure.AI.Projects.RoutineAttemptSource? AttemptSource { get { throw null; } } + public Azure.AI.Projects.RoutineRunDiagnostics Diagnostics { get { throw null; } } + public string DispatchId { get { throw null; } } + public System.DateTimeOffset? EndedAt { get { throw null; } } + public string ErrorMessage { get { throw null; } } + public string ErrorType { get { throw null; } } + public string Id { get { throw null; } } + public Azure.AI.Projects.RoutineRunPhase? Phase { get { throw null; } } + public string ResponseId { get { throw null; } } + public System.DateTimeOffset StartedAt { get { throw null; } } + public string Status { get { throw null; } } + public string TaskId { get { throw null; } } + public System.DateTimeOffset? TriggeredAt { get { throw null; } } + public Azure.AI.Projects.RoutineTriggerType TriggerType { get { throw null; } } + protected virtual Azure.AI.Projects.RoutineRun JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.RoutineRun PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.RoutineRun System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.RoutineRun System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class RoutineRunDiagnostics : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal RoutineRunDiagnostics() { } + public System.Collections.Generic.IDictionary Metrics { get { throw null; } } + public System.Collections.Generic.IDictionary Parameters { get { throw null; } } + public System.Collections.Generic.IDictionary Tags { get { throw null; } } + protected virtual Azure.AI.Projects.RoutineRunDiagnostics JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.RoutineRunDiagnostics PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.RoutineRunDiagnostics System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.RoutineRunDiagnostics System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct RoutineRunPhase : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public RoutineRunPhase(string value) { throw null; } + public static Azure.AI.Projects.RoutineRunPhase Completed { get { throw null; } } + public static Azure.AI.Projects.RoutineRunPhase Dispatching { get { throw null; } } + public static Azure.AI.Projects.RoutineRunPhase Failed { get { throw null; } } + public static Azure.AI.Projects.RoutineRunPhase Queued { get { throw null; } } + public bool Equals(Azure.AI.Projects.RoutineRunPhase other) { throw null; } + public override bool Equals(object obj) { throw null; } + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.AI.Projects.RoutineRunPhase left, Azure.AI.Projects.RoutineRunPhase right) { throw null; } + public static implicit operator Azure.AI.Projects.RoutineRunPhase (string value) { throw null; } + public static implicit operator Azure.AI.Projects.RoutineRunPhase? (string value) { throw null; } + public static bool operator !=(Azure.AI.Projects.RoutineRunPhase left, Azure.AI.Projects.RoutineRunPhase right) { throw null; } + public override string ToString() { throw null; } + } + public abstract partial class RoutineTrigger : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + internal RoutineTrigger() { } + protected virtual Azure.AI.Projects.RoutineTrigger JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.RoutineTrigger PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.RoutineTrigger System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.RoutineTrigger System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct RoutineTriggerType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public RoutineTriggerType(string value) { throw null; } + public static Azure.AI.Projects.RoutineTriggerType GithubIssueOpened { get { throw null; } } + public static Azure.AI.Projects.RoutineTriggerType Schedule { get { throw null; } } + public static Azure.AI.Projects.RoutineTriggerType Timer { get { throw null; } } + public bool Equals(Azure.AI.Projects.RoutineTriggerType other) { throw null; } + public override bool Equals(object obj) { throw null; } + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.AI.Projects.RoutineTriggerType left, Azure.AI.Projects.RoutineTriggerType right) { throw null; } + public static implicit operator Azure.AI.Projects.RoutineTriggerType (string value) { throw null; } + public static implicit operator Azure.AI.Projects.RoutineTriggerType? (string value) { throw null; } + public static bool operator !=(Azure.AI.Projects.RoutineTriggerType left, Azure.AI.Projects.RoutineTriggerType right) { throw null; } + public override string ToString() { throw null; } + } + public partial class RubricBasedEvaluatorDefinition : Azure.AI.Projects.Evaluation.EvaluatorDefinition, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public RubricBasedEvaluatorDefinition(System.Collections.Generic.IEnumerable dimensions) { } + public System.Collections.Generic.IList Dimensions { get { throw null; } } + public float? PassThreshold { get { throw null; } set { } } + protected override Azure.AI.Projects.Evaluation.EvaluatorDefinition JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.Evaluation.EvaluatorDefinition PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.RubricBasedEvaluatorDefinition System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.RubricBasedEvaluatorDefinition System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class ScheduleRoutineTrigger : Azure.AI.Projects.RoutineTrigger, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ScheduleRoutineTrigger(string cronExpression, string timeZone) { } + public string CronExpression { get { throw null; } set { } } + public string TimeZone { get { throw null; } set { } } + protected override Azure.AI.Projects.RoutineTrigger JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.RoutineTrigger PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.ScheduleRoutineTrigger System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.ScheduleRoutineTrigger System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class SimpleQnADataGenerationJobOptions : Azure.AI.Projects.DataGenerationJobOptions, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public SimpleQnADataGenerationJobOptions(int maxSamples) { } + public System.Collections.Generic.IList QuestionTypes { get { throw null; } } + protected override Azure.AI.Projects.DataGenerationJobOptions JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.DataGenerationJobOptions PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.SimpleQnADataGenerationJobOptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.SimpleQnADataGenerationJobOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] + public readonly partial struct SimpleQnAFineTuningQuestionType : System.IEquatable + { + private readonly object _dummy; + private readonly int _dummyPrimitive; + public SimpleQnAFineTuningQuestionType(string value) { throw null; } + public static Azure.AI.Projects.SimpleQnAFineTuningQuestionType LongAnswer { get { throw null; } } + public static Azure.AI.Projects.SimpleQnAFineTuningQuestionType ShortAnswer { get { throw null; } } + public bool Equals(Azure.AI.Projects.SimpleQnAFineTuningQuestionType other) { throw null; } + public override bool Equals(object obj) { throw null; } + public override int GetHashCode() { throw null; } + public static bool operator ==(Azure.AI.Projects.SimpleQnAFineTuningQuestionType left, Azure.AI.Projects.SimpleQnAFineTuningQuestionType right) { throw null; } + public static implicit operator Azure.AI.Projects.SimpleQnAFineTuningQuestionType (string value) { throw null; } + public static implicit operator Azure.AI.Projects.SimpleQnAFineTuningQuestionType? (string value) { throw null; } + public static bool operator !=(Azure.AI.Projects.SimpleQnAFineTuningQuestionType left, Azure.AI.Projects.SimpleQnAFineTuningQuestionType right) { throw null; } + public override string ToString() { throw null; } + } public partial class SystemDataV3 : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal SystemDataV3() { } @@ -1196,6 +2112,21 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class TimerRoutineTrigger : Azure.AI.Projects.RoutineTrigger, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public TimerRoutineTrigger(string at) { } + public string At { get { throw null; } set { } } + public string TimeZone { get { throw null; } set { } } + protected override Azure.AI.Projects.RoutineTrigger JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.RoutineTrigger PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.TimerRoutineTrigger System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.TimerRoutineTrigger System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class ToolDescription : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public ToolDescription() { } @@ -1211,6 +2142,70 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class ToolUseFineTuningDataGenerationJobOptions : Azure.AI.Projects.DataGenerationJobOptions, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ToolUseFineTuningDataGenerationJobOptions(int maxSamples) { } + protected override Azure.AI.Projects.DataGenerationJobOptions JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.DataGenerationJobOptions PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.ToolUseFineTuningDataGenerationJobOptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.ToolUseFineTuningDataGenerationJobOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TracesDataGenerationJobOptions : Azure.AI.Projects.DataGenerationJobOptions, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public TracesDataGenerationJobOptions(int maxSamples) { } + protected override Azure.AI.Projects.DataGenerationJobOptions JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.DataGenerationJobOptions PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.TracesDataGenerationJobOptions System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.TracesDataGenerationJobOptions System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TracesDataGenerationJobSource : Azure.AI.Projects.DataGenerationJobSource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public TracesDataGenerationJobSource(System.DateTimeOffset startTime) { } + public string AgentId { get { throw null; } set { } } + public string AgentName { get { throw null; } set { } } + public string AgentVersion { get { throw null; } set { } } + public override string Description { get { throw null; } set { } } + public System.DateTimeOffset? EndTime { get { throw null; } set { } } + public System.DateTimeOffset StartTime { get { throw null; } set { } } + protected override Azure.AI.Projects.DataGenerationJobSource JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.DataGenerationJobSource PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.TracesDataGenerationJobSource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.TracesDataGenerationJobSource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } + public partial class TracesEvaluatorGenerationJobSource : Azure.AI.Projects.EvaluatorGenerationJobSource, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public TracesEvaluatorGenerationJobSource(System.DateTimeOffset startTime) { } + public string AgentId { get { throw null; } set { } } + public string AgentName { get { throw null; } set { } } + public string AgentVersion { get { throw null; } set { } } + public string Description { get { throw null; } set { } } + public System.DateTimeOffset? EndTime { get { throw null; } set { } } + public System.DateTimeOffset StartTime { get { throw null; } set { } } + protected override Azure.AI.Projects.EvaluatorGenerationJobSource JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected override Azure.AI.Projects.EvaluatorGenerationJobSource PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected override System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.TracesEvaluatorGenerationJobSource System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.TracesEvaluatorGenerationJobSource System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public readonly partial struct TreatmentEffectType : System.IEquatable { @@ -1326,6 +2321,7 @@ public partial class AzureAIAgentTarget : Azure.AI.Projects.Evaluation.Evaluatio public AzureAIAgentTarget(string name) { } public string Name { get { throw null; } set { } } public System.Collections.Generic.IList ToolDescriptions { get { throw null; } } + public System.Collections.Generic.IList Tools { get { throw null; } } public string Version { get { throw null; } set { } } protected override Azure.AI.Projects.Evaluation.EvaluationTarget JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } @@ -1727,6 +2723,23 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class EvaluationsDimension : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public EvaluationsDimension(string id, string description, int weight) { } + public bool? AlwaysApplicable { get { throw null; } set { } } + public string Description { get { throw null; } set { } } + public string Id { get { throw null; } set { } } + public int Weight { get { throw null; } set { } } + protected virtual Azure.AI.Projects.Evaluation.EvaluationsDimension JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + protected virtual Azure.AI.Projects.Evaluation.EvaluationsDimension PersistableModelCreateCore(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + protected virtual System.BinaryData PersistableModelWriteCore(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + Azure.AI.Projects.Evaluation.EvaluationsDimension System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.AI.Projects.Evaluation.EvaluationsDimension System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public abstract partial class EvaluationTarget : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal EvaluationTarget() { } @@ -1843,6 +2856,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer public static Azure.AI.Projects.Evaluation.EvaluatorDefinitionType OpenaiGraders { get { throw null; } } public static Azure.AI.Projects.Evaluation.EvaluatorDefinitionType Prompt { get { throw null; } } public static Azure.AI.Projects.Evaluation.EvaluatorDefinitionType PromptAndCode { get { throw null; } } + public static Azure.AI.Projects.Evaluation.EvaluatorDefinitionType Rubric { get { throw null; } } public static Azure.AI.Projects.Evaluation.EvaluatorDefinitionType Service { get { throw null; } } public bool Equals(Azure.AI.Projects.Evaluation.EvaluatorDefinitionType other) { throw null; } public override bool Equals(object obj) { throw null; } @@ -1918,6 +2932,7 @@ public EvaluatorVersion(Azure.AI.Projects.EvaluatorType evaluatorType, System.Co public string Description { get { throw null; } set { } } public string DisplayName { get { throw null; } set { } } public Azure.AI.Projects.EvaluatorType EvaluatorType { get { throw null; } set { } } + public Azure.AI.Projects.EvaluatorGenerationArtifacts GenerationArtifacts { get { throw null; } } public string Id { get { throw null; } } public System.Collections.Generic.IDictionary Metadata { get { throw null; } } public string ModifiedAt { get { throw null; } } @@ -2202,6 +3217,10 @@ protected ProjectEvaluators() { } public virtual System.ClientModel.ClientResult DeleteVersion(string name, string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteVersionAsync(string name, string version, System.ClientModel.Primitives.RequestOptions options) { throw null; } public virtual System.Threading.Tasks.Task DeleteVersionAsync(string name, string version, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.ClientResult GetCredentials(string name, string version, Azure.AI.Projects.EvaluatorCredentialRequest credentialRequest, Azure.AI.Projects.FoundryFeaturesOptInKeys? foundryFeatures = default(Azure.AI.Projects.FoundryFeaturesOptInKeys?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.ClientResult GetCredentials(string name, string version, System.ClientModel.BinaryContent content, string foundryFeatures = null, System.ClientModel.Primitives.RequestOptions options = null) { throw null; } + public virtual System.Threading.Tasks.Task> GetCredentialsAsync(string name, string version, Azure.AI.Projects.EvaluatorCredentialRequest credentialRequest, Azure.AI.Projects.FoundryFeaturesOptInKeys? foundryFeatures = default(Azure.AI.Projects.FoundryFeaturesOptInKeys?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task GetCredentialsAsync(string name, string version, System.ClientModel.BinaryContent content, string foundryFeatures = null, System.ClientModel.Primitives.RequestOptions options = null) { throw null; } public virtual System.ClientModel.CollectionResult GetLatestVersions(Azure.AI.Projects.Evaluation.ListVersionsRequestType? type = default(Azure.AI.Projects.Evaluation.ListVersionsRequestType?), int? limit = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.ClientModel.Primitives.CollectionResult GetLatestVersions(string type, int? limit, System.ClientModel.Primitives.RequestOptions options) { throw null; } public virtual System.ClientModel.AsyncCollectionResult GetLatestVersionsAsync(Azure.AI.Projects.Evaluation.ListVersionsRequestType? type = default(Azure.AI.Projects.Evaluation.ListVersionsRequestType?), int? limit = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } @@ -2214,6 +3233,10 @@ protected ProjectEvaluators() { } public virtual System.ClientModel.Primitives.CollectionResult GetVersions(string name, string type, int? limit, System.ClientModel.Primitives.RequestOptions options) { throw null; } public virtual System.ClientModel.AsyncCollectionResult GetVersionsAsync(string name, Azure.AI.Projects.Evaluation.ListVersionsRequestType? type = default(Azure.AI.Projects.Evaluation.ListVersionsRequestType?), int? limit = default(int?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.ClientModel.Primitives.AsyncCollectionResult GetVersionsAsync(string name, string type, int? limit, System.ClientModel.Primitives.RequestOptions options) { throw null; } + public virtual System.ClientModel.ClientResult StartPendingUpload(string name, string version, Azure.AI.Projects.PendingUploadConfiguration pendingUploadRequest, Azure.AI.Projects.FoundryFeaturesOptInKeys? foundryFeatures = default(Azure.AI.Projects.FoundryFeaturesOptInKeys?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.ClientResult StartPendingUpload(string name, string version, System.ClientModel.BinaryContent content, string foundryFeatures = null, System.ClientModel.Primitives.RequestOptions options = null) { throw null; } + public virtual System.Threading.Tasks.Task> StartPendingUploadAsync(string name, string version, Azure.AI.Projects.PendingUploadConfiguration pendingUploadRequest, Azure.AI.Projects.FoundryFeaturesOptInKeys? foundryFeatures = default(Azure.AI.Projects.FoundryFeaturesOptInKeys?), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task StartPendingUploadAsync(string name, string version, System.ClientModel.BinaryContent content, string foundryFeatures = null, System.ClientModel.Primitives.RequestOptions options = null) { throw null; } public virtual System.ClientModel.ClientResult UpdateVersion(string name, string version, System.ClientModel.BinaryContent content, System.ClientModel.Primitives.RequestOptions options = null) { throw null; } public virtual System.Threading.Tasks.Task UpdateVersionAsync(string name, string version, System.ClientModel.BinaryContent content, System.ClientModel.Primitives.RequestOptions options = null) { throw null; } } @@ -2561,10 +3584,9 @@ protected AIProjectMemoryStores() { } public virtual System.ClientModel.ClientResult DeleteScope(string name, string scope, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task DeleteScopeAsync(string name, System.ClientModel.BinaryContent content, System.ClientModel.Primitives.RequestOptions options = null) { throw null; } public virtual System.Threading.Tasks.Task> DeleteScopeAsync(string name, string scope, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.ClientModel.CollectionResult GetMemories(string name, int? limit = default(int?), Azure.AI.Projects.Memory.MemoryStoreListOrder? order = default(Azure.AI.Projects.Memory.MemoryStoreListOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.ClientModel.Primitives.CollectionResult GetMemories(string name, int? limit, string order, string after, string before, System.ClientModel.Primitives.RequestOptions options) { throw null; } - public virtual System.ClientModel.AsyncCollectionResult GetMemoriesAsync(string name, int? limit = default(int?), Azure.AI.Projects.Memory.MemoryStoreListOrder? order = default(Azure.AI.Projects.Memory.MemoryStoreListOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.ClientModel.Primitives.AsyncCollectionResult GetMemoriesAsync(string name, int? limit, string order, string after, string before, System.ClientModel.Primitives.RequestOptions options) { throw null; } + public virtual System.ClientModel.CollectionResult GetMemories(string name, string scope, Azure.AI.Projects.Memory.MemoryItemKind? kind = default(Azure.AI.Projects.Memory.MemoryItemKind?), int? limit = default(int?), Azure.AI.Projects.Memory.MemoryStoreListOrder? order = default(Azure.AI.Projects.Memory.MemoryStoreListOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.ClientModel.Primitives.AsyncCollectionResult GetMemoriesAsync(string name, System.ClientModel.BinaryContent content, string kind = null, int? limit = default(int?), string order = null, string after = null, string before = null, System.ClientModel.Primitives.RequestOptions options = null) { throw null; } + public virtual System.ClientModel.AsyncCollectionResult GetMemoriesAsync(string name, string scope, Azure.AI.Projects.Memory.MemoryItemKind? kind = default(Azure.AI.Projects.Memory.MemoryItemKind?), int? limit = default(int?), Azure.AI.Projects.Memory.MemoryStoreListOrder? order = default(Azure.AI.Projects.Memory.MemoryStoreListOrder?), string after = null, string before = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.ClientModel.ClientResult GetMemory(string name, string memoryId, System.ClientModel.Primitives.RequestOptions options) { throw null; } public virtual System.ClientModel.ClientResult GetMemory(string name, string memoryId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task GetMemoryAsync(string name, string memoryId, System.ClientModel.Primitives.RequestOptions options) { throw null; } @@ -2653,6 +3675,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer private readonly int _dummyPrimitive; public MemoryItemKind(string value) { throw null; } public static Azure.AI.Projects.Memory.MemoryItemKind ChatSummary { get { throw null; } } + public static Azure.AI.Projects.Memory.MemoryItemKind Procedural { get { throw null; } } public static Azure.AI.Projects.Memory.MemoryItemKind UserProfile { get { throw null; } } public bool Equals(Azure.AI.Projects.Memory.MemoryItemKind other) { throw null; } public override bool Equals(object obj) { throw null; } @@ -2777,8 +3800,10 @@ protected override void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter write public partial class MemoryStoreDefaultOptions : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public MemoryStoreDefaultOptions(bool isUserProfileEnabled, bool isChatSummaryEnabled) { } + public System.TimeSpan? DefaultTtlSeconds { get { throw null; } set { } } public bool IsChatSummaryEnabled { get { throw null; } set { } } public bool IsUserProfileEnabled { get { throw null; } set { } } + public bool? ProceduralMemoryEnabled { get { throw null; } set { } } public string UserProfileDetails { get { throw null; } set { } } protected virtual Azure.AI.Projects.Memory.MemoryStoreDefaultOptions JsonModelCreateCore(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } diff --git a/sdk/ai/Azure.AI.Projects/assets.json b/sdk/ai/Azure.AI.Projects/assets.json index e54b65815f63..23fc3b3a6187 100644 --- a/sdk/ai/Azure.AI.Projects/assets.json +++ b/sdk/ai/Azure.AI.Projects/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/ai/Azure.AI.Projects", - "Tag": "net/ai/Azure.AI.Projects_f112568ad0" + "Tag": "net/ai/Azure.AI.Projects_52f55a3ef2" } diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/AIProjectClient.cs b/sdk/ai/Azure.AI.Projects/src/Custom/AIProjectClient.cs index 2b0d54c4ad16..100cdb67ba67 100644 --- a/sdk/ai/Azure.AI.Projects/src/Custom/AIProjectClient.cs +++ b/sdk/ai/Azure.AI.Projects/src/Custom/AIProjectClient.cs @@ -90,7 +90,7 @@ public AIProjectClient(Uri endpoint, AuthenticationTokenProvider tokenProvider, "api-version", _apiVersion, conditionToEvaluate: request => request?.Uri?.AbsolutePath?.ToLowerInvariant()?.Contains("openai/v1") != true); - PipelinePolicyHelpers.AddRequestHeaderPolicy(options, "Foundry-Features", "MemoryStores=V1Preview,ContainerAgents=V1Preview,HostedAgents=V1Preview,WorkflowAgents=V1Preview,Evaluations=V1Preview,Schedules=V1Preview,RedTeams=V1Preview,Toolboxes=V1Preview,AgentEndpoints=V1Preview,Skills=V1Preview,Insights=V1Preview,DataGenerationJobs=V1Preview,CodeAgents=V1Preview,Models=V1Preview,AgentsOptimization=V1Preview"); + PipelinePolicyHelpers.AddRequestHeaderPolicy(options, "Foundry-Features", "MemoryStores=V1Preview,ContainerAgents=V1Preview,HostedAgents=V1Preview,WorkflowAgents=V1Preview,Evaluations=V1Preview,Schedules=V1Preview,RedTeams=V1Preview,Toolboxes=V1Preview,AgentEndpoints=V1Preview,Skills=V1Preview,Insights=V1Preview,DataGenerationJobs=V1Preview,CodeAgents=V1Preview,Models=V1Preview,AgentsOptimization=V1Preview,Routines=V1Preview,ExternalAgents=V1Preview"); PipelinePolicyHelpers.AddRequestHeaderPolicy(options, "User-Agent", _telemetryDetails.UserAgent.ToString()); PipelinePolicyHelpers.AddRequestHeaderPolicy(options, "x-ms-client-request-id", () => Guid.NewGuid().ToString().ToLowerInvariant()); PipelinePolicyHelpers.OpenAI.AddResponseItemInputTransformPolicy(options); @@ -196,6 +196,18 @@ internal virtual AIProjectModels GetAIProjectModelsClient() { return Volatile.Read(ref _cachedAIProjectModels) ?? Interlocked.CompareExchange(ref _cachedAIProjectModels, new AIProjectModels(Pipeline, _endpoint, _apiVersion), null) ?? _cachedAIProjectModels; } + + /// Initializes a new instance of DataGenerationJobs. + internal virtual DataGenerationJobs GetDataGenerationJobsClient() + { + return Volatile.Read(ref _cachedDataGenerationJobs) ?? Interlocked.CompareExchange(ref _cachedDataGenerationJobs, new DataGenerationJobs(Pipeline, _endpoint, _apiVersion), null) ?? _cachedDataGenerationJobs; + } + + /// Initializes a new instance of EvaluatorGenerationJobs. + internal virtual EvaluatorGenerationJobs GetEvaluatorGenerationJobsClient() + { + return Volatile.Read(ref _cachedEvaluatorGenerationJobs) ?? Interlocked.CompareExchange(ref _cachedEvaluatorGenerationJobs, new EvaluatorGenerationJobs(Pipeline, _endpoint, _apiVersion), null) ?? _cachedEvaluatorGenerationJobs; + } /// Gets the client for managing connections. public virtual AIProjectConnectionsOperations Connections { get => GetAIProjectConnectionsOperationsClient(); } /// Gets the client for managing datasets. @@ -214,6 +226,8 @@ internal virtual AIProjectModels GetAIProjectModelsClient() public virtual ProjectInsights Insights => GetProjectInsightsClient(); public virtual ProjectSchedules Schedules => GetProjectSchedulesClient(); public virtual AIProjectModels Models => GetAIProjectModelsClient(); + public virtual EvaluatorGenerationJobs EvaluatorGenerationJobs => GetEvaluatorGenerationJobsClient(); + public virtual DataGenerationJobs DataGenerationJobs => GetDataGenerationJobsClient(); /// Gets the client for telemetry operations. public virtual AIProjectTelemetry Telemetry { get => new AIProjectTelemetry(this); } diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/AzureAIProjectsModelFactory.cs b/sdk/ai/Azure.AI.Projects/src/Custom/AzureAIProjectsModelFactory.cs index 269be52f62dc..91ebf6eaf5c8 100644 --- a/sdk/ai/Azure.AI.Projects/src/Custom/AzureAIProjectsModelFactory.cs +++ b/sdk/ai/Azure.AI.Projects/src/Custom/AzureAIProjectsModelFactory.cs @@ -1,6 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. +using System.Collections.Generic; +using Azure.AI.Projects.Evaluation; using Microsoft.TypeSpec.Generator.Customizations; namespace Azure.AI.Projects @@ -8,5 +10,16 @@ namespace Azure.AI.Projects [CodeGenType("ProjectsModelFactory")] public partial class AzureAIProjectsModelFactory { + /// Represents a target specifying an Azure AI agent. + /// The unique identifier of the Azure AI agent. + /// The version of the Azure AI agent. + /// The parameters used to control the sampling behavior of the agent during text generation. + /// A new instance for mocking. + public static AzureAIAgentTarget AzureAIAgentTarget(string name = default, string version = default, IEnumerable toolDescriptions = default) + { + toolDescriptions ??= new ChangeTrackingList(); + + return new AzureAIAgentTarget("azure_ai_agent", additionalBinaryDataProperties: null, name, version, [..toolDescriptions], []); + } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/CodeGenStubs.Evaluations.cs b/sdk/ai/Azure.AI.Projects/src/Custom/CodeGenStubs.Evaluations.cs index dddfa6cddcaa..bed1f1dcbab5 100644 --- a/sdk/ai/Azure.AI.Projects/src/Custom/CodeGenStubs.Evaluations.cs +++ b/sdk/ai/Azure.AI.Projects/src/Custom/CodeGenStubs.Evaluations.cs @@ -7,7 +7,6 @@ namespace Azure.AI.Projects.Evaluation; [CodeGenType("AgentClusterInsightRequest")] public partial class AgentClusterInsightRequest { } [CodeGenType("AgentClusterInsightResult")] public partial class AgentClusterInsightResult { } [CodeGenType("AttackStrategy")] public readonly partial struct AttackStrategy { } -[CodeGenType("AzureAIAgentTarget")] public partial class AzureAIAgentTarget { } [CodeGenType("AzureAIModelTarget")] public partial class AzureAIModelTarget { } [CodeGenType("AzureOpenAIModelConfiguration")] public partial class AzureOpenAIModelConfiguration { } [CodeGenType("ChartCoordinate")] public partial class ChartCoordinate { } @@ -16,6 +15,7 @@ namespace Azure.AI.Projects.Evaluation; [CodeGenType("ClusterTokenUsage")] public partial class ClusterTokenUsage { } [CodeGenType("CronTrigger")] public partial class CronTrigger { } [CodeGenType("DailyRecurrenceSchedule")] public partial class DailyRecurrenceSchedule { } +[CodeGenType("Dimension")] public partial class EvaluationsDimension { } [CodeGenType("EvalResult")] public partial class EvalResult { } [CodeGenType("EvalRunResultCompareItem")] public partial class EvalRunResultCompareItem { } [CodeGenType("EvalRunResultComparison")] public partial class EvalRunResultComparison { } diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/DataGenerationJobs/DataGenerationJob.cs b/sdk/ai/Azure.AI.Projects/src/Custom/DataGenerationJobs/DataGenerationJob.cs new file mode 100644 index 000000000000..47ebc2ee67c3 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Custom/DataGenerationJobs/DataGenerationJob.cs @@ -0,0 +1,11 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +namespace Azure.AI.Projects; + +public partial class DataGenerationJob +{ + internal FoundryOpenAIError Error { get; } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/DataGenerationJobs/DataGenerationJobs.cs b/sdk/ai/Azure.AI.Projects/src/Custom/DataGenerationJobs/DataGenerationJobs.cs new file mode 100644 index 000000000000..e8aa4ed1baaf --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Custom/DataGenerationJobs/DataGenerationJobs.cs @@ -0,0 +1,223 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; +using System.Threading; +using System.Threading.Tasks; +using Azure.AI.Projects.Memory; + +namespace Azure.AI.Projects; + +[Experimental("AAIP001")] +[CodeGenSuppress("GetGenerationJobs", typeof(FoundryFeaturesOptInKeys?), typeof(int?), typeof(MemoryStoreListOrder?), typeof(string), typeof(string), typeof(DataGenerationJobScenario?), typeof(IEnumerable), typeof(CancellationToken))] +[CodeGenSuppress("GetGenerationJobsAsync", typeof(FoundryFeaturesOptInKeys?), typeof(int?), typeof(MemoryStoreListOrder?), typeof(string), typeof(string), typeof(DataGenerationJobScenario?), typeof(IEnumerable), typeof(CancellationToken))] +[CodeGenSuppress("GetGenerationJobs", typeof(string), typeof(int?), typeof(string), typeof(string), typeof(string), typeof(string), typeof(IEnumerable), typeof(RequestOptions))] +[CodeGenSuppress("GetGenerationJobsAsync", typeof(string), typeof(int?), typeof(string), typeof(string), typeof(string), typeof(string), typeof(IEnumerable), typeof(RequestOptions))] +public partial class DataGenerationJobs +{ + /// Gets the details of a data generation job by its ID. + /// The ID of the job. + /// The cancellation token that can be used to cancel the operation. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + public virtual ClientResult GetGenerationJob(string jobId, CancellationToken cancellationToken = default) + { + return GetGenerationJob( + jobId: jobId, + foundryFeatures: default, + cancellationToken: cancellationToken); + } + + /// Gets the details of a data generation job by its ID. + /// The ID of the job. + /// The cancellation token that can be used to cancel the operation. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + public virtual async Task> GetGenerationJobAsync(string jobId, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(jobId, nameof(jobId)); + + return await GetGenerationJobAsync( + jobId: jobId, + foundryFeatures: default, + cancellationToken: cancellationToken).ConfigureAwait(false); + } + + /// Returns a list of data generation jobs. + /// + /// A limit on the number of objects to be returned. Limit can range between 1 and 100, and the + /// default is 20. + /// + /// + /// Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc` + /// for descending order. + /// + /// + /// 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. + /// + /// Filter data generation jobs by their scenario. + /// Filter data generation jobs by their type. + /// The cancellation token that can be used to cancel the operation. + /// Service returned a non-success status code. + public virtual CollectionResult GetGenerationJobs(int? limit = default, MemoryStoreListOrder? order = default, string after = default, string before = default, DataGenerationJobScenario? scenario = default, IEnumerable kind = default, CancellationToken cancellationToken = default) + { + return new InternalOpenAICollectionResultOfT( + Pipeline, + messageGenerator: (localCollectionOptions, localRequestOptions) + => CreateGetGenerationJobsRequest( + foundryFeatures: default, + limit: localCollectionOptions.Limit, + order: localCollectionOptions.Order, + after: localCollectionOptions.AfterId, + before: localCollectionOptions.BeforeId, + scenario: localCollectionOptions.Filters.Count > 0 ? localCollectionOptions.Filters[0] : null, + type: kind, + options: localRequestOptions), + dataItemDeserializer: DataGenerationJob.DeserializeDataGenerationJob, + new InternalOpenAICollectionResultOptions(limit, order?.ToString(), after, before, filters: [scenario?.ToString(), kind.ToString()]), + cancellationToken.ToRequestOptions()); + } + + /// Returns a list of data generation jobs. + /// + /// A limit on the number of objects to be returned. Limit can range between 1 and 100, and the + /// default is 20. + /// + /// + /// Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc` + /// for descending order. + /// + /// + /// 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. + /// + /// Filter data generation jobs by their scenario. + /// Filter data generation jobs by their type. + /// The cancellation token that can be used to cancel the operation. + /// Service returned a non-success status code. + public virtual AsyncCollectionResult GetGenerationJobsAsync(int? limit = default, MemoryStoreListOrder? order = default, string after = default, string before = default, DataGenerationJobScenario? scenario = default, IEnumerable kind = default, CancellationToken cancellationToken = default) + { + return new InternalOpenAIAsyncCollectionResultOfT( + Pipeline, + messageGenerator: (localCollectionOptions, localRequestOptions) + => CreateGetGenerationJobsRequest( + foundryFeatures: default, + limit: localCollectionOptions.Limit, + order: localCollectionOptions.Order, + after: localCollectionOptions.AfterId, + before: localCollectionOptions.BeforeId, + scenario: localCollectionOptions.Filters.Count > 0 ? localCollectionOptions.Filters[0] : null, + type: kind, + options: localRequestOptions), + dataItemDeserializer: DataGenerationJob.DeserializeDataGenerationJob, + new InternalOpenAICollectionResultOptions(limit, order?.ToString(), after, before, filters: [scenario?.ToString()]), + cancellationToken.ToRequestOptions()); + } + + /// Creates a data generation job. + /// The job to create. + /// Client-generated unique ID for idempotent retries. When absent, the server creates the job unconditionally. + /// The cancellation token that can be used to cancel the operation. + /// is null. + /// Service returned a non-success status code. + public virtual ClientResult CreateGenerationJob(DataGenerationJob job, string operationId = default, CancellationToken cancellationToken = default) + { + return CreateGenerationJob( + job: job, + foundryFeatures: default, + operationId: operationId, + cancellationToken: cancellationToken + ); + } + + /// Creates a data generation job. + /// The job to create. + /// Client-generated unique ID for idempotent retries. When absent, the server creates the job unconditionally. + /// The cancellation token that can be used to cancel the operation. + /// is null. + /// Service returned a non-success status code. + public virtual async Task> CreateGenerationJobAsync(DataGenerationJob job, string operationId = default, CancellationToken cancellationToken = default) + { + return await CreateGenerationJobAsync( + job: job, + foundryFeatures: default, + operationId: operationId, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + + /// Cancels a data generation job by its ID. + /// The ID of the job to cancel. + /// The cancellation token that can be used to cancel the operation. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + public virtual ClientResult CancelGenerationJob(string jobId, CancellationToken cancellationToken = default) + { + return CancelGenerationJob( + jobId: jobId, + foundryFeatures: default, + cancellationToken: cancellationToken + ); + } + + /// Cancels a data generation job by its ID. + /// The ID of the job to cancel. + /// The cancellation token that can be used to cancel the operation. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + public async virtual Task> CancelGenerationJobAsync(string jobId, CancellationToken cancellationToken = default) + { + return await CancelGenerationJobAsync( + jobId: jobId, + foundryFeatures: default, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + + /// Deletes a data generation job by its ID. + /// The ID of the job to delete. + /// The cancellation token that can be used to cancel the operation. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + public virtual void DeleteGenerationJob(string jobId, CancellationToken cancellationToken = default) + { + DeleteGenerationJob( + jobId: jobId, + foundryFeatures: default, + cancellationToken: cancellationToken); + } + + /// Deletes a data generation job by its ID. + /// The ID of the job to delete. + /// The cancellation token that can be used to cancel the operation. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + public async virtual Task DeleteGenerationJobAsync(string jobId, CancellationToken cancellationToken = default) + { + await DeleteGenerationJobAsync( + jobId: jobId, + foundryFeatures: default, + cancellationToken: cancellationToken).ConfigureAwait(false); + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/EvaluationTaxonomies/AzureAIAgentTarget.cs b/sdk/ai/Azure.AI.Projects/src/Custom/EvaluationTaxonomies/AzureAIAgentTarget.cs new file mode 100644 index 000000000000..52f80e7b216f --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Custom/EvaluationTaxonomies/AzureAIAgentTarget.cs @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System.Collections.Generic; +using System.Linq; +using Azure.AI.Projects.Agents; + +namespace Azure.AI.Projects.Evaluation; + +[CodeGenType("AzureAIAgentTarget")] +public partial class AzureAIAgentTarget +{ + /// Gets the Tools. + [CodeGenMember("Tools")] + internal IList InternalTools { get; } + + /// Gets the Tools. + public IList Tools { get => [..InternalTools.Select(x => ProjectsAgentTool.AsProjectTool(x))]; } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/EvaluatorGenerationJobs/EvaluatorGenerationJob.cs b/sdk/ai/Azure.AI.Projects/src/Custom/EvaluatorGenerationJobs/EvaluatorGenerationJob.cs new file mode 100644 index 000000000000..a969adc06421 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Custom/EvaluatorGenerationJobs/EvaluatorGenerationJob.cs @@ -0,0 +1,9 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +namespace Azure.AI.Projects; + +public partial class EvaluatorGenerationJob +{ + internal FoundryOpenAIError Error { get; } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/EvaluatorGenerationJobs/EvaluatorGenerationJobs.cs b/sdk/ai/Azure.AI.Projects/src/Custom/EvaluatorGenerationJobs/EvaluatorGenerationJobs.cs new file mode 100644 index 000000000000..5bd53d09ff00 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Custom/EvaluatorGenerationJobs/EvaluatorGenerationJobs.cs @@ -0,0 +1,227 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Diagnostics.CodeAnalysis; +using System.Threading; +using System.Threading.Tasks; +using Azure.AI.Projects.Evaluation; +using Azure.AI.Projects.Memory; + +namespace Azure.AI.Projects; + +[Experimental("AAIP001")] +[CodeGenSuppress("GetAll", typeof(FoundryFeaturesOptInKeys?), typeof(int?), typeof(MemoryStoreListOrder?), typeof(string), typeof(string), typeof(CancellationToken))] +[CodeGenSuppress("GetAllAsync", typeof(FoundryFeaturesOptInKeys?), typeof(int?), typeof(MemoryStoreListOrder?), typeof(string), typeof(string), typeof(CancellationToken))] +[CodeGenSuppress("GetAll", typeof(string), typeof(int?), typeof(string), typeof(string), typeof(string), typeof(RequestOptions))] +[CodeGenSuppress("GetAllAsync", typeof(string), typeof(int?), typeof(string), typeof(string), typeof(string), typeof(RequestOptions))] +public partial class EvaluatorGenerationJobs +{ + /// + /// Creates an evaluator generation job. The service generates rubric-based evaluator + /// definitions from the provided source materials asynchronously. + /// + /// The job to create. + /// Client-generated unique ID for idempotent retries. When absent, the server creates the job unconditionally. + /// The cancellation token that can be used to cancel the operation. + /// is null. + /// Service returned a non-success status code. + public virtual ClientResult Create(EvaluatorGenerationJob job, string operationId = default, CancellationToken cancellationToken = default) + { + return Create( + job: job, + foundryFeatures: default, + operationId: operationId, + cancellationToken: cancellationToken + ); + } + + /// + /// Creates an evaluator generation job. The service generates rubric-based evaluator + /// definitions from the provided source materials asynchronously. + /// + /// The job to create. + /// Client-generated unique ID for idempotent retries. When absent, the server creates the job unconditionally. + /// The cancellation token that can be used to cancel the operation. + /// is null. + /// Service returned a non-success status code. + public virtual async Task> CreateAsync(EvaluatorGenerationJob job, string operationId = default, CancellationToken cancellationToken = default) + { + return await CreateAsync( + job: job, + foundryFeatures: default, + operationId: operationId, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + + /// Gets the details of an evaluator generation job by its ID. + /// The ID of the job. + /// The cancellation token that can be used to cancel the operation. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + public virtual ClientResult Get(string jobId, CancellationToken cancellationToken = default) + { + return Get( + jobId: jobId, + foundryFeatures: default, + cancellationToken: cancellationToken + ); + } + + /// Gets the details of an evaluator generation job by its ID. + /// The ID of the job. + /// The cancellation token that can be used to cancel the operation. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + public virtual async Task> GetAsync(string jobId, CancellationToken cancellationToken = default) + { + return Get( + jobId: jobId, + foundryFeatures: default, + cancellationToken: cancellationToken + ); + } + + /// Returns a list of evaluator generation jobs. + /// + /// A limit on the number of objects to be returned. Limit can range between 1 and 100, and the + /// default is 20. + /// + /// + /// Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc` + /// for descending order. + /// + /// + /// 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 that can be used to cancel the operation. + /// Service returned a non-success status code. + public virtual CollectionResult GetAll(int? limit = default, MemoryStoreListOrder? order = default, string after = default, string before = default, CancellationToken cancellationToken = default) + { + return new InternalOpenAICollectionResultOfT( + Pipeline, + messageGenerator: (localCollectionOptions, localRequestOptions) + => CreateGetAllRequest( + foundryFeatures: default, + limit: localCollectionOptions.Limit, + order: localCollectionOptions.Order, + after: localCollectionOptions.AfterId, + before: localCollectionOptions.BeforeId, + options: localRequestOptions), + dataItemDeserializer: EvaluatorGenerationJob.DeserializeEvaluatorGenerationJob, + new InternalOpenAICollectionResultOptions(limit, order?.ToString(), after, before, filters: []), + cancellationToken.ToRequestOptions()); + } + + /// Returns a list of evaluator generation jobs. + /// + /// A limit on the number of objects to be returned. Limit can range between 1 and 100, and the + /// default is 20. + /// + /// + /// Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc` + /// for descending order. + /// + /// + /// 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 that can be used to cancel the operation. + /// Service returned a non-success status code. + public virtual AsyncCollectionResult GetAllAsync(int? limit = default, MemoryStoreListOrder? order = default, string after = default, string before = default, CancellationToken cancellationToken = default) + { + return new InternalOpenAIAsyncCollectionResultOfT( + Pipeline, + messageGenerator: (localCollectionOptions, localRequestOptions) + => CreateGetAllRequest( + foundryFeatures: default, + limit: localCollectionOptions.Limit, + order: localCollectionOptions.Order, + after: localCollectionOptions.AfterId, + before: localCollectionOptions.BeforeId, + options: localRequestOptions), + dataItemDeserializer: EvaluatorGenerationJob.DeserializeEvaluatorGenerationJob, + new InternalOpenAICollectionResultOptions(limit, order?.ToString(), after, before, filters: []), + cancellationToken.ToRequestOptions()); + } + + /// Cancels an evaluator generation job by its ID. + /// The ID of the job to cancel. + /// The cancellation token that can be used to cancel the operation. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + public virtual ClientResult Cancel(string jobId, CancellationToken cancellationToken = default) + { + return Cancel( + jobId: jobId, + foundryFeatures: default, + cancellationToken: cancellationToken + ); + } + + /// Cancels an evaluator generation job by its ID. + /// The ID of the job to cancel. + /// The cancellation token that can be used to cancel the operation. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + public virtual async Task> CancelAsync(string jobId, CancellationToken cancellationToken = default) + { + return await CancelAsync( + jobId: jobId, + foundryFeatures: default, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + } + + /// + /// Deletes an evaluator generation job by its ID. Deletes the job record only; + /// the generated evaluator (if any) is preserved. + /// + /// The ID of the job to delete. + /// The cancellation token that can be used to cancel the operation. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + public virtual void Delete(string jobId, CancellationToken cancellationToken = default) + { + Delete( + jobId: jobId, + foundryFeatures: default, + cancellationToken: cancellationToken); + } + + /// + /// Deletes an evaluator generation job by its ID. Deletes the job record only; + /// the generated evaluator (if any) is preserved. + /// + /// The ID of the job to delete. + /// The cancellation token that can be used to cancel the operation. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + public virtual async Task DeleteAsync(string jobId, CancellationToken cancellationToken = default) + { + await DeleteAsync( + jobId: jobId, + foundryFeatures: default, + cancellationToken: cancellationToken).ConfigureAwait(false); + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Custom/MemoryStores/AIProjectMemoryStores.cs b/sdk/ai/Azure.AI.Projects/src/Custom/MemoryStores/AIProjectMemoryStores.cs index fc487dfc4155..5a5f1939f599 100644 --- a/sdk/ai/Azure.AI.Projects/src/Custom/MemoryStores/AIProjectMemoryStores.cs +++ b/sdk/ai/Azure.AI.Projects/src/Custom/MemoryStores/AIProjectMemoryStores.cs @@ -17,6 +17,8 @@ namespace Azure.AI.Projects.Memory; [CodeGenSuppress("UpdateMemoriesAsync", typeof(string), typeof(string), typeof(IEnumerable), typeof(string), typeof(int?), typeof(CancellationToken))] [CodeGenSuppress("GetMemoryStores", typeof(int?), typeof(string), typeof(string), typeof(string), typeof(RequestOptions))] [CodeGenSuppress("GetMemoryStoresAsync", typeof(int?), typeof(string), typeof(string), typeof(string), typeof(RequestOptions))] +[CodeGenSuppress("GetMemories", typeof(string), typeof(BinaryContent), typeof(string), typeof(int?), typeof(string), typeof(string), typeof(string), typeof(RequestOptions))] +[CodeGenSuppress("GetMemories", typeof(string), typeof(BinaryContent), typeof(string), typeof(int?), typeof(string), typeof(string), typeof(string), typeof(RequestOptions))] [CodeGenType("MemoryStores")] [Experimental("AAIP001")] public partial class AIProjectMemoryStores @@ -193,6 +195,8 @@ public virtual MemoryUpdateResult WaitForMemoriesUpdate(string memoryStoreName, /// List all memory items in a memory store. /// The name of the memory store. + /// The namespace that logically groups and isolates memories, such as a user ID. + /// The kind of the memory item. /// /// A limit on the number of objects to be returned. Limit can range between 1 and 100, and the /// default is 20. @@ -215,27 +219,31 @@ public virtual MemoryUpdateResult WaitForMemoriesUpdate(string memoryStoreName, /// is null. /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. - public virtual CollectionResult GetMemories(string name, int? limit = default, MemoryStoreListOrder? order = default, string after = default, string before = default, CancellationToken cancellationToken = default) + public virtual CollectionResult GetMemories(string name, string scope, MemoryItemKind? kind=default, int? limit = default, MemoryStoreListOrder? order = default, string after = default, string before = default, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(name, nameof(name)); - + ListMemoriesRequest spreadModel = new ListMemoriesRequest(scope, default); return new InternalOpenAICollectionResultOfT( Pipeline, messageGenerator: (localCollectionOptions, localRequestOptions) => CreateGetMemoriesRequest( - localCollectionOptions.Filters[0], - localCollectionOptions.Limit, - localCollectionOptions.Order, - localCollectionOptions.AfterId, - localCollectionOptions.BeforeId, - localRequestOptions), + name: localCollectionOptions.Filters[0], + content: new ListMemoriesRequest(localCollectionOptions.Filters[1], default), + kind: localCollectionOptions.Filters.Count > 2 ? localCollectionOptions.Filters[2] : default, + limit: localCollectionOptions.Limit, + order: localCollectionOptions.Order, + after: localCollectionOptions.AfterId, + before: localCollectionOptions.BeforeId, + options: localRequestOptions), dataItemDeserializer: MemoryItem.DeserializeMemoryItem, - new InternalOpenAICollectionResultOptions(limit, order?.ToString(), after, before, filters: [name]), + new InternalOpenAICollectionResultOptions(limit, order?.ToString(), after, before, filters: [name, scope, kind?.ToString()]), cancellationToken.ToRequestOptions()); } /// List all memory items in a memory store. /// The name of the memory store. + /// The namespace that logically groups and isolates memories, such as a user ID. + /// The kind of the memory item. /// /// A limit on the number of objects to be returned. Limit can range between 1 and 100, and the /// default is 20. @@ -258,7 +266,7 @@ public virtual CollectionResult GetMemories(string name, int? limit /// is null. /// is an empty string, and was expected to be non-empty. /// Service returned a non-success status code. - public virtual AsyncCollectionResult GetMemoriesAsync(string name, int? limit = default, MemoryStoreListOrder? order = default, string after = default, string before = default, CancellationToken cancellationToken = default) + public virtual AsyncCollectionResult GetMemoriesAsync(string name, string scope, MemoryItemKind? kind = default, int? limit = default, MemoryStoreListOrder? order = default, string after = default, string before = default, CancellationToken cancellationToken = default) { Argument.AssertNotNullOrEmpty(name, nameof(name)); @@ -266,14 +274,16 @@ public virtual AsyncCollectionResult GetMemoriesAsync(string name, i Pipeline, messageGenerator: (localCollectionOptions, localRequestOptions) => CreateGetMemoriesRequest( - localCollectionOptions.Filters[0], - localCollectionOptions.Limit, - localCollectionOptions.Order, - localCollectionOptions.AfterId, - localCollectionOptions.BeforeId, - localRequestOptions), + name: localCollectionOptions.Filters[0], + content: new ListMemoriesRequest(localCollectionOptions.Filters[1], default), + kind: localCollectionOptions.Filters.Count > 2 ? localCollectionOptions.Filters[2] : default, + limit: localCollectionOptions.Limit, + order: localCollectionOptions.Order, + after: localCollectionOptions.AfterId, + before: localCollectionOptions.BeforeId, + options: localRequestOptions), dataItemDeserializer: MemoryItem.DeserializeMemoryItem, - new InternalOpenAICollectionResultOptions(limit, order?.ToString(), after, before, filters: [name]), + new InternalOpenAICollectionResultOptions(limit, order?.ToString(), after, before, filters: [name, scope, kind?.ToString()]), cancellationToken.ToRequestOptions()); } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectClient.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectClient.cs index 412e38012077..7995f43c92a9 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectClient.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectClient.cs @@ -34,9 +34,12 @@ public partial class AIProjectClient : ClientConnectionProvider private EvaluationRules _cachedEvaluationRules; private EvaluationTaxonomies _cachedEvaluationTaxonomies; private ProjectEvaluators _cachedProjectEvaluators; + private EvaluatorGenerationJobs _cachedEvaluatorGenerationJobs; private ProjectInsights _cachedProjectInsights; private ProjectSchedules _cachedProjectSchedules; private AIProjectMemoryStores _cachedAIProjectMemoryStores; + private AIProjectRoutines _cachedAIProjectRoutines; + private DataGenerationJobs _cachedDataGenerationJobs; /// The HTTP pipeline for sending and receiving REST requests and responses. public ClientPipeline Pipeline { get; } @@ -46,5 +49,11 @@ public virtual AIProjectMemoryStores GetAIProjectMemoryStoresClient() { return Volatile.Read(ref _cachedAIProjectMemoryStores) ?? Interlocked.CompareExchange(ref _cachedAIProjectMemoryStores, new AIProjectMemoryStores(Pipeline, _endpoint, _apiVersion), null) ?? _cachedAIProjectMemoryStores; } + + /// Initializes a new instance of AIProjectRoutines. + public virtual AIProjectRoutines GetAIProjectRoutinesClient() + { + return Volatile.Read(ref _cachedAIProjectRoutines) ?? Interlocked.CompareExchange(ref _cachedAIProjectRoutines, new AIProjectRoutines(Pipeline, _endpoint, _apiVersion), null) ?? _cachedAIProjectRoutines; + } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectMemoryStores.RestClient.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectMemoryStores.RestClient.cs index 80a7ea0e3e3c..8636f5be42ee 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectMemoryStores.RestClient.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectMemoryStores.RestClient.cs @@ -206,7 +206,7 @@ internal PipelineMessage CreateCreateMemoryRequest(string name, BinaryContent co uri.Reset(_endpoint); uri.AppendPath("/memory_stores/", false); uri.AppendPath(name, true); - uri.AppendPath("/memories", false); + uri.AppendPath("/items", false); if (_apiVersion != null) { uri.AppendQuery("api-version", _apiVersion, true); @@ -226,7 +226,7 @@ internal PipelineMessage CreateUpdateMemoryRequest(string name, string memoryId, uri.Reset(_endpoint); uri.AppendPath("/memory_stores/", false); uri.AppendPath(name, true); - uri.AppendPath("/memories/", false); + uri.AppendPath("/items/", false); uri.AppendPath(memoryId, true); if (_apiVersion != null) { @@ -247,7 +247,7 @@ internal PipelineMessage CreateGetMemoryRequest(string name, string memoryId, Re uri.Reset(_endpoint); uri.AppendPath("/memory_stores/", false); uri.AppendPath(name, true); - uri.AppendPath("/memories/", false); + uri.AppendPath("/items/", false); uri.AppendPath(memoryId, true); if (_apiVersion != null) { @@ -260,13 +260,17 @@ internal PipelineMessage CreateGetMemoryRequest(string name, string memoryId, Re return message; } - internal PipelineMessage CreateGetMemoriesRequest(string name, int? limit, string order, string after, string before, RequestOptions options) + internal PipelineMessage CreateGetMemoriesRequest(string name, BinaryContent content, string kind, int? limit, string order, string after, string before, RequestOptions options) { ClientUriBuilder uri = new ClientUriBuilder(); uri.Reset(_endpoint); uri.AppendPath("/memory_stores/", false); uri.AppendPath(name, true); - uri.AppendPath("/memories", false); + uri.AppendPath("/items:list", false); + if (kind != null) + { + uri.AppendQuery("kind", kind, true); + } if (limit != null) { uri.AppendQuery("limit", TypeFormatters.ConvertToString(limit), true); @@ -287,9 +291,11 @@ internal PipelineMessage CreateGetMemoriesRequest(string name, int? limit, strin { uri.AppendQuery("api-version", _apiVersion, true); } - PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200); + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier200); PipelineRequest request = message.Request; + request.Headers.Set("Content-Type", "application/json"); request.Headers.Set("Accept", "application/json"); + request.Content = content; message.Apply(options); return message; } @@ -300,7 +306,7 @@ internal PipelineMessage CreateDeleteMemoryRequest(string name, string memoryId, uri.Reset(_endpoint); uri.AppendPath("/memory_stores/", false); uri.AppendPath(name, true); - uri.AppendPath("/memories/", false); + uri.AppendPath("/items/", false); uri.AppendPath(memoryId, true); if (_apiVersion != null) { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectMemoryStores.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectMemoryStores.cs index 474a9926c3d0..8769d42bd42e 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectMemoryStores.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectMemoryStores.cs @@ -868,6 +868,8 @@ public virtual async Task> GetMemoryAsync(string name, /// /// /// The name of the memory store. + /// The content to send as the body of the request. + /// The kind of the memory item. /// /// A limit on the number of objects to be returned. Limit can range between 1 and 100, and the /// default is 20. @@ -887,63 +889,20 @@ public virtual async Task> GetMemoryAsync(string name, /// subsequent call can include before=obj_foo in order to fetch the previous page of the list. /// /// The request options, 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. - /// Service returned a non-success status code. - /// The response returned from the service. - public virtual CollectionResult GetMemories(string name, int? limit, string order, string after, string before, RequestOptions options) - { - Argument.AssertNotNullOrEmpty(name, nameof(name)); - - return new AIProjectMemoryStoresGetMemoriesCollectionResult( - this, - name, - limit, - order, - after, - before, - options); - } - - /// - /// [Protocol Method] List all memory items in a memory store. - /// - /// - /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. - /// - /// - /// - /// The name of the memory store. - /// - /// A limit on the number of objects to be returned. Limit can range between 1 and 100, and the - /// default is 20. - /// - /// - /// Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc` - /// for descending order. - /// - /// - /// 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 request options, which can override default behaviors of the client pipeline on a per-call basis. - /// is null. + /// 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 AsyncCollectionResult GetMemoriesAsync(string name, int? limit, string order, string after, string before, RequestOptions options) + public virtual AsyncCollectionResult GetMemoriesAsync(string name, BinaryContent content, string kind = default, int? limit = default, string order = default, string after = default, string before = default, RequestOptions options = null) { Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNull(content, nameof(content)); return new AIProjectMemoryStoresGetMemoriesAsyncCollectionResult( this, name, + content, + kind, limit, order, after, diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectRoutines.RestClient.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectRoutines.RestClient.cs new file mode 100644 index 000000000000..a534351b5887 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectRoutines.RestClient.cs @@ -0,0 +1,230 @@ +// + +#nullable disable + +using System.ClientModel; +using System.ClientModel.Primitives; + +namespace Azure.AI.Projects +{ + /// + public partial class AIProjectRoutines + { + private static PipelineMessageClassifier _pipelineMessageClassifier200; + private static PipelineMessageClassifier _pipelineMessageClassifier204; + + private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 ??= PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); + + private static PipelineMessageClassifier PipelineMessageClassifier204 => _pipelineMessageClassifier204 ??= PipelineMessageClassifier.Create(stackalloc ushort[] { 204 }); + + internal PipelineMessage CreateCreateOrUpdateRoutineRequest(string routineName, BinaryContent content, string foundryFeatures, RequestOptions options) + { + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/routines/", false); + uri.AppendPath(routineName, true); + if (_apiVersion != null) + { + uri.AppendQuery("api-version", _apiVersion, true); + } + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "PUT", PipelineMessageClassifier200); + PipelineRequest request = message.Request; + if (foundryFeatures != null) + { + request.Headers.Set("Foundry-Features", foundryFeatures); + } + request.Headers.Set("Content-Type", "application/json"); + request.Headers.Set("Accept", "application/json"); + request.Content = content; + message.Apply(options); + return message; + } + + internal PipelineMessage CreateGetRoutineRequest(string routineName, string foundryFeatures, RequestOptions options) + { + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/routines/", false); + uri.AppendPath(routineName, true); + if (_apiVersion != null) + { + uri.AppendQuery("api-version", _apiVersion, true); + } + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200); + PipelineRequest request = message.Request; + if (foundryFeatures != null) + { + request.Headers.Set("Foundry-Features", foundryFeatures); + } + request.Headers.Set("Accept", "application/json"); + message.Apply(options); + return message; + } + + internal PipelineMessage CreateEnableRoutineRequest(string routineName, string foundryFeatures, RequestOptions options) + { + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/routines/", false); + uri.AppendPath(routineName, true); + uri.AppendPath(":enable", false); + if (_apiVersion != null) + { + uri.AppendQuery("api-version", _apiVersion, true); + } + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier200); + PipelineRequest request = message.Request; + if (foundryFeatures != null) + { + request.Headers.Set("Foundry-Features", foundryFeatures); + } + request.Headers.Set("Accept", "application/json"); + message.Apply(options); + return message; + } + + internal PipelineMessage CreateDisableRoutineRequest(string routineName, string foundryFeatures, RequestOptions options) + { + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/routines/", false); + uri.AppendPath(routineName, true); + uri.AppendPath(":disable", false); + if (_apiVersion != null) + { + uri.AppendQuery("api-version", _apiVersion, true); + } + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier200); + PipelineRequest request = message.Request; + if (foundryFeatures != null) + { + request.Headers.Set("Foundry-Features", foundryFeatures); + } + request.Headers.Set("Accept", "application/json"); + message.Apply(options); + return message; + } + + internal PipelineMessage CreateGetRoutinesRequest(string foundryFeatures, int? limit, string order, string after, string before, RequestOptions options) + { + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/routines", false); + if (limit != null) + { + uri.AppendQuery("limit", TypeFormatters.ConvertToString(limit), true); + } + if (order != null) + { + uri.AppendQuery("order", order, true); + } + if (after != null) + { + uri.AppendQuery("after", after, true); + } + if (before != null) + { + uri.AppendQuery("before", before, true); + } + if (_apiVersion != null) + { + uri.AppendQuery("api-version", _apiVersion, true); + } + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200); + PipelineRequest request = message.Request; + if (foundryFeatures != null) + { + request.Headers.Set("Foundry-Features", foundryFeatures); + } + request.Headers.Set("Accept", "application/json"); + message.Apply(options); + return message; + } + + internal PipelineMessage CreateDeleteRoutineRequest(string routineName, string foundryFeatures, RequestOptions options) + { + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/routines/", false); + uri.AppendPath(routineName, true); + if (_apiVersion != null) + { + uri.AppendQuery("api-version", _apiVersion, true); + } + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "DELETE", PipelineMessageClassifier204); + PipelineRequest request = message.Request; + if (foundryFeatures != null) + { + request.Headers.Set("Foundry-Features", foundryFeatures); + } + message.Apply(options); + return message; + } + + internal PipelineMessage CreateGetRoutineRunsRequest(string routineName, string foundryFeatures, string filter, int? limit, string order, string after, string before, RequestOptions options) + { + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/routines/", false); + uri.AppendPath(routineName, true); + uri.AppendPath("/runs", false); + if (filter != null) + { + uri.AppendQuery("filter", filter, true); + } + if (limit != null) + { + uri.AppendQuery("limit", TypeFormatters.ConvertToString(limit), true); + } + if (order != null) + { + uri.AppendQuery("order", order, true); + } + if (after != null) + { + uri.AppendQuery("after", after, true); + } + if (before != null) + { + uri.AppendQuery("before", before, true); + } + if (_apiVersion != null) + { + uri.AppendQuery("api-version", _apiVersion, true); + } + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200); + PipelineRequest request = message.Request; + if (foundryFeatures != null) + { + request.Headers.Set("Foundry-Features", foundryFeatures); + } + request.Headers.Set("Accept", "application/json"); + message.Apply(options); + return message; + } + + internal PipelineMessage CreateDispatchRoutineAsyncRequest(string routineName, BinaryContent content, string foundryFeatures, RequestOptions options) + { + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/routines/", false); + uri.AppendPath(routineName, true); + uri.AppendPath(":dispatch_async", false); + if (_apiVersion != null) + { + uri.AppendQuery("api-version", _apiVersion, true); + } + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier200); + PipelineRequest request = message.Request; + if (foundryFeatures != null) + { + request.Headers.Set("Foundry-Features", foundryFeatures); + } + request.Headers.Set("Content-Type", "application/json"); + request.Headers.Set("Accept", "application/json"); + request.Content = content; + message.Apply(options); + return message; + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectRoutines.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectRoutines.cs new file mode 100644 index 000000000000..f77283625c74 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/AIProjectRoutines.cs @@ -0,0 +1,856 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; +using Azure.AI.Projects.Memory; + +namespace Azure.AI.Projects +{ + /// The AIProjectRoutines sub-client. + public partial class AIProjectRoutines + { + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of AIProjectRoutines for mocking. + protected AIProjectRoutines() + { + } + + /// Initializes a new instance of AIProjectRoutines. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// Service endpoint. + /// + internal AIProjectRoutines(ClientPipeline pipeline, Uri endpoint, string apiVersion) + { + _endpoint = endpoint; + Pipeline = pipeline; + _apiVersion = apiVersion; + } + + /// The HTTP pipeline for sending and receiving REST requests and responses. + public ClientPipeline Pipeline { get; } + + /// + /// [Protocol Method] Create or update a routine. + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// The unique name of the routine. + /// The content to send as the body of the request. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// The request options, 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. + /// Service returned a non-success status code. + /// The response returned from the service. + public virtual ClientResult CreateOrUpdateRoutine(string routineName, BinaryContent content, string foundryFeatures = default, RequestOptions options = null) + { + Argument.AssertNotNullOrEmpty(routineName, nameof(routineName)); + Argument.AssertNotNull(content, nameof(content)); + + using PipelineMessage message = CreateCreateOrUpdateRoutineRequest(routineName, content, foundryFeatures, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); + } + + /// + /// [Protocol Method] Create or update a routine. + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// The unique name of the routine. + /// The content to send as the body of the request. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// The request options, 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. + /// Service returned a non-success status code. + /// The response returned from the service. + public virtual async Task CreateOrUpdateRoutineAsync(string routineName, BinaryContent content, string foundryFeatures = default, RequestOptions options = null) + { + Argument.AssertNotNullOrEmpty(routineName, nameof(routineName)); + Argument.AssertNotNull(content, nameof(content)); + + using PipelineMessage message = CreateCreateOrUpdateRoutineRequest(routineName, content, foundryFeatures, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + } + + /// Create or update a routine. + /// The unique name of the routine. + /// The triggers configured for the routine. In v1, exactly one trigger entry is supported. + /// The action executed when the routine fires. + /// A human-readable description of the routine. + /// Whether the routine is enabled. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// The cancellation token that can be used to cancel the operation. + /// , or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + public virtual ClientResult CreateOrUpdateRoutine(string routineName, IDictionary triggers, RoutineAction action, string description = default, bool? enabled = default, FoundryFeaturesOptInKeys? foundryFeatures = default, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(routineName, nameof(routineName)); + Argument.AssertNotNull(triggers, nameof(triggers)); + Argument.AssertNotNull(action, nameof(action)); + + CreateOrUpdateRoutineRequest spreadModel = new CreateOrUpdateRoutineRequest(description, enabled, triggers ?? new ChangeTrackingDictionary(), action, default); + ClientResult result = CreateOrUpdateRoutine(routineName, spreadModel, foundryFeatures?.ToSerialString(), cancellationToken.ToRequestOptions()); + return ClientResult.FromValue((ProjectsRoutine)result, result.GetRawResponse()); + } + + /// Create or update a routine. + /// The unique name of the routine. + /// The triggers configured for the routine. In v1, exactly one trigger entry is supported. + /// The action executed when the routine fires. + /// A human-readable description of the routine. + /// Whether the routine is enabled. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// The cancellation token that can be used to cancel the operation. + /// , or is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + public virtual async Task> CreateOrUpdateRoutineAsync(string routineName, IDictionary triggers, RoutineAction action, string description = default, bool? enabled = default, FoundryFeaturesOptInKeys? foundryFeatures = default, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(routineName, nameof(routineName)); + Argument.AssertNotNull(triggers, nameof(triggers)); + Argument.AssertNotNull(action, nameof(action)); + + CreateOrUpdateRoutineRequest spreadModel = new CreateOrUpdateRoutineRequest(description, enabled, triggers ?? new ChangeTrackingDictionary(), action, default); + ClientResult result = await CreateOrUpdateRoutineAsync(routineName, spreadModel, foundryFeatures?.ToSerialString(), cancellationToken.ToRequestOptions()).ConfigureAwait(false); + return ClientResult.FromValue((ProjectsRoutine)result, result.GetRawResponse()); + } + + /// + /// [Protocol Method] Retrieve a routine. + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// The unique name of the routine. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// The request options, 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. + /// Service returned a non-success status code. + /// The response returned from the service. + public virtual ClientResult GetRoutine(string routineName, string foundryFeatures, RequestOptions options) + { + Argument.AssertNotNullOrEmpty(routineName, nameof(routineName)); + + using PipelineMessage message = CreateGetRoutineRequest(routineName, foundryFeatures, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); + } + + /// + /// [Protocol Method] Retrieve a routine. + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// The unique name of the routine. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// The request options, 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. + /// Service returned a non-success status code. + /// The response returned from the service. + public virtual async Task GetRoutineAsync(string routineName, string foundryFeatures, RequestOptions options) + { + Argument.AssertNotNullOrEmpty(routineName, nameof(routineName)); + + using PipelineMessage message = CreateGetRoutineRequest(routineName, foundryFeatures, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + } + + /// Retrieve a routine. + /// The unique name of the routine. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// The cancellation token that can be used to cancel the operation. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + public virtual ClientResult GetRoutine(string routineName, FoundryFeaturesOptInKeys? foundryFeatures = default, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(routineName, nameof(routineName)); + + ClientResult result = GetRoutine(routineName, foundryFeatures?.ToSerialString(), cancellationToken.ToRequestOptions()); + return ClientResult.FromValue((ProjectsRoutine)result, result.GetRawResponse()); + } + + /// Retrieve a routine. + /// The unique name of the routine. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// The cancellation token that can be used to cancel the operation. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + public virtual async Task> GetRoutineAsync(string routineName, FoundryFeaturesOptInKeys? foundryFeatures = default, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(routineName, nameof(routineName)); + + ClientResult result = await GetRoutineAsync(routineName, foundryFeatures?.ToSerialString(), cancellationToken.ToRequestOptions()).ConfigureAwait(false); + return ClientResult.FromValue((ProjectsRoutine)result, result.GetRawResponse()); + } + + /// + /// [Protocol Method] Enable a routine. + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// The unique name of the routine. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// The request options, 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. + /// Service returned a non-success status code. + /// The response returned from the service. + public virtual ClientResult EnableRoutine(string routineName, string foundryFeatures, RequestOptions options) + { + Argument.AssertNotNullOrEmpty(routineName, nameof(routineName)); + + using PipelineMessage message = CreateEnableRoutineRequest(routineName, foundryFeatures, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); + } + + /// + /// [Protocol Method] Enable a routine. + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// The unique name of the routine. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// The request options, 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. + /// Service returned a non-success status code. + /// The response returned from the service. + public virtual async Task EnableRoutineAsync(string routineName, string foundryFeatures, RequestOptions options) + { + Argument.AssertNotNullOrEmpty(routineName, nameof(routineName)); + + using PipelineMessage message = CreateEnableRoutineRequest(routineName, foundryFeatures, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + } + + /// Enable a routine. + /// The unique name of the routine. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// The cancellation token that can be used to cancel the operation. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + public virtual ClientResult EnableRoutine(string routineName, FoundryFeaturesOptInKeys? foundryFeatures = default, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(routineName, nameof(routineName)); + + ClientResult result = EnableRoutine(routineName, foundryFeatures?.ToSerialString(), cancellationToken.ToRequestOptions()); + return ClientResult.FromValue((ProjectsRoutine)result, result.GetRawResponse()); + } + + /// Enable a routine. + /// The unique name of the routine. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// The cancellation token that can be used to cancel the operation. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + public virtual async Task> EnableRoutineAsync(string routineName, FoundryFeaturesOptInKeys? foundryFeatures = default, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(routineName, nameof(routineName)); + + ClientResult result = await EnableRoutineAsync(routineName, foundryFeatures?.ToSerialString(), cancellationToken.ToRequestOptions()).ConfigureAwait(false); + return ClientResult.FromValue((ProjectsRoutine)result, result.GetRawResponse()); + } + + /// + /// [Protocol Method] Disable a routine. + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// The unique name of the routine. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// The request options, 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. + /// Service returned a non-success status code. + /// The response returned from the service. + public virtual ClientResult DisableRoutine(string routineName, string foundryFeatures, RequestOptions options) + { + Argument.AssertNotNullOrEmpty(routineName, nameof(routineName)); + + using PipelineMessage message = CreateDisableRoutineRequest(routineName, foundryFeatures, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); + } + + /// + /// [Protocol Method] Disable a routine. + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// The unique name of the routine. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// The request options, 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. + /// Service returned a non-success status code. + /// The response returned from the service. + public virtual async Task DisableRoutineAsync(string routineName, string foundryFeatures, RequestOptions options) + { + Argument.AssertNotNullOrEmpty(routineName, nameof(routineName)); + + using PipelineMessage message = CreateDisableRoutineRequest(routineName, foundryFeatures, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + } + + /// Disable a routine. + /// The unique name of the routine. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// The cancellation token that can be used to cancel the operation. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + public virtual ClientResult DisableRoutine(string routineName, FoundryFeaturesOptInKeys? foundryFeatures = default, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(routineName, nameof(routineName)); + + ClientResult result = DisableRoutine(routineName, foundryFeatures?.ToSerialString(), cancellationToken.ToRequestOptions()); + return ClientResult.FromValue((ProjectsRoutine)result, result.GetRawResponse()); + } + + /// Disable a routine. + /// The unique name of the routine. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// The cancellation token that can be used to cancel the operation. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + public virtual async Task> DisableRoutineAsync(string routineName, FoundryFeaturesOptInKeys? foundryFeatures = default, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(routineName, nameof(routineName)); + + ClientResult result = await DisableRoutineAsync(routineName, foundryFeatures?.ToSerialString(), cancellationToken.ToRequestOptions()).ConfigureAwait(false); + return ClientResult.FromValue((ProjectsRoutine)result, result.GetRawResponse()); + } + + /// + /// [Protocol Method] List routines. + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// + /// A limit on the number of objects to be returned. Limit can range between 1 and 100, and the + /// default is 20. + /// + /// + /// Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc` + /// for descending order. + /// + /// + /// 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 request options, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + public virtual CollectionResult GetRoutines(string foundryFeatures, int? limit, string order, string after, string before, RequestOptions options) + { + return new AIProjectRoutinesGetRoutinesCollectionResult( + this, + foundryFeatures, + limit, + order, + after, + before, + options); + } + + /// + /// [Protocol Method] List routines. + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// + /// A limit on the number of objects to be returned. Limit can range between 1 and 100, and the + /// default is 20. + /// + /// + /// Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc` + /// for descending order. + /// + /// + /// 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 request options, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + public virtual AsyncCollectionResult GetRoutinesAsync(string foundryFeatures, int? limit, string order, string after, string before, RequestOptions options) + { + return new AIProjectRoutinesGetRoutinesAsyncCollectionResult( + this, + foundryFeatures, + limit, + order, + after, + before, + options); + } + + /// List routines. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// + /// A limit on the number of objects to be returned. Limit can range between 1 and 100, and the + /// default is 20. + /// + /// + /// Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc` + /// for descending order. + /// + /// + /// 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 that can be used to cancel the operation. + /// Service returned a non-success status code. + public virtual CollectionResult GetRoutines(FoundryFeaturesOptInKeys? foundryFeatures = default, int? limit = default, MemoryStoreListOrder? order = default, string after = default, string before = default, CancellationToken cancellationToken = default) + { + return new AIProjectRoutinesGetRoutinesCollectionResultOfT( + this, + foundryFeatures?.ToSerialString(), + limit, + order?.ToString(), + after, + before, + cancellationToken.ToRequestOptions()); + } + + /// List routines. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// + /// A limit on the number of objects to be returned. Limit can range between 1 and 100, and the + /// default is 20. + /// + /// + /// Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc` + /// for descending order. + /// + /// + /// 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 that can be used to cancel the operation. + /// Service returned a non-success status code. + public virtual AsyncCollectionResult GetRoutinesAsync(FoundryFeaturesOptInKeys? foundryFeatures = default, int? limit = default, MemoryStoreListOrder? order = default, string after = default, string before = default, CancellationToken cancellationToken = default) + { + return new AIProjectRoutinesGetRoutinesAsyncCollectionResultOfT( + this, + foundryFeatures?.ToSerialString(), + limit, + order?.ToString(), + after, + before, + cancellationToken.ToRequestOptions()); + } + + /// + /// [Protocol Method] Delete a routine. + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// The unique name of the routine. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// The request options, 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. + /// Service returned a non-success status code. + /// The response returned from the service. + public virtual ClientResult DeleteRoutine(string routineName, string foundryFeatures, RequestOptions options) + { + Argument.AssertNotNullOrEmpty(routineName, nameof(routineName)); + + using PipelineMessage message = CreateDeleteRoutineRequest(routineName, foundryFeatures, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); + } + + /// + /// [Protocol Method] Delete a routine. + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// The unique name of the routine. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// The request options, 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. + /// Service returned a non-success status code. + /// The response returned from the service. + public virtual async Task DeleteRoutineAsync(string routineName, string foundryFeatures, RequestOptions options) + { + Argument.AssertNotNullOrEmpty(routineName, nameof(routineName)); + + using PipelineMessage message = CreateDeleteRoutineRequest(routineName, foundryFeatures, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + } + + /// Delete a routine. + /// The unique name of the routine. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// The cancellation token that can be used to cancel the operation. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + public virtual ClientResult DeleteRoutine(string routineName, FoundryFeaturesOptInKeys? foundryFeatures = default, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(routineName, nameof(routineName)); + + return DeleteRoutine(routineName, foundryFeatures?.ToSerialString(), cancellationToken.ToRequestOptions()); + } + + /// Delete a routine. + /// The unique name of the routine. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// The cancellation token that can be used to cancel the operation. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + public virtual async Task DeleteRoutineAsync(string routineName, FoundryFeaturesOptInKeys? foundryFeatures = default, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(routineName, nameof(routineName)); + + return await DeleteRoutineAsync(routineName, foundryFeatures?.ToSerialString(), cancellationToken.ToRequestOptions()).ConfigureAwait(false); + } + + /// + /// [Protocol Method] List prior runs for a routine. + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// The unique name of the routine. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// An optional MLflow search-runs filter expression applied within the routine's experiment. + /// + /// A limit on the number of objects to be returned. Limit can range between 1 and 100, and the + /// default is 20. + /// + /// + /// Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc` + /// for descending order. + /// + /// + /// 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 request options, 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. + /// Service returned a non-success status code. + /// The response returned from the service. + public virtual CollectionResult GetRoutineRuns(string routineName, string foundryFeatures, string filter, int? limit, string order, string after, string before, RequestOptions options) + { + Argument.AssertNotNullOrEmpty(routineName, nameof(routineName)); + + return new AIProjectRoutinesGetRoutineRunsCollectionResult( + this, + routineName, + foundryFeatures, + filter, + limit, + order, + after, + before, + options); + } + + /// + /// [Protocol Method] List prior runs for a routine. + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// The unique name of the routine. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// An optional MLflow search-runs filter expression applied within the routine's experiment. + /// + /// A limit on the number of objects to be returned. Limit can range between 1 and 100, and the + /// default is 20. + /// + /// + /// Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc` + /// for descending order. + /// + /// + /// 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 request options, 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. + /// Service returned a non-success status code. + /// The response returned from the service. + public virtual AsyncCollectionResult GetRoutineRunsAsync(string routineName, string foundryFeatures, string filter, int? limit, string order, string after, string before, RequestOptions options) + { + Argument.AssertNotNullOrEmpty(routineName, nameof(routineName)); + + return new AIProjectRoutinesGetRoutineRunsAsyncCollectionResult( + this, + routineName, + foundryFeatures, + filter, + limit, + order, + after, + before, + options); + } + + /// List prior runs for a routine. + /// The unique name of the routine. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// An optional MLflow search-runs filter expression applied within the routine's experiment. + /// + /// A limit on the number of objects to be returned. Limit can range between 1 and 100, and the + /// default is 20. + /// + /// + /// Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc` + /// for descending order. + /// + /// + /// 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 that can be used to cancel the operation. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + public virtual CollectionResult GetRoutineRuns(string routineName, FoundryFeaturesOptInKeys? foundryFeatures = default, string filter = default, int? limit = default, MemoryStoreListOrder? order = default, string after = default, string before = default, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(routineName, nameof(routineName)); + + return new AIProjectRoutinesGetRoutineRunsCollectionResultOfT( + this, + routineName, + foundryFeatures?.ToSerialString(), + filter, + limit, + order?.ToString(), + after, + before, + cancellationToken.ToRequestOptions()); + } + + /// List prior runs for a routine. + /// The unique name of the routine. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// An optional MLflow search-runs filter expression applied within the routine's experiment. + /// + /// A limit on the number of objects to be returned. Limit can range between 1 and 100, and the + /// default is 20. + /// + /// + /// Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc` + /// for descending order. + /// + /// + /// 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 that can be used to cancel the operation. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + public virtual AsyncCollectionResult GetRoutineRunsAsync(string routineName, FoundryFeaturesOptInKeys? foundryFeatures = default, string filter = default, int? limit = default, MemoryStoreListOrder? order = default, string after = default, string before = default, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(routineName, nameof(routineName)); + + return new AIProjectRoutinesGetRoutineRunsAsyncCollectionResultOfT( + this, + routineName, + foundryFeatures?.ToSerialString(), + filter, + limit, + order?.ToString(), + after, + before, + cancellationToken.ToRequestOptions()); + } + + /// + /// [Protocol Method] Queue an asynchronous routine dispatch. + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// The unique name of the routine. + /// The content to send as the body of the request. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// The request options, 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. + /// Service returned a non-success status code. + /// The response returned from the service. + public virtual ClientResult DispatchRoutineAsync(string routineName, BinaryContent content, string foundryFeatures = default, RequestOptions options = null) + { + Argument.AssertNotNullOrEmpty(routineName, nameof(routineName)); + Argument.AssertNotNull(content, nameof(content)); + + using PipelineMessage message = CreateDispatchRoutineAsyncRequest(routineName, content, foundryFeatures, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); + } + + /// + /// [Protocol Method] Queue an asynchronous routine dispatch. + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// The unique name of the routine. + /// The content to send as the body of the request. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// The request options, 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. + /// Service returned a non-success status code. + /// The response returned from the service. + public virtual async Task DispatchRoutineAsyncAsync(string routineName, BinaryContent content, string foundryFeatures = default, RequestOptions options = null) + { + Argument.AssertNotNullOrEmpty(routineName, nameof(routineName)); + Argument.AssertNotNull(content, nameof(content)); + + using PipelineMessage message = CreateDispatchRoutineAsyncRequest(routineName, content, foundryFeatures, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + } + + /// Queue an asynchronous routine dispatch. + /// The unique name of the routine. + /// A direct action-input override sent downstream when testing a routine. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// The cancellation token that can be used to cancel the operation. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + public virtual ClientResult DispatchRoutineAsync(string routineName, RoutineDispatchPayload payload = default, FoundryFeaturesOptInKeys? foundryFeatures = default, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(routineName, nameof(routineName)); + + DispatchRoutineAsyncRequest spreadModel = new DispatchRoutineAsyncRequest(payload, default); + ClientResult result = DispatchRoutineAsync(routineName, spreadModel, foundryFeatures?.ToSerialString(), cancellationToken.ToRequestOptions()); + return ClientResult.FromValue((DispatchRoutineResponse)result, result.GetRawResponse()); + } + + /// Queue an asynchronous routine dispatch. + /// The unique name of the routine. + /// A direct action-input override sent downstream when testing a routine. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// The cancellation token that can be used to cancel the operation. + /// is null. + /// is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + public virtual async Task> DispatchRoutineAsyncAsync(string routineName, RoutineDispatchPayload payload = default, FoundryFeaturesOptInKeys? foundryFeatures = default, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(routineName, nameof(routineName)); + + DispatchRoutineAsyncRequest spreadModel = new DispatchRoutineAsyncRequest(payload, default); + ClientResult result = await DispatchRoutineAsyncAsync(routineName, spreadModel, foundryFeatures?.ToSerialString(), cancellationToken.ToRequestOptions()).ConfigureAwait(false); + return ClientResult.FromValue((DispatchRoutineResponse)result, result.GetRawResponse()); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/AzureAIProjectsModelFactory.cs b/sdk/ai/Azure.AI.Projects/src/Generated/AzureAIProjectsModelFactory.cs index cbe03a9b083c..0b7b4e14476c 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/AzureAIProjectsModelFactory.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/AzureAIProjectsModelFactory.cs @@ -722,18 +722,6 @@ public static ModelSamplingParams ModelSamplingParams(float temperature = defaul return new ModelSamplingParams(temperature, topP, seed, maxCompletionTokens, additionalBinaryDataProperties: null); } - /// Represents a target specifying an Azure AI agent. - /// The unique identifier of the Azure AI agent. - /// The version of the Azure AI agent. - /// The parameters used to control the sampling behavior of the agent during text generation. - /// A new instance for mocking. - public static AzureAIAgentTarget AzureAIAgentTarget(string name = default, string version = default, IEnumerable toolDescriptions = default) - { - toolDescriptions ??= new ChangeTrackingList(); - - return new AzureAIAgentTarget("azure_ai_agent", additionalBinaryDataProperties: null, name, version, toolDescriptions.ToList()); - } - /// Description of a tool that can be used by an agent. /// The name of the tool. /// A brief description of the tool's purpose. @@ -743,6 +731,14 @@ public static ToolDescription ToolDescription(string name = default, string desc return new ToolDescription(name, description, additionalBinaryDataProperties: null); } + /// Memory search options. + /// Maximum number of memory items to return. + /// A new instance for mocking. + public static MemorySearchResultOptions MemorySearchResultOptions(int? maxMemories = default) + { + return new MemorySearchResultOptions(maxMemories, additionalBinaryDataProperties: null); + } + /// Taxonomy category definition. /// Unique identifier of the taxonomy category. /// Name of the taxonomy category. @@ -792,6 +788,7 @@ public static TaxonomySubCategory TaxonomySubCategory(string id = default, strin /// The type of the evaluator. /// The categories of the evaluator. /// Definition of the evaluator. + /// Provenance artifacts from the generation pipeline. Read-only; present only on evaluator versions created via an EvaluatorGenerationJob. Each artifact resolves to a versioned Foundry Dataset. /// Creator of the evaluator. /// Creation date/time of the evaluator. /// Last modified date/time of the evaluator. @@ -801,7 +798,7 @@ public static TaxonomySubCategory TaxonomySubCategory(string id = default, strin /// The asset description text. /// Tag dictionary. Tags can be added, removed, and updated. /// A new instance for mocking. - public static EvaluatorVersion EvaluatorVersion(string displayName = default, IDictionary metadata = default, EvaluatorType evaluatorType = default, IEnumerable categories = default, EvaluatorDefinition definition = default, string createdBy = default, string createdAt = default, string modifiedAt = default, string id = default, string name = default, string version = default, string description = default, IDictionary tags = default) + public static EvaluatorVersion EvaluatorVersion(string displayName = default, IDictionary metadata = default, EvaluatorType evaluatorType = default, IEnumerable categories = default, EvaluatorDefinition definition = default, EvaluatorGenerationArtifacts generationArtifacts = default, string createdBy = default, string createdAt = default, string modifiedAt = default, string id = default, string name = default, string version = default, string description = default, IDictionary tags = default) { metadata ??= new ChangeTrackingDictionary(); categories ??= new ChangeTrackingList(); @@ -813,6 +810,7 @@ public static EvaluatorVersion EvaluatorVersion(string displayName = default, ID evaluatorType, categories.ToList(), definition, + generationArtifacts, createdBy, createdAt, modifiedAt, @@ -826,7 +824,7 @@ public static EvaluatorVersion EvaluatorVersion(string displayName = default, ID /// /// Base evaluator configuration with discriminator - /// Please note this is the abstract base class. The derived classes available for instantiation are: and . + /// Please note this is the abstract base class. The derived classes available for instantiation are: , , and . /// /// The type of evaluator definition. /// The JSON schema (Draft 2020-12) for the evaluator's input parameters. This includes parameters like type, properties, required. @@ -904,6 +902,158 @@ public static PromptBasedEvaluatorDefinition PromptBasedEvaluatorDefinition(Bina promptText); } + /// Rubric-based evaluator definition — stores dimensions produced by the generate API. Used for both quality and safety evaluators. + /// The JSON schema (Draft 2020-12) for the evaluator's input parameters. This includes parameters like type, properties, required. + /// The JSON schema (Draft 2020-12) for the evaluator's input data. This includes parameters like type, properties, required. + /// List of output metrics produced by this evaluator. + /// The set of dimensions — the scoring blueprint used by the LLM judge. Quality evaluators include a non-editable residual dimension with id 'general_quality' (always_applicable: true); safety evaluators include 'general_policy_compliance'. Both use the same Dimension structure. + /// Pass/fail threshold for the aggregate rubric score, on the same normalized 0.0-1.0 scale as the emitted `score`. When the runtime weighted average meets or exceeds this value, the result is `pass`. Defaults to 0.5 (equivalent to a raw 1-5 weighted average of 3.0). The 'any dimension scored 1 → fail' rule still applies regardless of this threshold. + /// A new instance for mocking. + public static RubricBasedEvaluatorDefinition RubricBasedEvaluatorDefinition(BinaryData initParameters = default, BinaryData dataSchema = default, IDictionary metrics = default, IEnumerable dimensions = default, float? passThreshold = default) + { + metrics ??= new ChangeTrackingDictionary(); + dimensions ??= new ChangeTrackingList(); + + return new RubricBasedEvaluatorDefinition( + EvaluatorDefinitionType.Rubric, + initParameters, + dataSchema, + metrics, + additionalBinaryDataProperties: null, + dimensions.ToList(), + passThreshold); + } + + /// A single dimension — one independent, measurable quality dimension within a rubric evaluator's scoring blueprint. + /// Stable identifier for this dimension (snake_case, e.g., `correct_resolution`). Required. Provided by the user when manually creating a rubric evaluator or during human-in-the-loop review of a generated set; the generation pipeline produces an initial value the user can edit. Editable when saving new versions. + /// What this dimension measures (e.g., 'Correctly identifies the user's reservation intent and pursues the appropriate workflow'). + /// Relative weight of this dimension (1-10). The generation pipeline assigns exactly one dimension weight 8-10; all others use 1-6. User edits are not constrained by this heuristic. + /// When true, the LLM judge always scores this dimension regardless of relevance (skips applicability assessment). The service-generated general quality/policy dimension has this set to true and is non-editable. Users may set this on their own custom dimensions. + /// A new instance for mocking. + public static EvaluationsDimension EvaluationsDimension(string id = default, string description = default, int weight = default, bool? alwaysApplicable = default) + { + return new EvaluationsDimension(id, description, weight, alwaysApplicable, additionalBinaryDataProperties: null); + } + + /// Service-managed provenance artifacts produced by an evaluator generation job. Present only on EvaluatorVersion resources created via the generation pipeline. The combined-JSONL Foundry Dataset is read-only and resolves to a versioned dataset in a service-reserved namespace. + /// Reference to the single Foundry Dataset (one combined JSONL file, version-aligned to `EvaluatorVersion.version`) holding all artifacts produced by the generation pipeline. Each row in the JSONL carries a `kind` field discriminating its content (e.g. `spec`, `tools`, `context`). + /// The kinds of rows present in `dataset`. Always contains `"spec"` (the generated evaluation specification, a Markdown document describing what the evaluator measures). May additionally contain `"tools"` (when the generation pipeline produced or inferred OpenAI tool schemas) and/or `"context"` (when supplementary materials such as file uploads or trace samples were used during generation). + /// A new instance for mocking. + public static EvaluatorGenerationArtifacts EvaluatorGenerationArtifacts(DatasetReference dataset = default, IEnumerable kinds = default) + { + kinds ??= new ChangeTrackingList(); + + return new EvaluatorGenerationArtifacts(dataset, kinds.ToList(), additionalBinaryDataProperties: null); + } + + /// Reference to a versioned Foundry Dataset. + /// Dataset name. + /// Dataset version. + /// A new instance for mocking. + public static DatasetReference DatasetReference(string name = default, string version = default) + { + return new DatasetReference(name, version, additionalBinaryDataProperties: null); + } + + /// Request body for getting evaluator credentials. + /// The blob URI for the evaluator storage. Example: `https://account.blob.core.windows.net:443/container`. + /// A new instance for mocking. + public static EvaluatorCredentialRequest EvaluatorCredentialRequest(Uri blobUri = default) + { + return new EvaluatorCredentialRequest(blobUri, additionalBinaryDataProperties: null); + } + + /// Caller-supplied inputs for an evaluator generation job. + /// Source materials for generation — agent descriptions, prompts, traces, or datasets. Each entry is an `EvaluatorGenerationJobSource` variant discriminated by `type`. + /// The LLM model to use for rubric generation (e.g., 'gpt-4o'). Required — users must provide their own model rather than relying on service-owned capacity. + /// The evaluator name (immutable identifier). 1-256 characters; allowed characters are ASCII letters, digits, underscore (`_`), period (`.`), tilde (`~`), and hyphen (`-`). The prefix `builtin.` is reserved for system-managed evaluators and is rejected by the service. If an evaluator with this name already exists in the project (and is rubric-subtype), the service creates a new version under the same name and uses the prior version's `dimensions` as context for incremental improvement (foundation of the post-//build adaptive loop). Old versions remain queryable via `get_version(name, version)`. If the existing evaluator is not a rubric-subtype evaluator (built-in, prompt-based, code-based), the request is rejected with `400 Bad Request`. + /// Optional human-friendly display name for the resulting evaluator. Surfaced as `EvaluatorVersion.display_name` on the persisted evaluator. When omitted, the service uses `evaluator_name` as the display name. The `evaluator_` prefix disambiguates this from the immutable `evaluator_name` identifier. + /// Optional human-friendly description for the resulting evaluator. Surfaced as `EvaluatorVersion.description` on the persisted evaluator. Typically collected from the UI alongside `evaluator_display_name`. The `evaluator_` prefix disambiguates this from any other description fields on related models. + /// A new instance for mocking. + public static EvaluatorGenerationInputs EvaluatorGenerationInputs(IEnumerable sources = default, string model = default, string evaluatorName = default, string evaluatorDisplayName = default, string evaluatorDescription = default) + { + sources ??= new ChangeTrackingList(); + + return new EvaluatorGenerationInputs( + sources.ToList(), + model, + evaluatorName, + evaluatorDisplayName, + evaluatorDescription, + additionalBinaryDataProperties: null); + } + + /// + /// The base source model for evaluator generation jobs. Polymorphic over `type`. + /// Please note this is the abstract base class. The derived classes available for instantiation are: , , , and . + /// + /// The type of source. + /// A new instance for mocking. + public static EvaluatorGenerationJobSource EvaluatorGenerationJobSource(string @type = default) + { + return new UnknownEvaluatorGenerationJobSource(new EvaluatorGenerationJobSourceType(@type), additionalBinaryDataProperties: null); + } + + /// Prompt source for evaluator generation jobs — inline text provided by the user. + /// Optional description of what this source represents — helps the pipeline interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities'). + /// Inline prompt text (e.g., agent description, policy text, supplementary context). + /// A new instance for mocking. + public static PromptEvaluatorGenerationJobSource PromptEvaluatorGenerationJobSource(string description = default, string prompt = default) + { + return new PromptEvaluatorGenerationJobSource(EvaluatorGenerationJobSourceType.Prompt, additionalBinaryDataProperties: null, description, prompt); + } + + /// Agent source for evaluator generation jobs — references an agent to fetch instructions and metadata from. + /// Optional description of what this source represents — helps the pipeline interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities'). + /// The agent name to fetch instructions from. + /// The agent version. If not specified, the latest version is used. + /// A new instance for mocking. + public static AgentEvaluatorGenerationJobSource AgentEvaluatorGenerationJobSource(string description = default, string agentName = default, string agentVersion = default) + { + return new AgentEvaluatorGenerationJobSource(EvaluatorGenerationJobSourceType.Agent, additionalBinaryDataProperties: null, description, agentName, agentVersion); + } + + /// Traces source for evaluator generation jobs — conversation traces from Application Insights. + /// Optional description of what this source represents — helps the pipeline interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities'). + /// The unique agent ID used to filter traces. Provide either `agent_id` or `agent_name` — at least one is required. + /// The agent name to fetch traces for. Provide either `agent_id` or `agent_name` — at least one is required. + /// The agent version. If not specified, traces for ALL versions of the agent are included within the time window. + /// Start of the time window (Unix timestamp in seconds) for fetching traces. + /// End of the time window (Unix timestamp in seconds). Defaults to current time. + /// A new instance for mocking. + public static TracesEvaluatorGenerationJobSource TracesEvaluatorGenerationJobSource(string description = default, string agentId = default, string agentName = default, string agentVersion = default, DateTimeOffset startTime = default, DateTimeOffset? endTime = default) + { + return new TracesEvaluatorGenerationJobSource( + EvaluatorGenerationJobSourceType.Traces, + additionalBinaryDataProperties: null, + description, + agentId, + agentName, + agentVersion, + startTime, + endTime); + } + + /// Dataset source for evaluator generation jobs — reference to a dataset. + /// Optional description of what this source represents — helps the pipeline interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities'). + /// The name of the dataset. + /// The version of the dataset. If not specified, the latest version is used. + /// A new instance for mocking. + public static DatasetEvaluatorGenerationJobSource DatasetEvaluatorGenerationJobSource(string description = default, string name = default, string version = default) + { + return new DatasetEvaluatorGenerationJobSource(EvaluatorGenerationJobSourceType.Dataset, additionalBinaryDataProperties: null, description, name, version); + } + + /// Token consumption summary for an evaluator generation job. Populated when the job reaches a terminal state. + /// Number of input (prompt) tokens consumed. + /// Number of output (completion) tokens generated. + /// Total tokens consumed (input + output). + /// A new instance for mocking. + public static EvaluatorGenerationTokenUsage EvaluatorGenerationTokenUsage(long inputTokens = default, long outputTokens = default, long totalTokens = default) + { + return new EvaluatorGenerationTokenUsage(inputTokens, outputTokens, totalTokens, additionalBinaryDataProperties: null); + } + /// The response body for cluster insights. /// The unique identifier for the insights report. /// Metadata about the insights report. @@ -1271,10 +1421,18 @@ public static ScheduleRun ScheduleRun(string runId = default, string scheduleId /// Whether to enable user profile extraction and storage. Default is true. /// Specific categories or types of user profile information to extract and store. /// Whether to enable chat summary extraction and storage. Default is true. + /// Whether to enable procedural memory extraction and storage. Default is true. + /// The default time-to-live for memories in seconds. A value of 0 indicates that memories do not expire. /// A new instance for mocking. - public static MemoryStoreDefaultOptions MemoryStoreDefaultOptions(bool isUserProfileEnabled = default, string userProfileDetails = default, bool isChatSummaryEnabled = default) - { - return new MemoryStoreDefaultOptions(isUserProfileEnabled, userProfileDetails, isChatSummaryEnabled, additionalBinaryDataProperties: null); + public static MemoryStoreDefaultOptions MemoryStoreDefaultOptions(bool isUserProfileEnabled = default, string userProfileDetails = default, bool isChatSummaryEnabled = default, bool? proceduralMemoryEnabled = default, TimeSpan? defaultTtlSeconds = default) + { + return new MemoryStoreDefaultOptions( + isUserProfileEnabled, + userProfileDetails, + isChatSummaryEnabled, + proceduralMemoryEnabled, + defaultTtlSeconds, + additionalBinaryDataProperties: null); } /// A memory store that can store and retrieve user memories. @@ -1336,14 +1494,6 @@ public static InputFileContentParam InputFileContentParam(string fileId = defaul additionalBinaryDataProperties: null); } - /// Memory search options. - /// Maximum number of memory items to return. - /// A new instance for mocking. - public static MemorySearchResultOptions MemorySearchResultOptions(int? maxMemories = default) - { - return new MemorySearchResultOptions(maxMemories, additionalBinaryDataProperties: null); - } - /// Memory search response. /// The unique ID of this search request. Use this value as previous_search_id in subsequent requests to perform incremental searches. /// Related memory items found during the search operation. @@ -1366,7 +1516,7 @@ public static MemorySearchItem MemorySearchItem(MemoryItem memoryItem = default) /// /// A single memory item stored in the memory store, containing content and metadata. - /// Please note this is the abstract base class. The derived classes available for instantiation are: and . + /// Please note this is the abstract base class. The derived classes available for instantiation are: , , and . /// /// The unique ID of the memory item. /// The last update time of the memory item. @@ -1419,6 +1569,23 @@ public static ChatSummaryMemoryItem ChatSummaryMemoryItem(string memoryId = defa additionalBinaryDataProperties: null); } + /// A memory item containing a procedure extracted from conversations. + /// The unique ID of the memory item. + /// The last update time of the memory item. + /// The namespace that logically groups and isolates memories, such as a user ID. + /// The content of the memory. + /// A new instance for mocking. + public static ProceduralMemoryItem ProceduralMemoryItem(string memoryId = default, DateTimeOffset updatedAt = default, string scope = default, string content = default) + { + return new ProceduralMemoryItem( + memoryId, + updatedAt, + scope, + content, + MemoryItemKind.Procedural, + additionalBinaryDataProperties: null); + } + /// Usage statistics of a memory store operation. /// The number of embedding tokens. /// The number of input tokens. @@ -1486,13 +1653,444 @@ public static MemoryStoreDeleteScopeResponse MemoryStoreDeleteScopeResponse(stri } /// Response for deleting a memory item from a memory store. - /// The name of the memory store. /// The unique ID of the deleted memory item. /// Whether the memory item was successfully deleted. /// A new instance for mocking. - public static DeleteMemoryResponse DeleteMemoryResponse(string name = default, string memoryId = default, bool deleted = default) + public static DeleteMemoryResponse DeleteMemoryResponse(string memoryId = default, bool deleted = default) + { + return new DeleteMemoryResponse("memory_store.item.deleted", memoryId, deleted, additionalBinaryDataProperties: null); + } + + /// + /// Base model for a routine trigger. + /// Please note this is the abstract base class. The derived classes available for instantiation are: , , and . + /// + /// The trigger type. + /// A new instance for mocking. + public static RoutineTrigger RoutineTrigger(string @type = default) + { + return new UnknownRoutineTrigger(new RoutineTriggerType(@type), additionalBinaryDataProperties: null); + } + + /// A recurring cron-based routine trigger. + /// A 5-field cron expression. The service enforces a minimum interval of five minutes by default. + /// An IANA or Windows time zone identifier for the schedule. + /// A new instance for mocking. + public static ScheduleRoutineTrigger ScheduleRoutineTrigger(string cronExpression = default, string timeZone = default) { - return new DeleteMemoryResponse("memory.deleted", name, memoryId, deleted, additionalBinaryDataProperties: null); + return new ScheduleRoutineTrigger(RoutineTriggerType.Schedule, additionalBinaryDataProperties: null, cronExpression, timeZone); + } + + /// A one-shot timer routine trigger. + /// A future timer expression. Supported values include an ISO-8601 timestamp with an explicit offset, a local timestamp paired with time_zone, or a positive duration from now. + /// An optional IANA or Windows time zone identifier when the timer uses a local timestamp. + /// A new instance for mocking. + public static TimerRoutineTrigger TimerRoutineTrigger(string at = default, string timeZone = default) + { + return new TimerRoutineTrigger(RoutineTriggerType.Timer, additionalBinaryDataProperties: null, at, timeZone); + } + + /// A GitHub issue-opened routine trigger. + /// The workspace connection identifier that resolves the GitHub configuration for the trigger. + /// The GitHub assignee or organization filter that scopes which issues can fire the trigger. + /// The GitHub repository filter that scopes which issues can fire the trigger. + /// A new instance for mocking. + public static GitHubIssueOpenedRoutineTrigger GitHubIssueOpenedRoutineTrigger(string connectionId = default, string assignee = default, string repository = default) + { + return new GitHubIssueOpenedRoutineTrigger(RoutineTriggerType.GithubIssueOpened, additionalBinaryDataProperties: null, connectionId, assignee, repository); + } + + /// + /// Base model for a routine action. + /// Please note this is the abstract base class. The derived classes available for instantiation are: and . + /// + /// The action type. + /// A new instance for mocking. + public static RoutineAction RoutineAction(string @type = default) + { + return new UnknownRoutineAction(new RoutineActionType(@type), additionalBinaryDataProperties: null); + } + + /// Dispatches a routine through the responses API. Exactly one of agent_name or agent_endpoint_id must be provided. + /// The project-scoped agent name for responses API dispatch. + /// The endpoint-scoped agent identifier for responses API dispatch. + /// An optional existing conversation identifier to continue during the downstream dispatch. + /// A new instance for mocking. + public static InvokeAgentResponsesApiRoutineAction InvokeAgentResponsesApiRoutineAction(string agentName = default, string agentEndpointId = default, string conversationId = default) + { + return new InvokeAgentResponsesApiRoutineAction(RoutineActionType.InvokeAgentResponsesApi, additionalBinaryDataProperties: null, agentName, agentEndpointId, conversationId); + } + + /// Dispatches a routine through the raw invocations API. + /// The endpoint-scoped agent identifier for invocations API dispatch. + /// An optional existing hosted-agent session identifier to continue during the downstream dispatch. + /// A new instance for mocking. + public static InvokeAgentInvocationsApiRoutineAction InvokeAgentInvocationsApiRoutineAction(string agentEndpointId = default, string sessionId = default) + { + return new InvokeAgentInvocationsApiRoutineAction(RoutineActionType.InvokeAgentInvocationsApi, additionalBinaryDataProperties: null, agentEndpointId, sessionId); + } + + /// A routine definition returned by the service. + /// The routine name. + /// A human-readable description of the routine. + /// Whether the routine is enabled. + /// The triggers configured for the routine. + /// The action executed when the routine fires. + /// The time when the routine was created. + /// The time when the routine was last updated. + /// A new instance for mocking. + public static ProjectsRoutine ProjectsRoutine(string name = default, string description = default, bool enabled = default, IDictionary triggers = default, RoutineAction action = default, DateTimeOffset? createdAt = default, DateTimeOffset? updatedAt = default) + { + triggers ??= new ChangeTrackingDictionary(); + + return new ProjectsRoutine( + name, + description, + enabled, + triggers, + action, + createdAt, + updatedAt, + additionalBinaryDataProperties: null); + } + + /// A single routine run returned from the run history API. + /// The MLflow run identifier for the routine attempt. + /// The underlying MLflow run status. + /// The AgentExtensions lifecycle phase for the routine attempt. + /// The trigger type that produced the routine attempt. + /// The source path that created the routine attempt. + /// The action type dispatched for the routine attempt. + /// The logical trigger time recorded for the routine attempt. + /// The time when the underlying run started. + /// The time when the underlying run reached a terminal state. + /// The dispatch identifier associated with the routine attempt. + /// The downstream action correlation identifier, when available. + /// The downstream response or invocation identifier, when available. + /// The workspace task identifier linked to the routine attempt, when available. + /// The fully qualified error type captured for a failed attempt, when available. + /// The truncated failure message captured for a failed attempt, when available. + /// Diagnostic data captured for the routine attempt. + /// A new instance for mocking. + public static RoutineRun RoutineRun(string id = default, string status = default, RoutineRunPhase? phase = default, RoutineTriggerType triggerType = default, RoutineAttemptSource? attemptSource = default, RoutineActionType? actionType = default, DateTimeOffset? triggeredAt = default, DateTimeOffset startedAt = default, DateTimeOffset? endedAt = default, string dispatchId = default, string actionCorrelationId = default, string responseId = default, string taskId = default, string errorType = default, string errorMessage = default, RoutineRunDiagnostics diagnostics = default) + { + return new RoutineRun( + id, + status, + phase, + triggerType, + attemptSource, + actionType, + triggeredAt, + startedAt, + endedAt, + dispatchId, + actionCorrelationId, + responseId, + taskId, + errorType, + errorMessage, + diagnostics, + additionalBinaryDataProperties: null); + } + + /// Generic diagnostics captured on a routine run. + /// MLflow parameters recorded on the run, keyed by parameter name. + /// MLflow tags recorded on the run, keyed by tag name. + /// Latest MLflow metric values recorded on the run, keyed by metric name. + /// A new instance for mocking. + public static RoutineRunDiagnostics RoutineRunDiagnostics(IDictionary parameters = default, IDictionary tags = default, IDictionary metrics = default) + { + parameters ??= new ChangeTrackingDictionary(); + tags ??= new ChangeTrackingDictionary(); + metrics ??= new ChangeTrackingDictionary(); + + return new RoutineRunDiagnostics(parameters, tags, metrics, additionalBinaryDataProperties: null); + } + + /// + /// Base model for a manual dispatch payload. + /// Please note this is the abstract base class. The derived classes available for instantiation are: and . + /// + /// The manual dispatch payload type. + /// A new instance for mocking. + public static RoutineDispatchPayload RoutineDispatchPayload(string @type = default) + { + return new UnknownRoutineDispatchPayload(new RoutineDispatchPayloadType(@type), additionalBinaryDataProperties: null); + } + + /// A manual payload used to test a responses API routine dispatch. + /// The user input sent to the downstream responses target. + /// A new instance for mocking. + public static InvokeAgentResponsesApiDispatchPayload InvokeAgentResponsesApiDispatchPayload(string input = default) + { + return new InvokeAgentResponsesApiDispatchPayload(RoutineDispatchPayloadType.InvokeAgentResponsesApi, additionalBinaryDataProperties: null, input); + } + + /// A manual payload used to test an invocations API routine dispatch. + /// The raw input sent to the downstream invocations target. + /// A new instance for mocking. + public static InvokeAgentInvocationsApiDispatchPayload InvokeAgentInvocationsApiDispatchPayload(string input = default) + { + return new InvokeAgentInvocationsApiDispatchPayload(RoutineDispatchPayloadType.InvokeAgentInvocationsApi, additionalBinaryDataProperties: null, input); + } + + /// Identifiers returned after a routine dispatch is queued. + /// The dispatch identifier created for the routine dispatch. + /// A downstream action correlation identifier, when available. + /// A workspace task identifier created for the dispatch, when available. + /// A new instance for mocking. + public static DispatchRoutineResponse DispatchRoutineResponse(string dispatchId = default, string actionCorrelationId = default, string taskId = default) + { + return new DispatchRoutineResponse(dispatchId, actionCorrelationId, taskId, additionalBinaryDataProperties: null); + } + + /// Caller-supplied inputs for a data generation job. + /// The display name of the data generation job. + /// The sources used for the data generation job. + /// The options for the data generation job. + /// The scenario of the data generation job. Either for fine-tuning or evaluation. + /// Optional caller-supplied metadata for the job's output. See individual fields for whether they apply to file outputs (fine-tuning scenarios), dataset outputs (evaluation scenario), or both. + /// A new instance for mocking. + public static DataGenerationJobInputs DataGenerationJobInputs(string name = default, IEnumerable sources = default, DataGenerationJobOptions options = default, DataGenerationJobScenario scenario = default, DataGenerationJobOutputOptions outputOptions = default) + { + sources ??= new ChangeTrackingList(); + + return new DataGenerationJobInputs( + name, + sources.ToList(), + options, + scenario, + outputOptions, + additionalBinaryDataProperties: null); + } + + /// + /// The base source model for data generation jobs. + /// Please note this is the abstract base class. The derived classes available for instantiation are: , , , , and . + /// + /// The type of source. + /// Optional description of what this source represents — helps the pipeline interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities'). + /// A new instance for mocking. + public static DataGenerationJobSource DataGenerationJobSource(string @type = default, string description = default) + { + return new UnknownDataGenerationJobSource(new DataGenerationJobSourceType(@type), description, additionalBinaryDataProperties: null); + } + + /// Prompt source for data generation jobs — inline text provided by the user. + /// Optional description of what this source represents — helps the pipeline interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities'). + /// Inline prompt text (e.g., agent description, policy text, supplementary context). + /// A new instance for mocking. + public static PromptDataGenerationJobSource PromptDataGenerationJobSource(string description = default, string prompt = default) + { + return new PromptDataGenerationJobSource(DataGenerationJobSourceType.Prompt, additionalBinaryDataProperties: null, description, prompt); + } + + /// Agent source for data generation jobs — references an agent to fetch instructions and metadata from. + /// Optional description of what this source represents — helps the pipeline interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities'). + /// The agent name to fetch instructions from. + /// The agent version. If not specified, the latest version is used. + /// A new instance for mocking. + public static AgentDataGenerationJobSource AgentDataGenerationJobSource(string description = default, string agentName = default, string agentVersion = default) + { + return new AgentDataGenerationJobSource(DataGenerationJobSourceType.Agent, additionalBinaryDataProperties: null, description, agentName, agentVersion); + } + + /// Traces source for data generation jobs — conversation traces from Application Insights. + /// Optional description of what this source represents — helps the pipeline interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities'). + /// The unique agent ID used to filter traces. Provide either `agent_id` or `agent_name` — at least one is required. + /// The agent name to fetch traces for. Provide either `agent_id` or `agent_name` — at least one is required. + /// The agent version. If not specified, traces for ALL versions of the agent are included within the time window. + /// Start of the time window (Unix timestamp in seconds) for fetching traces. + /// End of the time window (Unix timestamp in seconds). Defaults to current time. + /// A new instance for mocking. + public static TracesDataGenerationJobSource TracesDataGenerationJobSource(string description = default, string agentId = default, string agentName = default, string agentVersion = default, DateTimeOffset startTime = default, DateTimeOffset? endTime = default) + { + return new TracesDataGenerationJobSource( + DataGenerationJobSourceType.Traces, + additionalBinaryDataProperties: null, + description, + agentId, + agentName, + agentVersion, + startTime, + endTime); + } + + /// Dataset source for data generation jobs — reference to a dataset. + /// Optional description of what this source represents — helps the pipeline interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities'). + /// The name of the dataset. + /// The version of the dataset. If not specified, the latest version is used. + /// A new instance for mocking. + public static DatasetDataGenerationJobSource DatasetDataGenerationJobSource(string description = default, string name = default, string version = default) + { + return new DatasetDataGenerationJobSource(DataGenerationJobSourceType.Dataset, additionalBinaryDataProperties: null, description, name, version); + } + + /// File source for data generation jobs — Azure OpenAI file input. + /// Optional description of what this source represents — helps the pipeline interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities'). + /// Input Azure Open AI file id used for data generation. + /// A new instance for mocking. + public static FileDataGenerationJobSource FileDataGenerationJobSource(string description = default, string id = default) + { + return new FileDataGenerationJobSource(DataGenerationJobSourceType.File, description, additionalBinaryDataProperties: null, id); + } + + /// + /// Options for managing data generation jobs. + /// Please note this is the abstract base class. The derived classes available for instantiation are: , , and . + /// + /// The data generation job type. + /// Maximum number of samples to generate. + /// The proportion of the generated data to be used for training when the data is used for fine-tuning. The rest will be used for validation. Value should be between 0 and 1. + /// The LLM model options. + /// A new instance for mocking. + public static DataGenerationJobOptions DataGenerationJobOptions(string @type = default, int maxSamples = default, float? trainSplit = default, DataGenerationModelOptions modelOptions = default) + { + return new UnknownDataGenerationJobOptions(new DataGenerationJobKind(@type), maxSamples, trainSplit, modelOptions, additionalBinaryDataProperties: null); + } + + /// LLM model options for data generation jobs. + /// Base model name used to generate data. + /// A new instance for mocking. + public static DataGenerationModelOptions DataGenerationModelOptions(string model = default) + { + return new DataGenerationModelOptions(model, additionalBinaryDataProperties: null); + } + + /// The options for a data generation job with SimpleQnA type. + /// Maximum number of samples to generate. + /// The proportion of the generated data to be used for training when the data is used for fine-tuning. The rest will be used for validation. Value should be between 0 and 1. + /// The LLM model options. + /// The question types to generate. Used only for fine-tuning scenarios. + /// A new instance for mocking. + public static SimpleQnADataGenerationJobOptions SimpleQnADataGenerationJobOptions(int maxSamples = default, float? trainSplit = default, DataGenerationModelOptions modelOptions = default, IEnumerable questionTypes = default) + { + questionTypes ??= new ChangeTrackingList(); + + return new SimpleQnADataGenerationJobOptions( + DataGenerationJobKind.SimpleQna, + maxSamples, + trainSplit, + modelOptions, + additionalBinaryDataProperties: null, + questionTypes.ToList()); + } + + /// The options for a data generation job with Traces type. + /// Maximum number of samples to generate. + /// The proportion of the generated data to be used for training when the data is used for fine-tuning. The rest will be used for validation. Value should be between 0 and 1. + /// The LLM model options. + /// A new instance for mocking. + public static TracesDataGenerationJobOptions TracesDataGenerationJobOptions(int maxSamples = default, float? trainSplit = default, DataGenerationModelOptions modelOptions = default) + { + return new TracesDataGenerationJobOptions(DataGenerationJobKind.Traces, maxSamples, trainSplit, modelOptions, additionalBinaryDataProperties: null); + } + + /// The options for a data generation job with ToolUse type. Used only for fine-tuning scenarios. + /// Maximum number of samples to generate. + /// The proportion of the generated data to be used for training when the data is used for fine-tuning. The rest will be used for validation. Value should be between 0 and 1. + /// The LLM model options. + /// A new instance for mocking. + public static ToolUseFineTuningDataGenerationJobOptions ToolUseFineTuningDataGenerationJobOptions(int maxSamples = default, float? trainSplit = default, DataGenerationModelOptions modelOptions = default) + { + return new ToolUseFineTuningDataGenerationJobOptions(DataGenerationJobKind.ToolUse, maxSamples, trainSplit, modelOptions, additionalBinaryDataProperties: null); + } + + /// Output options for data generation job. + /// Name to assign to the output. Used as the filename for Azure OpenAI file outputs (fine-tuning scenarios) and as the dataset name for dataset outputs (evaluation scenario). + /// Description to assign to the output. Applies only to dataset outputs (evaluation scenario); ignored for Azure OpenAI file outputs. + /// Tags to assign to the output. Applies only to dataset outputs (evaluation scenario); ignored for Azure OpenAI file outputs. + /// A new instance for mocking. + public static DataGenerationJobOutputOptions DataGenerationJobOutputOptions(string name = default, string description = default, IDictionary tags = default) + { + tags ??= new ChangeTrackingDictionary(); + + return new DataGenerationJobOutputOptions(name, description, tags, additionalBinaryDataProperties: null); + } + + /// Result produced by a successful data generation job. + /// The final job outputs: Azure OpenAI files for fine-tuning, or datasets for evaluation. + /// The number of samples actually generated. + /// The token usage information for the data generation job. + /// A new instance for mocking. + public static DataGenerationJobResult DataGenerationJobResult(IEnumerable outputs = default, int generatedSamples = default, DataGenerationTokenUsage tokenUsage = default) + { + outputs ??= new ChangeTrackingList(); + + return new DataGenerationJobResult(outputs.ToList(), generatedSamples, tokenUsage, additionalBinaryDataProperties: null); + } + + /// + /// Output information for a data generation job. + /// Please note this is the abstract base class. The derived classes available for instantiation are: and . + /// + /// The type of the output. + /// A new instance for mocking. + public static DataGenerationJobOutput DataGenerationJobOutput(string @type = default) + { + return new UnknownDataGenerationJobOutput(new DataGenerationJobOutputType(@type), additionalBinaryDataProperties: null); + } + + /// Azure OpenAI file output for a data generation job. + /// The id of the output Azure OpenAI file. + /// The filename of the output Azure OpenAI file. + /// A new instance for mocking. + public static FileDataGenerationJobOutput FileDataGenerationJobOutput(string id = default, string filename = default) + { + return new FileDataGenerationJobOutput(DataGenerationJobOutputType.File, additionalBinaryDataProperties: null, id, filename); + } + + /// Dataset output for a data generation job. + /// The id of the output dataset created. + /// The name of the output dataset. + /// The version of the output dataset. + /// Description of the output dataset. + /// Tag dictionary of the output dataset. + /// A new instance for mocking. + public static DatasetDataGenerationJobOutput DatasetDataGenerationJobOutput(string id = default, string name = default, string version = default, string description = default, IReadOnlyDictionary tags = default) + { + tags ??= new ChangeTrackingDictionary(); + + return new DatasetDataGenerationJobOutput( + DataGenerationJobOutputType.Dataset, + additionalBinaryDataProperties: null, + id, + name, + version, + description, + tags); + } + + /// Token usage information for a data generation job. + /// The number of prompt tokens used. + /// The number of completion tokens generated. + /// Total number of tokens used. + /// A new instance for mocking. + public static DataGenerationTokenUsage DataGenerationTokenUsage(long promptTokens = default, long completionTokens = default, long totalTokens = default) + { + return new DataGenerationTokenUsage(promptTokens, completionTokens, totalTokens, additionalBinaryDataProperties: null); + } + + /// Evaluator Definition. + /// Display Name for evaluator. It helps to find the evaluator easily in AI Foundry. It does not need to be unique. + /// Metadata about the evaluator. + /// The type of the evaluator. + /// The categories of the evaluator. + /// Definition of the evaluator. + /// Creator of the evaluator. + /// Creation date/time of the evaluator. + /// Last modified date/time of the evaluator. + /// Asset ID, a unique identifier for the asset. + /// The name of the resource. + /// The version of the resource. + /// The asset description text. + /// Tag dictionary. Tags can be added, removed, and updated. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static EvaluatorVersion EvaluatorVersion(string displayName, IDictionary metadata, EvaluatorType evaluatorType, IEnumerable categories, EvaluatorDefinition definition, string createdBy, string createdAt, string modifiedAt, string id, string name, string version, string description, IDictionary tags) + { + return EvaluatorVersion(displayName: displayName, metadata: metadata, evaluatorType: evaluatorType, categories: categories, definition: definition, generationArtifacts: default, createdBy: createdBy, createdAt: createdAt, modifiedAt: modifiedAt, id: id, name: name, version: version, description: description, tags: tags); } /// Evaluator Metric. @@ -1520,6 +2118,17 @@ public static CodeBasedEvaluatorDefinition CodeBasedEvaluatorDefinition(BinaryDa return CodeBasedEvaluatorDefinition(initParameters: initParameters, dataSchema: dataSchema, metrics: metrics, codeText: codeText, entryPoint: default, imageTag: default, blobUri: default); } + /// Default memory store configurations. + /// Whether to enable user profile extraction and storage. Default is true. + /// Specific categories or types of user profile information to extract and store. + /// Whether to enable chat summary extraction and storage. Default is true. + /// A new instance for mocking. + [EditorBrowsable(EditorBrowsableState.Never)] + public static MemoryStoreDefaultOptions MemoryStoreDefaultOptions(bool isUserProfileEnabled, string userProfileDetails, bool isChatSummaryEnabled) + { + return MemoryStoreDefaultOptions(isUserProfileEnabled: isUserProfileEnabled, userProfileDetails: userProfileDetails, isChatSummaryEnabled: isChatSummaryEnabled, proceduralMemoryEnabled: default, defaultTtlSeconds: default); + } + /// Represents a request for a pending upload. /// If PendingUploadId is not provided, a random GUID will be used. /// Azure Storage Account connection name to use for generating temporary SAS token. diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CollectionResults/AIProjectMemoryStoresGetMemoriesAsyncCollectionResult.cs b/sdk/ai/Azure.AI.Projects/src/Generated/CollectionResults/AIProjectMemoryStoresGetMemoriesAsyncCollectionResult.cs index b9a75b3900b6..d43aa8c06e3b 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/CollectionResults/AIProjectMemoryStoresGetMemoriesAsyncCollectionResult.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/CollectionResults/AIProjectMemoryStoresGetMemoriesAsyncCollectionResult.cs @@ -15,6 +15,8 @@ internal partial class AIProjectMemoryStoresGetMemoriesAsyncCollectionResult : A { private readonly AIProjectMemoryStores _client; private readonly string _name; + private readonly BinaryContent _content; + private readonly string _kind; private readonly int? _limit; private readonly string _order; private readonly string _after; @@ -24,6 +26,8 @@ internal partial class AIProjectMemoryStoresGetMemoriesAsyncCollectionResult : A /// Initializes a new instance of AIProjectMemoryStoresGetMemoriesAsyncCollectionResult, which is used to iterate over the pages of a collection. /// The AIProjectMemoryStores client used to send requests. /// The name of the memory store. + /// The content to send as the body of the request. + /// The kind of the memory item. /// /// A limit on the number of objects to be returned. Limit can range between 1 and 100, and the /// default is 20. @@ -43,10 +47,12 @@ internal partial class AIProjectMemoryStoresGetMemoriesAsyncCollectionResult : A /// subsequent call can include before=obj_foo in order to fetch the previous page of the list. /// /// The request options, which can override default behaviors of the client pipeline on a per-call basis. - public AIProjectMemoryStoresGetMemoriesAsyncCollectionResult(AIProjectMemoryStores client, string name, int? limit, string order, string after, string before, RequestOptions options) + public AIProjectMemoryStoresGetMemoriesAsyncCollectionResult(AIProjectMemoryStores client, string name, BinaryContent content, string kind, int? limit, string order, string after, string before, RequestOptions options) { _client = client; _name = name; + _content = content; + _kind = kind; _limit = limit; _order = order; _after = after; @@ -58,7 +64,7 @@ public AIProjectMemoryStoresGetMemoriesAsyncCollectionResult(AIProjectMemoryStor /// The raw pages of the collection. public override async IAsyncEnumerable GetRawPagesAsync() { - PipelineMessage message = _client.CreateGetMemoriesRequest(_name, _limit, _order, _after, _before, _options); + PipelineMessage message = _client.CreateGetMemoriesRequest(_name, _content, _kind, _limit, _order, _after, _before, _options); string nextToken = null; while (true) { @@ -70,7 +76,7 @@ public override async IAsyncEnumerable GetRawPagesAsync() { yield break; } - message = _client.CreateGetMemoriesRequest(_name, _limit, _order, nextToken, _before, _options); + message = _client.CreateGetMemoriesRequest(_name, _content, _kind, _limit, _order, nextToken, _before, _options); } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CollectionResults/AIProjectRoutinesGetRoutineRunsAsyncCollectionResult.cs b/sdk/ai/Azure.AI.Projects/src/Generated/CollectionResults/AIProjectRoutinesGetRoutineRunsAsyncCollectionResult.cs new file mode 100644 index 000000000000..6511fbba3941 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/CollectionResults/AIProjectRoutinesGetRoutineRunsAsyncCollectionResult.cs @@ -0,0 +1,105 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Threading.Tasks; + +namespace Azure.AI.Projects +{ + internal partial class AIProjectRoutinesGetRoutineRunsAsyncCollectionResult : AsyncCollectionResult + { + private readonly AIProjectRoutines _client; + private readonly string _routineName; + private readonly string _foundryFeatures; + private readonly string _filter; + private readonly int? _limit; + private readonly string _order; + private readonly string _after; + private readonly string _before; + private readonly RequestOptions _options; + + /// Initializes a new instance of AIProjectRoutinesGetRoutineRunsAsyncCollectionResult, which is used to iterate over the pages of a collection. + /// The AIProjectRoutines client used to send requests. + /// The unique name of the routine. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// An optional MLflow search-runs filter expression applied within the routine's experiment. + /// + /// A limit on the number of objects to be returned. Limit can range between 1 and 100, and the + /// default is 20. + /// + /// + /// Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc` + /// for descending order. + /// + /// + /// 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 request options, which can override default behaviors of the client pipeline on a per-call basis. + public AIProjectRoutinesGetRoutineRunsAsyncCollectionResult(AIProjectRoutines client, string routineName, string foundryFeatures, string filter, int? limit, string order, string after, string before, RequestOptions options) + { + _client = client; + _routineName = routineName; + _foundryFeatures = foundryFeatures; + _filter = filter; + _limit = limit; + _order = order; + _after = after; + _before = before; + _options = options; + } + + /// Gets the raw pages of the collection. + /// The raw pages of the collection. + public override async IAsyncEnumerable GetRawPagesAsync() + { + PipelineMessage message = _client.CreateGetRoutineRunsRequest(_routineName, _foundryFeatures, _filter, _limit, _order, _after, _before, _options); + string nextToken = null; + while (true) + { + ClientResult result = await GetNextResponseAsync(message).ConfigureAwait(false); + yield return result; + + nextToken = ((AgentsPagedResultRoutineRun)result).LastId; + if (string.IsNullOrEmpty(nextToken)) + { + yield break; + } + message = _client.CreateGetRoutineRunsRequest(_routineName, _foundryFeatures, _filter, _limit, _order, nextToken, _before, _options); + } + } + + /// Gets the continuation token from the specified page. + /// + /// The continuation token for the specified page. + public override ContinuationToken GetContinuationToken(ClientResult page) + { + string nextPage = ((AgentsPagedResultRoutineRun)page).LastId; + if (!string.IsNullOrEmpty(nextPage)) + { + return ContinuationToken.FromBytes(BinaryData.FromString(nextPage)); + } + else + { + return null; + } + } + + /// Sends the request in the pipeline message and returns the response. + /// The pipeline message containing the request to send. + private async ValueTask GetNextResponseAsync(PipelineMessage message) + { + return ClientResult.FromResponse(await _client.Pipeline.ProcessMessageAsync(message, _options).ConfigureAwait(false)); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CollectionResults/AIProjectRoutinesGetRoutineRunsAsyncCollectionResultOfT.cs b/sdk/ai/Azure.AI.Projects/src/Generated/CollectionResults/AIProjectRoutinesGetRoutineRunsAsyncCollectionResultOfT.cs new file mode 100644 index 000000000000..c7f46097d566 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/CollectionResults/AIProjectRoutinesGetRoutineRunsAsyncCollectionResultOfT.cs @@ -0,0 +1,117 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Threading.Tasks; + +namespace Azure.AI.Projects +{ + internal partial class AIProjectRoutinesGetRoutineRunsAsyncCollectionResultOfT : AsyncCollectionResult + { + private readonly AIProjectRoutines _client; + private readonly string _routineName; + private readonly string _foundryFeatures; + private readonly string _filter; + private readonly int? _limit; + private readonly string _order; + private readonly string _after; + private readonly string _before; + private readonly RequestOptions _options; + + /// Initializes a new instance of AIProjectRoutinesGetRoutineRunsAsyncCollectionResultOfT, which is used to iterate over the pages of a collection. + /// The AIProjectRoutines client used to send requests. + /// The unique name of the routine. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// An optional MLflow search-runs filter expression applied within the routine's experiment. + /// + /// A limit on the number of objects to be returned. Limit can range between 1 and 100, and the + /// default is 20. + /// + /// + /// Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc` + /// for descending order. + /// + /// + /// 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 request options, which can override default behaviors of the client pipeline on a per-call basis. + public AIProjectRoutinesGetRoutineRunsAsyncCollectionResultOfT(AIProjectRoutines client, string routineName, string foundryFeatures, string filter, int? limit, string order, string after, string before, RequestOptions options) + { + _client = client; + _routineName = routineName; + _foundryFeatures = foundryFeatures; + _filter = filter; + _limit = limit; + _order = order; + _after = after; + _before = before; + _options = options; + } + + /// Gets the raw pages of the collection. + /// The raw pages of the collection. + public override async IAsyncEnumerable GetRawPagesAsync() + { + PipelineMessage message = _client.CreateGetRoutineRunsRequest(_routineName, _foundryFeatures, _filter, _limit, _order, _after, _before, _options); + string nextToken = null; + while (true) + { + ClientResult result = await GetNextResponseAsync(message).ConfigureAwait(false); + yield return result; + + nextToken = ((AgentsPagedResultRoutineRun)result).LastId; + if (string.IsNullOrEmpty(nextToken)) + { + yield break; + } + message = _client.CreateGetRoutineRunsRequest(_routineName, _foundryFeatures, _filter, _limit, _order, nextToken, _before, _options); + } + } + + /// Gets the continuation token from the specified page. + /// + /// The continuation token for the specified page. + public override ContinuationToken GetContinuationToken(ClientResult page) + { + string nextPage = ((AgentsPagedResultRoutineRun)page).LastId; + if (!string.IsNullOrEmpty(nextPage)) + { + return ContinuationToken.FromBytes(BinaryData.FromString(nextPage)); + } + else + { + return null; + } + } + + /// Gets the values from the specified page. + /// + /// The values from the specified page. + protected override async IAsyncEnumerable GetValuesFromPageAsync(ClientResult page) + { + foreach (RoutineRun item in ((AgentsPagedResultRoutineRun)page).Data) + { + yield return item; + await Task.Yield(); + } + } + + /// Sends the request in the pipeline message and returns the response. + /// The pipeline message containing the request to send. + private async ValueTask GetNextResponseAsync(PipelineMessage message) + { + return ClientResult.FromResponse(await _client.Pipeline.ProcessMessageAsync(message, _options).ConfigureAwait(false)); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CollectionResults/AIProjectRoutinesGetRoutineRunsCollectionResult.cs b/sdk/ai/Azure.AI.Projects/src/Generated/CollectionResults/AIProjectRoutinesGetRoutineRunsCollectionResult.cs new file mode 100644 index 000000000000..4f65058419ea --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/CollectionResults/AIProjectRoutinesGetRoutineRunsCollectionResult.cs @@ -0,0 +1,104 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + internal partial class AIProjectRoutinesGetRoutineRunsCollectionResult : CollectionResult + { + private readonly AIProjectRoutines _client; + private readonly string _routineName; + private readonly string _foundryFeatures; + private readonly string _filter; + private readonly int? _limit; + private readonly string _order; + private readonly string _after; + private readonly string _before; + private readonly RequestOptions _options; + + /// Initializes a new instance of AIProjectRoutinesGetRoutineRunsCollectionResult, which is used to iterate over the pages of a collection. + /// The AIProjectRoutines client used to send requests. + /// The unique name of the routine. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// An optional MLflow search-runs filter expression applied within the routine's experiment. + /// + /// A limit on the number of objects to be returned. Limit can range between 1 and 100, and the + /// default is 20. + /// + /// + /// Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc` + /// for descending order. + /// + /// + /// 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 request options, which can override default behaviors of the client pipeline on a per-call basis. + public AIProjectRoutinesGetRoutineRunsCollectionResult(AIProjectRoutines client, string routineName, string foundryFeatures, string filter, int? limit, string order, string after, string before, RequestOptions options) + { + _client = client; + _routineName = routineName; + _foundryFeatures = foundryFeatures; + _filter = filter; + _limit = limit; + _order = order; + _after = after; + _before = before; + _options = options; + } + + /// Gets the raw pages of the collection. + /// The raw pages of the collection. + public override IEnumerable GetRawPages() + { + PipelineMessage message = _client.CreateGetRoutineRunsRequest(_routineName, _foundryFeatures, _filter, _limit, _order, _after, _before, _options); + string nextToken = null; + while (true) + { + ClientResult result = GetNextResponse(message); + yield return result; + + nextToken = ((AgentsPagedResultRoutineRun)result).LastId; + if (string.IsNullOrEmpty(nextToken)) + { + yield break; + } + message = _client.CreateGetRoutineRunsRequest(_routineName, _foundryFeatures, _filter, _limit, _order, nextToken, _before, _options); + } + } + + /// Gets the continuation token from the specified page. + /// + /// The continuation token for the specified page. + public override ContinuationToken GetContinuationToken(ClientResult page) + { + string nextPage = ((AgentsPagedResultRoutineRun)page).LastId; + if (!string.IsNullOrEmpty(nextPage)) + { + return ContinuationToken.FromBytes(BinaryData.FromString(nextPage)); + } + else + { + return null; + } + } + + /// Sends the request in the pipeline message and returns the response. + /// The pipeline message containing the request to send. + private ClientResult GetNextResponse(PipelineMessage message) + { + return ClientResult.FromResponse(_client.Pipeline.ProcessMessage(message, _options)); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CollectionResults/AIProjectRoutinesGetRoutineRunsCollectionResultOfT.cs b/sdk/ai/Azure.AI.Projects/src/Generated/CollectionResults/AIProjectRoutinesGetRoutineRunsCollectionResultOfT.cs new file mode 100644 index 000000000000..e72637013777 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/CollectionResults/AIProjectRoutinesGetRoutineRunsCollectionResultOfT.cs @@ -0,0 +1,112 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + internal partial class AIProjectRoutinesGetRoutineRunsCollectionResultOfT : CollectionResult + { + private readonly AIProjectRoutines _client; + private readonly string _routineName; + private readonly string _foundryFeatures; + private readonly string _filter; + private readonly int? _limit; + private readonly string _order; + private readonly string _after; + private readonly string _before; + private readonly RequestOptions _options; + + /// Initializes a new instance of AIProjectRoutinesGetRoutineRunsCollectionResultOfT, which is used to iterate over the pages of a collection. + /// The AIProjectRoutines client used to send requests. + /// The unique name of the routine. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// An optional MLflow search-runs filter expression applied within the routine's experiment. + /// + /// A limit on the number of objects to be returned. Limit can range between 1 and 100, and the + /// default is 20. + /// + /// + /// Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc` + /// for descending order. + /// + /// + /// 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 request options, which can override default behaviors of the client pipeline on a per-call basis. + public AIProjectRoutinesGetRoutineRunsCollectionResultOfT(AIProjectRoutines client, string routineName, string foundryFeatures, string filter, int? limit, string order, string after, string before, RequestOptions options) + { + _client = client; + _routineName = routineName; + _foundryFeatures = foundryFeatures; + _filter = filter; + _limit = limit; + _order = order; + _after = after; + _before = before; + _options = options; + } + + /// Gets the raw pages of the collection. + /// The raw pages of the collection. + public override IEnumerable GetRawPages() + { + PipelineMessage message = _client.CreateGetRoutineRunsRequest(_routineName, _foundryFeatures, _filter, _limit, _order, _after, _before, _options); + string nextToken = null; + while (true) + { + ClientResult result = GetNextResponse(message); + yield return result; + + nextToken = ((AgentsPagedResultRoutineRun)result).LastId; + if (string.IsNullOrEmpty(nextToken)) + { + yield break; + } + message = _client.CreateGetRoutineRunsRequest(_routineName, _foundryFeatures, _filter, _limit, _order, nextToken, _before, _options); + } + } + + /// Gets the continuation token from the specified page. + /// + /// The continuation token for the specified page. + public override ContinuationToken GetContinuationToken(ClientResult page) + { + string nextPage = ((AgentsPagedResultRoutineRun)page).LastId; + if (!string.IsNullOrEmpty(nextPage)) + { + return ContinuationToken.FromBytes(BinaryData.FromString(nextPage)); + } + else + { + return null; + } + } + + /// Gets the values from the specified page. + /// + /// The values from the specified page. + protected override IEnumerable GetValuesFromPage(ClientResult page) + { + return ((AgentsPagedResultRoutineRun)page).Data; + } + + /// Sends the request in the pipeline message and returns the response. + /// The pipeline message containing the request to send. + private ClientResult GetNextResponse(PipelineMessage message) + { + return ClientResult.FromResponse(_client.Pipeline.ProcessMessage(message, _options)); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CollectionResults/AIProjectRoutinesGetRoutinesAsyncCollectionResult.cs b/sdk/ai/Azure.AI.Projects/src/Generated/CollectionResults/AIProjectRoutinesGetRoutinesAsyncCollectionResult.cs new file mode 100644 index 000000000000..d48bc9bda819 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/CollectionResults/AIProjectRoutinesGetRoutinesAsyncCollectionResult.cs @@ -0,0 +1,99 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Threading.Tasks; + +namespace Azure.AI.Projects +{ + internal partial class AIProjectRoutinesGetRoutinesAsyncCollectionResult : AsyncCollectionResult + { + private readonly AIProjectRoutines _client; + private readonly string _foundryFeatures; + private readonly int? _limit; + private readonly string _order; + private readonly string _after; + private readonly string _before; + private readonly RequestOptions _options; + + /// Initializes a new instance of AIProjectRoutinesGetRoutinesAsyncCollectionResult, which is used to iterate over the pages of a collection. + /// The AIProjectRoutines client used to send requests. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// + /// A limit on the number of objects to be returned. Limit can range between 1 and 100, and the + /// default is 20. + /// + /// + /// Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc` + /// for descending order. + /// + /// + /// 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 request options, which can override default behaviors of the client pipeline on a per-call basis. + public AIProjectRoutinesGetRoutinesAsyncCollectionResult(AIProjectRoutines client, string foundryFeatures, int? limit, string order, string after, string before, RequestOptions options) + { + _client = client; + _foundryFeatures = foundryFeatures; + _limit = limit; + _order = order; + _after = after; + _before = before; + _options = options; + } + + /// Gets the raw pages of the collection. + /// The raw pages of the collection. + public override async IAsyncEnumerable GetRawPagesAsync() + { + PipelineMessage message = _client.CreateGetRoutinesRequest(_foundryFeatures, _limit, _order, _after, _before, _options); + string nextToken = null; + while (true) + { + ClientResult result = await GetNextResponseAsync(message).ConfigureAwait(false); + yield return result; + + nextToken = ((AgentsPagedResultRoutine)result).LastId; + if (string.IsNullOrEmpty(nextToken)) + { + yield break; + } + message = _client.CreateGetRoutinesRequest(_foundryFeatures, _limit, _order, nextToken, _before, _options); + } + } + + /// Gets the continuation token from the specified page. + /// + /// The continuation token for the specified page. + public override ContinuationToken GetContinuationToken(ClientResult page) + { + string nextPage = ((AgentsPagedResultRoutine)page).LastId; + if (!string.IsNullOrEmpty(nextPage)) + { + return ContinuationToken.FromBytes(BinaryData.FromString(nextPage)); + } + else + { + return null; + } + } + + /// Sends the request in the pipeline message and returns the response. + /// The pipeline message containing the request to send. + private async ValueTask GetNextResponseAsync(PipelineMessage message) + { + return ClientResult.FromResponse(await _client.Pipeline.ProcessMessageAsync(message, _options).ConfigureAwait(false)); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CollectionResults/AIProjectRoutinesGetRoutinesAsyncCollectionResultOfT.cs b/sdk/ai/Azure.AI.Projects/src/Generated/CollectionResults/AIProjectRoutinesGetRoutinesAsyncCollectionResultOfT.cs new file mode 100644 index 000000000000..707057be9626 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/CollectionResults/AIProjectRoutinesGetRoutinesAsyncCollectionResultOfT.cs @@ -0,0 +1,111 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Threading.Tasks; + +namespace Azure.AI.Projects +{ + internal partial class AIProjectRoutinesGetRoutinesAsyncCollectionResultOfT : AsyncCollectionResult + { + private readonly AIProjectRoutines _client; + private readonly string _foundryFeatures; + private readonly int? _limit; + private readonly string _order; + private readonly string _after; + private readonly string _before; + private readonly RequestOptions _options; + + /// Initializes a new instance of AIProjectRoutinesGetRoutinesAsyncCollectionResultOfT, which is used to iterate over the pages of a collection. + /// The AIProjectRoutines client used to send requests. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// + /// A limit on the number of objects to be returned. Limit can range between 1 and 100, and the + /// default is 20. + /// + /// + /// Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc` + /// for descending order. + /// + /// + /// 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 request options, which can override default behaviors of the client pipeline on a per-call basis. + public AIProjectRoutinesGetRoutinesAsyncCollectionResultOfT(AIProjectRoutines client, string foundryFeatures, int? limit, string order, string after, string before, RequestOptions options) + { + _client = client; + _foundryFeatures = foundryFeatures; + _limit = limit; + _order = order; + _after = after; + _before = before; + _options = options; + } + + /// Gets the raw pages of the collection. + /// The raw pages of the collection. + public override async IAsyncEnumerable GetRawPagesAsync() + { + PipelineMessage message = _client.CreateGetRoutinesRequest(_foundryFeatures, _limit, _order, _after, _before, _options); + string nextToken = null; + while (true) + { + ClientResult result = await GetNextResponseAsync(message).ConfigureAwait(false); + yield return result; + + nextToken = ((AgentsPagedResultRoutine)result).LastId; + if (string.IsNullOrEmpty(nextToken)) + { + yield break; + } + message = _client.CreateGetRoutinesRequest(_foundryFeatures, _limit, _order, nextToken, _before, _options); + } + } + + /// Gets the continuation token from the specified page. + /// + /// The continuation token for the specified page. + public override ContinuationToken GetContinuationToken(ClientResult page) + { + string nextPage = ((AgentsPagedResultRoutine)page).LastId; + if (!string.IsNullOrEmpty(nextPage)) + { + return ContinuationToken.FromBytes(BinaryData.FromString(nextPage)); + } + else + { + return null; + } + } + + /// Gets the values from the specified page. + /// + /// The values from the specified page. + protected override async IAsyncEnumerable GetValuesFromPageAsync(ClientResult page) + { + foreach (ProjectsRoutine item in ((AgentsPagedResultRoutine)page).Data) + { + yield return item; + await Task.Yield(); + } + } + + /// Sends the request in the pipeline message and returns the response. + /// The pipeline message containing the request to send. + private async ValueTask GetNextResponseAsync(PipelineMessage message) + { + return ClientResult.FromResponse(await _client.Pipeline.ProcessMessageAsync(message, _options).ConfigureAwait(false)); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CollectionResults/AIProjectMemoryStoresGetMemoriesCollectionResult.cs b/sdk/ai/Azure.AI.Projects/src/Generated/CollectionResults/AIProjectRoutinesGetRoutinesCollectionResult.cs similarity index 72% rename from sdk/ai/Azure.AI.Projects/src/Generated/CollectionResults/AIProjectMemoryStoresGetMemoriesCollectionResult.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/CollectionResults/AIProjectRoutinesGetRoutinesCollectionResult.cs index 01fb196dda86..1319c61de7e5 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/CollectionResults/AIProjectMemoryStoresGetMemoriesCollectionResult.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/CollectionResults/AIProjectRoutinesGetRoutinesCollectionResult.cs @@ -6,23 +6,22 @@ using System.ClientModel; using System.ClientModel.Primitives; using System.Collections.Generic; -using Azure.AI.Projects; -namespace Azure.AI.Projects.Memory +namespace Azure.AI.Projects { - internal partial class AIProjectMemoryStoresGetMemoriesCollectionResult : CollectionResult + internal partial class AIProjectRoutinesGetRoutinesCollectionResult : CollectionResult { - private readonly AIProjectMemoryStores _client; - private readonly string _name; + private readonly AIProjectRoutines _client; + private readonly string _foundryFeatures; private readonly int? _limit; private readonly string _order; private readonly string _after; private readonly string _before; private readonly RequestOptions _options; - /// Initializes a new instance of AIProjectMemoryStoresGetMemoriesCollectionResult, which is used to iterate over the pages of a collection. - /// The AIProjectMemoryStores client used to send requests. - /// The name of the memory store. + /// Initializes a new instance of AIProjectRoutinesGetRoutinesCollectionResult, which is used to iterate over the pages of a collection. + /// The AIProjectRoutines client used to send requests. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. /// /// A limit on the number of objects to be returned. Limit can range between 1 and 100, and the /// default is 20. @@ -42,10 +41,10 @@ internal partial class AIProjectMemoryStoresGetMemoriesCollectionResult : Collec /// subsequent call can include before=obj_foo in order to fetch the previous page of the list. /// /// The request options, which can override default behaviors of the client pipeline on a per-call basis. - public AIProjectMemoryStoresGetMemoriesCollectionResult(AIProjectMemoryStores client, string name, int? limit, string order, string after, string before, RequestOptions options) + public AIProjectRoutinesGetRoutinesCollectionResult(AIProjectRoutines client, string foundryFeatures, int? limit, string order, string after, string before, RequestOptions options) { _client = client; - _name = name; + _foundryFeatures = foundryFeatures; _limit = limit; _order = order; _after = after; @@ -57,19 +56,19 @@ public AIProjectMemoryStoresGetMemoriesCollectionResult(AIProjectMemoryStores cl /// The raw pages of the collection. public override IEnumerable GetRawPages() { - PipelineMessage message = _client.CreateGetMemoriesRequest(_name, _limit, _order, _after, _before, _options); + PipelineMessage message = _client.CreateGetRoutinesRequest(_foundryFeatures, _limit, _order, _after, _before, _options); string nextToken = null; while (true) { ClientResult result = GetNextResponse(message); yield return result; - nextToken = ((AgentsPagedResultMemoryItem)result).LastId; + nextToken = ((AgentsPagedResultRoutine)result).LastId; if (string.IsNullOrEmpty(nextToken)) { yield break; } - message = _client.CreateGetMemoriesRequest(_name, _limit, _order, nextToken, _before, _options); + message = _client.CreateGetRoutinesRequest(_foundryFeatures, _limit, _order, nextToken, _before, _options); } } @@ -78,7 +77,7 @@ public override IEnumerable GetRawPages() /// The continuation token for the specified page. public override ContinuationToken GetContinuationToken(ClientResult page) { - string nextPage = ((AgentsPagedResultMemoryItem)page).LastId; + string nextPage = ((AgentsPagedResultRoutine)page).LastId; if (!string.IsNullOrEmpty(nextPage)) { return ContinuationToken.FromBytes(BinaryData.FromString(nextPage)); diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/CollectionResults/AIProjectRoutinesGetRoutinesCollectionResultOfT.cs b/sdk/ai/Azure.AI.Projects/src/Generated/CollectionResults/AIProjectRoutinesGetRoutinesCollectionResultOfT.cs new file mode 100644 index 000000000000..931ec778a853 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/CollectionResults/AIProjectRoutinesGetRoutinesCollectionResultOfT.cs @@ -0,0 +1,106 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + internal partial class AIProjectRoutinesGetRoutinesCollectionResultOfT : CollectionResult + { + private readonly AIProjectRoutines _client; + private readonly string _foundryFeatures; + private readonly int? _limit; + private readonly string _order; + private readonly string _after; + private readonly string _before; + private readonly RequestOptions _options; + + /// Initializes a new instance of AIProjectRoutinesGetRoutinesCollectionResultOfT, which is used to iterate over the pages of a collection. + /// The AIProjectRoutines client used to send requests. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// + /// A limit on the number of objects to be returned. Limit can range between 1 and 100, and the + /// default is 20. + /// + /// + /// Sort order by the `created_at` timestamp of the objects. `asc` for ascending order and`desc` + /// for descending order. + /// + /// + /// 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 request options, which can override default behaviors of the client pipeline on a per-call basis. + public AIProjectRoutinesGetRoutinesCollectionResultOfT(AIProjectRoutines client, string foundryFeatures, int? limit, string order, string after, string before, RequestOptions options) + { + _client = client; + _foundryFeatures = foundryFeatures; + _limit = limit; + _order = order; + _after = after; + _before = before; + _options = options; + } + + /// Gets the raw pages of the collection. + /// The raw pages of the collection. + public override IEnumerable GetRawPages() + { + PipelineMessage message = _client.CreateGetRoutinesRequest(_foundryFeatures, _limit, _order, _after, _before, _options); + string nextToken = null; + while (true) + { + ClientResult result = GetNextResponse(message); + yield return result; + + nextToken = ((AgentsPagedResultRoutine)result).LastId; + if (string.IsNullOrEmpty(nextToken)) + { + yield break; + } + message = _client.CreateGetRoutinesRequest(_foundryFeatures, _limit, _order, nextToken, _before, _options); + } + } + + /// Gets the continuation token from the specified page. + /// + /// The continuation token for the specified page. + public override ContinuationToken GetContinuationToken(ClientResult page) + { + string nextPage = ((AgentsPagedResultRoutine)page).LastId; + if (!string.IsNullOrEmpty(nextPage)) + { + return ContinuationToken.FromBytes(BinaryData.FromString(nextPage)); + } + else + { + return null; + } + } + + /// Gets the values from the specified page. + /// + /// The values from the specified page. + protected override IEnumerable GetValuesFromPage(ClientResult page) + { + return ((AgentsPagedResultRoutine)page).Data; + } + + /// Sends the request in the pipeline message and returns the response. + /// The pipeline message containing the request to send. + private ClientResult GetNextResponse(PipelineMessage message) + { + return ClientResult.FromResponse(_client.Pipeline.ProcessMessage(message, _options)); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/DataGenerationJobs.RestClient.cs b/sdk/ai/Azure.AI.Projects/src/Generated/DataGenerationJobs.RestClient.cs new file mode 100644 index 000000000000..892191e15c77 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/DataGenerationJobs.RestClient.cs @@ -0,0 +1,157 @@ +// + +#nullable disable + +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + /// + public partial class DataGenerationJobs + { + private static PipelineMessageClassifier _pipelineMessageClassifier200; + private static PipelineMessageClassifier _pipelineMessageClassifier201; + private static PipelineMessageClassifier _pipelineMessageClassifier204; + + private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 ??= PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); + + private static PipelineMessageClassifier PipelineMessageClassifier201 => _pipelineMessageClassifier201 ??= PipelineMessageClassifier.Create(stackalloc ushort[] { 201 }); + + private static PipelineMessageClassifier PipelineMessageClassifier204 => _pipelineMessageClassifier204 ??= PipelineMessageClassifier.Create(stackalloc ushort[] { 204 }); + + internal PipelineMessage CreateGetGenerationJobRequest(string jobId, string foundryFeatures, RequestOptions options) + { + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/data_generation_jobs/", false); + uri.AppendPath(jobId, true); + if (_apiVersion != null) + { + uri.AppendQuery("api-version", _apiVersion, true); + } + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200); + PipelineRequest request = message.Request; + if (foundryFeatures != null) + { + request.Headers.Set("Foundry-Features", foundryFeatures); + } + request.Headers.Set("Accept", "application/json"); + message.Apply(options); + return message; + } + + internal PipelineMessage CreateGetGenerationJobsRequest(string foundryFeatures, int? limit, string order, string after, string before, string scenario, IEnumerable @type, RequestOptions options) + { + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/data_generation_jobs", false); + if (limit != null) + { + uri.AppendQuery("limit", TypeFormatters.ConvertToString(limit), true); + } + if (order != null) + { + uri.AppendQuery("order", order, true); + } + if (after != null) + { + uri.AppendQuery("after", after, true); + } + if (before != null) + { + uri.AppendQuery("before", before, true); + } + if (scenario != null) + { + uri.AppendQuery("scenario", scenario, true); + } + if (@type != null && !(@type is ChangeTrackingList changeTrackingList && changeTrackingList.IsUndefined)) + { + uri.AppendQueryDelimited("type", @type, ",", escape: true); + } + if (_apiVersion != null) + { + uri.AppendQuery("api-version", _apiVersion, true); + } + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200); + PipelineRequest request = message.Request; + if (foundryFeatures != null) + { + request.Headers.Set("Foundry-Features", foundryFeatures); + } + request.Headers.Set("Accept", "application/json"); + message.Apply(options); + return message; + } + + internal PipelineMessage CreateCreateGenerationJobRequest(BinaryContent content, string foundryFeatures, string operationId, RequestOptions options) + { + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/data_generation_jobs", false); + if (_apiVersion != null) + { + uri.AppendQuery("api-version", _apiVersion, true); + } + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier201); + PipelineRequest request = message.Request; + if (foundryFeatures != null) + { + request.Headers.Set("Foundry-Features", foundryFeatures); + } + if (operationId != null) + { + request.Headers.Set("Operation-Id", operationId); + } + request.Headers.Set("Content-Type", "application/json"); + request.Headers.Set("Accept", "application/json"); + request.Content = content; + message.Apply(options); + return message; + } + + internal PipelineMessage CreateCancelGenerationJobRequest(string jobId, string foundryFeatures, RequestOptions options) + { + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/data_generation_jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendPath(":cancel", false); + if (_apiVersion != null) + { + uri.AppendQuery("api-version", _apiVersion, true); + } + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier200); + PipelineRequest request = message.Request; + if (foundryFeatures != null) + { + request.Headers.Set("Foundry-Features", foundryFeatures); + } + request.Headers.Set("Accept", "application/json"); + message.Apply(options); + return message; + } + + internal PipelineMessage CreateDeleteGenerationJobRequest(string jobId, string foundryFeatures, RequestOptions options) + { + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/data_generation_jobs/", false); + uri.AppendPath(jobId, true); + if (_apiVersion != null) + { + uri.AppendQuery("api-version", _apiVersion, true); + } + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "DELETE", PipelineMessageClassifier204); + PipelineRequest request = message.Request; + if (foundryFeatures != null) + { + request.Headers.Set("Foundry-Features", foundryFeatures); + } + message.Apply(options); + return message; + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/DataGenerationJobs.cs b/sdk/ai/Azure.AI.Projects/src/Generated/DataGenerationJobs.cs new file mode 100644 index 000000000000..9f61e821b145 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/DataGenerationJobs.cs @@ -0,0 +1,280 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; + +namespace Azure.AI.Projects +{ + /// The DataGenerationJobs sub-client. + public partial class DataGenerationJobs + { + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of DataGenerationJobs for mocking. + protected DataGenerationJobs() + { + } + + /// Initializes a new instance of DataGenerationJobs. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// Service endpoint. + /// + internal DataGenerationJobs(ClientPipeline pipeline, Uri endpoint, string apiVersion) + { + _endpoint = endpoint; + Pipeline = pipeline; + _apiVersion = apiVersion; + } + + /// The HTTP pipeline for sending and receiving REST requests and responses. + public ClientPipeline Pipeline { get; } + + /// + /// [Protocol Method] Gets the details of a data generation job by its ID. + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// The ID of the job. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + internal virtual ClientResult GetGenerationJob(string jobId, string foundryFeatures, RequestOptions options) + { + using PipelineMessage message = CreateGetGenerationJobRequest(jobId, foundryFeatures, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); + } + + /// + /// [Protocol Method] Gets the details of a data generation job by its ID. + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// The ID of the job. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + internal virtual async Task GetGenerationJobAsync(string jobId, string foundryFeatures, RequestOptions options) + { + using PipelineMessage message = CreateGetGenerationJobRequest(jobId, foundryFeatures, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + } + + /// Gets the details of a data generation job by its ID. + /// The ID of the job. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// The cancellation token that can be used to cancel the operation. + /// Service returned a non-success status code. + internal virtual ClientResult GetGenerationJob(string jobId, FoundryFeaturesOptInKeys? foundryFeatures = default, CancellationToken cancellationToken = default) + { + ClientResult result = GetGenerationJob(jobId, foundryFeatures?.ToSerialString(), cancellationToken.ToRequestOptions()); + return ClientResult.FromValue((DataGenerationJob)result, result.GetRawResponse()); + } + + /// Gets the details of a data generation job by its ID. + /// The ID of the job. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// The cancellation token that can be used to cancel the operation. + /// Service returned a non-success status code. + internal virtual async Task> GetGenerationJobAsync(string jobId, FoundryFeaturesOptInKeys? foundryFeatures = default, CancellationToken cancellationToken = default) + { + ClientResult result = await GetGenerationJobAsync(jobId, foundryFeatures?.ToSerialString(), cancellationToken.ToRequestOptions()).ConfigureAwait(false); + return ClientResult.FromValue((DataGenerationJob)result, result.GetRawResponse()); + } + + /// + /// [Protocol Method] Creates a data generation job. + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// The content to send as the body of the request. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// Client-generated unique ID for idempotent retries. When absent, the server creates the job unconditionally. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + internal virtual ClientResult CreateGenerationJob(BinaryContent content, string foundryFeatures = default, string operationId = default, RequestOptions options = null) + { + using PipelineMessage message = CreateCreateGenerationJobRequest(content, foundryFeatures, operationId, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); + } + + /// + /// [Protocol Method] Creates a data generation job. + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// The content to send as the body of the request. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// Client-generated unique ID for idempotent retries. When absent, the server creates the job unconditionally. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + internal virtual async Task CreateGenerationJobAsync(BinaryContent content, string foundryFeatures = default, string operationId = default, RequestOptions options = null) + { + using PipelineMessage message = CreateCreateGenerationJobRequest(content, foundryFeatures, operationId, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + } + + /// Creates a data generation job. + /// The job to create. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// Client-generated unique ID for idempotent retries. When absent, the server creates the job unconditionally. + /// The cancellation token that can be used to cancel the operation. + /// Service returned a non-success status code. + internal virtual ClientResult CreateGenerationJob(DataGenerationJob job, FoundryFeaturesOptInKeys? foundryFeatures = default, string operationId = default, CancellationToken cancellationToken = default) + { + ClientResult result = CreateGenerationJob(job, foundryFeatures?.ToSerialString(), operationId, cancellationToken.ToRequestOptions()); + return ClientResult.FromValue((DataGenerationJob)result, result.GetRawResponse()); + } + + /// Creates a data generation job. + /// The job to create. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// Client-generated unique ID for idempotent retries. When absent, the server creates the job unconditionally. + /// The cancellation token that can be used to cancel the operation. + /// Service returned a non-success status code. + internal virtual async Task> CreateGenerationJobAsync(DataGenerationJob job, FoundryFeaturesOptInKeys? foundryFeatures = default, string operationId = default, CancellationToken cancellationToken = default) + { + ClientResult result = await CreateGenerationJobAsync(job, foundryFeatures?.ToSerialString(), operationId, cancellationToken.ToRequestOptions()).ConfigureAwait(false); + return ClientResult.FromValue((DataGenerationJob)result, result.GetRawResponse()); + } + + /// + /// [Protocol Method] Cancels a data generation job by its ID. + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// The ID of the job to cancel. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + internal virtual ClientResult CancelGenerationJob(string jobId, string foundryFeatures, RequestOptions options) + { + using PipelineMessage message = CreateCancelGenerationJobRequest(jobId, foundryFeatures, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); + } + + /// + /// [Protocol Method] Cancels a data generation job by its ID. + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// The ID of the job to cancel. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + internal virtual async Task CancelGenerationJobAsync(string jobId, string foundryFeatures, RequestOptions options) + { + using PipelineMessage message = CreateCancelGenerationJobRequest(jobId, foundryFeatures, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + } + + /// Cancels a data generation job by its ID. + /// The ID of the job to cancel. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// The cancellation token that can be used to cancel the operation. + /// Service returned a non-success status code. + internal virtual ClientResult CancelGenerationJob(string jobId, FoundryFeaturesOptInKeys? foundryFeatures = default, CancellationToken cancellationToken = default) + { + ClientResult result = CancelGenerationJob(jobId, foundryFeatures?.ToSerialString(), cancellationToken.ToRequestOptions()); + return ClientResult.FromValue((DataGenerationJob)result, result.GetRawResponse()); + } + + /// Cancels a data generation job by its ID. + /// The ID of the job to cancel. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// The cancellation token that can be used to cancel the operation. + /// Service returned a non-success status code. + internal virtual async Task> CancelGenerationJobAsync(string jobId, FoundryFeaturesOptInKeys? foundryFeatures = default, CancellationToken cancellationToken = default) + { + ClientResult result = await CancelGenerationJobAsync(jobId, foundryFeatures?.ToSerialString(), cancellationToken.ToRequestOptions()).ConfigureAwait(false); + return ClientResult.FromValue((DataGenerationJob)result, result.GetRawResponse()); + } + + /// + /// [Protocol Method] Deletes a data generation job by its ID. + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// The ID of the job to delete. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + internal virtual ClientResult DeleteGenerationJob(string jobId, string foundryFeatures, RequestOptions options) + { + using PipelineMessage message = CreateDeleteGenerationJobRequest(jobId, foundryFeatures, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); + } + + /// + /// [Protocol Method] Deletes a data generation job by its ID. + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// The ID of the job to delete. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + internal virtual async Task DeleteGenerationJobAsync(string jobId, string foundryFeatures, RequestOptions options) + { + using PipelineMessage message = CreateDeleteGenerationJobRequest(jobId, foundryFeatures, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + } + + /// Deletes a data generation job by its ID. + /// The ID of the job to delete. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// The cancellation token that can be used to cancel the operation. + /// Service returned a non-success status code. + internal virtual ClientResult DeleteGenerationJob(string jobId, FoundryFeaturesOptInKeys? foundryFeatures = default, CancellationToken cancellationToken = default) + { + return DeleteGenerationJob(jobId, foundryFeatures?.ToSerialString(), cancellationToken.ToRequestOptions()); + } + + /// Deletes a data generation job by its ID. + /// The ID of the job to delete. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// The cancellation token that can be used to cancel the operation. + /// Service returned a non-success status code. + internal virtual async Task DeleteGenerationJobAsync(string jobId, FoundryFeaturesOptInKeys? foundryFeatures = default, CancellationToken cancellationToken = default) + { + return await DeleteGenerationJobAsync(jobId, foundryFeatures?.ToSerialString(), cancellationToken.ToRequestOptions()).ConfigureAwait(false); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/EvaluatorGenerationJobs.RestClient.cs b/sdk/ai/Azure.AI.Projects/src/Generated/EvaluatorGenerationJobs.RestClient.cs new file mode 100644 index 000000000000..19a99c58667c --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/EvaluatorGenerationJobs.RestClient.cs @@ -0,0 +1,148 @@ +// + +#nullable disable + +using System.ClientModel; +using System.ClientModel.Primitives; + +namespace Azure.AI.Projects +{ + /// + public partial class EvaluatorGenerationJobs + { + private static PipelineMessageClassifier _pipelineMessageClassifier200; + private static PipelineMessageClassifier _pipelineMessageClassifier201; + private static PipelineMessageClassifier _pipelineMessageClassifier204; + + private static PipelineMessageClassifier PipelineMessageClassifier200 => _pipelineMessageClassifier200 ??= PipelineMessageClassifier.Create(stackalloc ushort[] { 200 }); + + private static PipelineMessageClassifier PipelineMessageClassifier201 => _pipelineMessageClassifier201 ??= PipelineMessageClassifier.Create(stackalloc ushort[] { 201 }); + + private static PipelineMessageClassifier PipelineMessageClassifier204 => _pipelineMessageClassifier204 ??= PipelineMessageClassifier.Create(stackalloc ushort[] { 204 }); + + internal PipelineMessage CreateCreateRequest(BinaryContent content, string foundryFeatures, string operationId, RequestOptions options) + { + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/evaluator_generation_jobs", false); + if (_apiVersion != null) + { + uri.AppendQuery("api-version", _apiVersion, true); + } + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier201); + PipelineRequest request = message.Request; + if (foundryFeatures != null) + { + request.Headers.Set("Foundry-Features", foundryFeatures); + } + if (operationId != null) + { + request.Headers.Set("Operation-Id", operationId); + } + request.Headers.Set("Content-Type", "application/json"); + request.Headers.Set("Accept", "application/json"); + request.Content = content; + message.Apply(options); + return message; + } + + internal PipelineMessage CreateGetRequest(string jobId, string foundryFeatures, RequestOptions options) + { + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/evaluator_generation_jobs/", false); + uri.AppendPath(jobId, true); + if (_apiVersion != null) + { + uri.AppendQuery("api-version", _apiVersion, true); + } + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200); + PipelineRequest request = message.Request; + if (foundryFeatures != null) + { + request.Headers.Set("Foundry-Features", foundryFeatures); + } + request.Headers.Set("Accept", "application/json"); + message.Apply(options); + return message; + } + + internal PipelineMessage CreateGetAllRequest(string foundryFeatures, int? limit, string order, string after, string before, RequestOptions options) + { + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/evaluator_generation_jobs", false); + if (limit != null) + { + uri.AppendQuery("limit", TypeFormatters.ConvertToString(limit), true); + } + if (order != null) + { + uri.AppendQuery("order", order, true); + } + if (after != null) + { + uri.AppendQuery("after", after, true); + } + if (before != null) + { + uri.AppendQuery("before", before, true); + } + if (_apiVersion != null) + { + uri.AppendQuery("api-version", _apiVersion, true); + } + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "GET", PipelineMessageClassifier200); + PipelineRequest request = message.Request; + if (foundryFeatures != null) + { + request.Headers.Set("Foundry-Features", foundryFeatures); + } + request.Headers.Set("Accept", "application/json"); + message.Apply(options); + return message; + } + + internal PipelineMessage CreateCancelRequest(string jobId, string foundryFeatures, RequestOptions options) + { + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/evaluator_generation_jobs/", false); + uri.AppendPath(jobId, true); + uri.AppendPath(":cancel", false); + if (_apiVersion != null) + { + uri.AppendQuery("api-version", _apiVersion, true); + } + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier200); + PipelineRequest request = message.Request; + if (foundryFeatures != null) + { + request.Headers.Set("Foundry-Features", foundryFeatures); + } + request.Headers.Set("Accept", "application/json"); + message.Apply(options); + return message; + } + + internal PipelineMessage CreateDeleteRequest(string jobId, string foundryFeatures, RequestOptions options) + { + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/evaluator_generation_jobs/", false); + uri.AppendPath(jobId, true); + if (_apiVersion != null) + { + uri.AppendQuery("api-version", _apiVersion, true); + } + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "DELETE", PipelineMessageClassifier204); + PipelineRequest request = message.Request; + if (foundryFeatures != null) + { + request.Headers.Set("Foundry-Features", foundryFeatures); + } + message.Apply(options); + return message; + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/EvaluatorGenerationJobs.cs b/sdk/ai/Azure.AI.Projects/src/Generated/EvaluatorGenerationJobs.cs new file mode 100644 index 000000000000..d8762fc2162b --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/EvaluatorGenerationJobs.cs @@ -0,0 +1,296 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Threading; +using System.Threading.Tasks; + +namespace Azure.AI.Projects +{ + /// The EvaluatorGenerationJobs sub-client. + public partial class EvaluatorGenerationJobs + { + private readonly Uri _endpoint; + private readonly string _apiVersion; + + /// Initializes a new instance of EvaluatorGenerationJobs for mocking. + protected EvaluatorGenerationJobs() + { + } + + /// Initializes a new instance of EvaluatorGenerationJobs. + /// The HTTP pipeline for sending and receiving REST requests and responses. + /// Service endpoint. + /// + internal EvaluatorGenerationJobs(ClientPipeline pipeline, Uri endpoint, string apiVersion) + { + _endpoint = endpoint; + Pipeline = pipeline; + _apiVersion = apiVersion; + } + + /// The HTTP pipeline for sending and receiving REST requests and responses. + public ClientPipeline Pipeline { get; } + + /// + /// [Protocol Method] Creates an evaluator generation job. The service generates rubric-based evaluator + /// definitions from the provided source materials asynchronously. + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// The content to send as the body of the request. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// Client-generated unique ID for idempotent retries. When absent, the server creates the job unconditionally. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + internal virtual ClientResult Create(BinaryContent content, string foundryFeatures = default, string operationId = default, RequestOptions options = null) + { + using PipelineMessage message = CreateCreateRequest(content, foundryFeatures, operationId, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); + } + + /// + /// [Protocol Method] Creates an evaluator generation job. The service generates rubric-based evaluator + /// definitions from the provided source materials asynchronously. + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// The content to send as the body of the request. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// Client-generated unique ID for idempotent retries. When absent, the server creates the job unconditionally. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + internal virtual async Task CreateAsync(BinaryContent content, string foundryFeatures = default, string operationId = default, RequestOptions options = null) + { + using PipelineMessage message = CreateCreateRequest(content, foundryFeatures, operationId, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + } + + /// + /// Creates an evaluator generation job. The service generates rubric-based evaluator + /// definitions from the provided source materials asynchronously. + /// + /// The job to create. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// Client-generated unique ID for idempotent retries. When absent, the server creates the job unconditionally. + /// The cancellation token that can be used to cancel the operation. + /// Service returned a non-success status code. + internal virtual ClientResult Create(EvaluatorGenerationJob job, FoundryFeaturesOptInKeys? foundryFeatures = default, string operationId = default, CancellationToken cancellationToken = default) + { + ClientResult result = Create(job, foundryFeatures?.ToSerialString(), operationId, cancellationToken.ToRequestOptions()); + return ClientResult.FromValue((EvaluatorGenerationJob)result, result.GetRawResponse()); + } + + /// + /// Creates an evaluator generation job. The service generates rubric-based evaluator + /// definitions from the provided source materials asynchronously. + /// + /// The job to create. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// Client-generated unique ID for idempotent retries. When absent, the server creates the job unconditionally. + /// The cancellation token that can be used to cancel the operation. + /// Service returned a non-success status code. + internal virtual async Task> CreateAsync(EvaluatorGenerationJob job, FoundryFeaturesOptInKeys? foundryFeatures = default, string operationId = default, CancellationToken cancellationToken = default) + { + ClientResult result = await CreateAsync(job, foundryFeatures?.ToSerialString(), operationId, cancellationToken.ToRequestOptions()).ConfigureAwait(false); + return ClientResult.FromValue((EvaluatorGenerationJob)result, result.GetRawResponse()); + } + + /// + /// [Protocol Method] Gets the details of an evaluator generation job by its ID. + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// The ID of the job. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + internal virtual ClientResult Get(string jobId, string foundryFeatures, RequestOptions options) + { + using PipelineMessage message = CreateGetRequest(jobId, foundryFeatures, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); + } + + /// + /// [Protocol Method] Gets the details of an evaluator generation job by its ID. + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// The ID of the job. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + internal virtual async Task GetAsync(string jobId, string foundryFeatures, RequestOptions options) + { + using PipelineMessage message = CreateGetRequest(jobId, foundryFeatures, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + } + + /// Gets the details of an evaluator generation job by its ID. + /// The ID of the job. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// The cancellation token that can be used to cancel the operation. + /// Service returned a non-success status code. + internal virtual ClientResult Get(string jobId, FoundryFeaturesOptInKeys? foundryFeatures = default, CancellationToken cancellationToken = default) + { + ClientResult result = Get(jobId, foundryFeatures?.ToSerialString(), cancellationToken.ToRequestOptions()); + return ClientResult.FromValue((EvaluatorGenerationJob)result, result.GetRawResponse()); + } + + /// Gets the details of an evaluator generation job by its ID. + /// The ID of the job. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// The cancellation token that can be used to cancel the operation. + /// Service returned a non-success status code. + internal virtual async Task> GetAsync(string jobId, FoundryFeaturesOptInKeys? foundryFeatures = default, CancellationToken cancellationToken = default) + { + ClientResult result = await GetAsync(jobId, foundryFeatures?.ToSerialString(), cancellationToken.ToRequestOptions()).ConfigureAwait(false); + return ClientResult.FromValue((EvaluatorGenerationJob)result, result.GetRawResponse()); + } + + /// + /// [Protocol Method] Cancels an evaluator generation job by its ID. + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// The ID of the job to cancel. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + internal virtual ClientResult Cancel(string jobId, string foundryFeatures, RequestOptions options) + { + using PipelineMessage message = CreateCancelRequest(jobId, foundryFeatures, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); + } + + /// + /// [Protocol Method] Cancels an evaluator generation job by its ID. + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// The ID of the job to cancel. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + internal virtual async Task CancelAsync(string jobId, string foundryFeatures, RequestOptions options) + { + using PipelineMessage message = CreateCancelRequest(jobId, foundryFeatures, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + } + + /// Cancels an evaluator generation job by its ID. + /// The ID of the job to cancel. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// The cancellation token that can be used to cancel the operation. + /// Service returned a non-success status code. + internal virtual ClientResult Cancel(string jobId, FoundryFeaturesOptInKeys? foundryFeatures = default, CancellationToken cancellationToken = default) + { + ClientResult result = Cancel(jobId, foundryFeatures?.ToSerialString(), cancellationToken.ToRequestOptions()); + return ClientResult.FromValue((EvaluatorGenerationJob)result, result.GetRawResponse()); + } + + /// Cancels an evaluator generation job by its ID. + /// The ID of the job to cancel. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// The cancellation token that can be used to cancel the operation. + /// Service returned a non-success status code. + internal virtual async Task> CancelAsync(string jobId, FoundryFeaturesOptInKeys? foundryFeatures = default, CancellationToken cancellationToken = default) + { + ClientResult result = await CancelAsync(jobId, foundryFeatures?.ToSerialString(), cancellationToken.ToRequestOptions()).ConfigureAwait(false); + return ClientResult.FromValue((EvaluatorGenerationJob)result, result.GetRawResponse()); + } + + /// + /// [Protocol Method] Deletes an evaluator generation job by its ID. Deletes the job record only; + /// the generated evaluator (if any) is preserved. + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// The ID of the job to delete. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + internal virtual ClientResult Delete(string jobId, string foundryFeatures, RequestOptions options) + { + using PipelineMessage message = CreateDeleteRequest(jobId, foundryFeatures, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); + } + + /// + /// [Protocol Method] Deletes an evaluator generation job by its ID. Deletes the job record only; + /// the generated evaluator (if any) is preserved. + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// The ID of the job to delete. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// The request options, which can override default behaviors of the client pipeline on a per-call basis. + /// Service returned a non-success status code. + /// The response returned from the service. + internal virtual async Task DeleteAsync(string jobId, string foundryFeatures, RequestOptions options) + { + using PipelineMessage message = CreateDeleteRequest(jobId, foundryFeatures, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + } + + /// + /// Deletes an evaluator generation job by its ID. Deletes the job record only; + /// the generated evaluator (if any) is preserved. + /// + /// The ID of the job to delete. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// The cancellation token that can be used to cancel the operation. + /// Service returned a non-success status code. + internal virtual ClientResult Delete(string jobId, FoundryFeaturesOptInKeys? foundryFeatures = default, CancellationToken cancellationToken = default) + { + return Delete(jobId, foundryFeatures?.ToSerialString(), cancellationToken.ToRequestOptions()); + } + + /// + /// Deletes an evaluator generation job by its ID. Deletes the job record only; + /// the generated evaluator (if any) is preserved. + /// + /// The ID of the job to delete. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// The cancellation token that can be used to cancel the operation. + /// Service returned a non-success status code. + internal virtual async Task DeleteAsync(string jobId, FoundryFeaturesOptInKeys? foundryFeatures = default, CancellationToken cancellationToken = default) + { + return await DeleteAsync(jobId, foundryFeatures?.ToSerialString(), cancellationToken.ToRequestOptions()).ConfigureAwait(false); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/A2APreviewTool.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/A2APreviewTool.Serialization.cs index 7e81722af17e..af4e1b435cd4 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/A2APreviewTool.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/A2APreviewTool.Serialization.cs @@ -81,6 +81,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsCollectionDefined(ToolConfigs)) + { + writer.WritePropertyName("tool_configs"u8); + writer.WriteStartObject(); + foreach (var item in ToolConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } if (Optional.IsDefined(BaseUrl)) { writer.WritePropertyName("base_url"u8); @@ -127,6 +138,7 @@ internal static A2APreviewTool DeserializeA2APreviewTool(JsonElement element, Mo IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); string name = default; string description = default; + IDictionary toolConfigs = default; Uri baseUrl = default; string agentCardPath = default; string projectConnectionId = default; @@ -147,6 +159,20 @@ internal static A2APreviewTool DeserializeA2APreviewTool(JsonElement element, Mo description = prop.Value.GetString(); continue; } + if (prop.NameEquals("tool_configs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, ToolConfig.DeserializeToolConfig(prop0.Value, options)); + } + toolConfigs = dictionary; + continue; + } if (prop.NameEquals("base_url"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -176,6 +202,7 @@ internal static A2APreviewTool DeserializeA2APreviewTool(JsonElement element, Mo additionalBinaryDataProperties, name, description, + toolConfigs ?? new ChangeTrackingDictionary(), baseUrl, agentCardPath, projectConnectionId); diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/A2APreviewTool.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/A2APreviewTool.cs index db7ce0335e5a..c22a0048d3f8 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/A2APreviewTool.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/A2APreviewTool.cs @@ -13,6 +13,7 @@ internal partial class A2APreviewTool : InternalTool /// Initializes a new instance of . public A2APreviewTool() : base(ToolType.A2aPreview) { + ToolConfigs = new ChangeTrackingDictionary(); } /// Initializes a new instance of . @@ -20,6 +21,11 @@ public A2APreviewTool() : base(ToolType.A2aPreview) /// Keeps track of any properties unknown to the library. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// /// Base URL of the agent. /// /// The path to the agent card relative to the `base_url`. @@ -29,10 +35,11 @@ public A2APreviewTool() : base(ToolType.A2aPreview) /// The connection ID in the project for the A2A server. /// The connection stores authentication and other connection details needed to connect to the A2A server. /// - internal A2APreviewTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, Uri baseUrl, string agentCardPath, string projectConnectionId) : base(@type, additionalBinaryDataProperties) + internal A2APreviewTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, IDictionary toolConfigs, Uri baseUrl, string agentCardPath, string projectConnectionId) : base(@type, additionalBinaryDataProperties) { Name = name; Description = description; + ToolConfigs = toolConfigs; BaseUrl = baseUrl; AgentCardPath = agentCardPath; ProjectConnectionId = projectConnectionId; @@ -44,6 +51,13 @@ internal A2APreviewTool(ToolType @type, IDictionary addition /// Optional user-defined description for this tool or configuration. public string Description { get; set; } + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + public IDictionary ToolConfigs { get; } + /// Base URL of the agent. public Uri BaseUrl { get; set; } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AgentDataGenerationJobSource.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/AgentDataGenerationJobSource.Serialization.cs new file mode 100644 index 000000000000..f68c164f5921 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/AgentDataGenerationJobSource.Serialization.cs @@ -0,0 +1,153 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.AI.Projects +{ + /// Agent source for data generation jobs — references an agent to fetch instructions and metadata from. + public partial class AgentDataGenerationJobSource : DataGenerationJobSource, IJsonModel + { + /// Initializes a new instance of for deserialization. + internal AgentDataGenerationJobSource() + { + } + + /// The data to parse. + /// The client options for reading and writing models. + protected override DataGenerationJobSource PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeAgentDataGenerationJobSource(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AgentDataGenerationJobSource)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(AgentDataGenerationJobSource)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + AgentDataGenerationJobSource IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (AgentDataGenerationJobSource)PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AgentDataGenerationJobSource)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + writer.WritePropertyName("agent_name"u8); + writer.WriteStringValue(AgentName); + if (Optional.IsDefined(AgentVersion)) + { + writer.WritePropertyName("agent_version"u8); + writer.WriteStringValue(AgentVersion); + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + AgentDataGenerationJobSource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (AgentDataGenerationJobSource)JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected override DataGenerationJobSource JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AgentDataGenerationJobSource)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAgentDataGenerationJobSource(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static AgentDataGenerationJobSource DeserializeAgentDataGenerationJobSource(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DataGenerationJobSourceType @type = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + string description = default; + string agentName = default; + string agentVersion = default; + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("type"u8)) + { + @type = new DataGenerationJobSourceType(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("description"u8)) + { + description = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("agent_name"u8)) + { + agentName = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("agent_version"u8)) + { + agentVersion = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new AgentDataGenerationJobSource(@type, additionalBinaryDataProperties, description, agentName, agentVersion); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AgentDataGenerationJobSource.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/AgentDataGenerationJobSource.cs new file mode 100644 index 000000000000..4190cda3ecab --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/AgentDataGenerationJobSource.cs @@ -0,0 +1,44 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + /// Agent source for data generation jobs — references an agent to fetch instructions and metadata from. + public partial class AgentDataGenerationJobSource : DataGenerationJobSource + { + /// Initializes a new instance of . + /// The agent name to fetch instructions from. + /// is null. + public AgentDataGenerationJobSource(string agentName) : base(DataGenerationJobSourceType.Agent) + { + Argument.AssertNotNull(agentName, nameof(agentName)); + + AgentName = agentName; + } + + /// Initializes a new instance of . + /// The type of source. + /// Keeps track of any properties unknown to the library. + /// Optional description of what this source represents — helps the pipeline interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities'). + /// The agent name to fetch instructions from. + /// The agent version. If not specified, the latest version is used. + internal AgentDataGenerationJobSource(DataGenerationJobSourceType @type, IDictionary additionalBinaryDataProperties, string description, string agentName, string agentVersion) : base(@type, description, additionalBinaryDataProperties) + { + AgentName = agentName; + AgentVersion = agentVersion; + } + + /// Optional description of what this source represents — helps the pipeline interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities'). + public override string Description { get; set; } + + /// The agent name to fetch instructions from. + public string AgentName { get; set; } + + /// The agent version. If not specified, the latest version is used. + public string AgentVersion { get; set; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AgentEvaluatorGenerationJobSource.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/AgentEvaluatorGenerationJobSource.Serialization.cs new file mode 100644 index 000000000000..1cf25c5c7eb4 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/AgentEvaluatorGenerationJobSource.Serialization.cs @@ -0,0 +1,153 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.AI.Projects +{ + /// Agent source for evaluator generation jobs — references an agent to fetch instructions and metadata from. + public partial class AgentEvaluatorGenerationJobSource : EvaluatorGenerationJobSource, IJsonModel + { + /// Initializes a new instance of for deserialization. + internal AgentEvaluatorGenerationJobSource() + { + } + + /// The data to parse. + /// The client options for reading and writing models. + protected override EvaluatorGenerationJobSource PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeAgentEvaluatorGenerationJobSource(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AgentEvaluatorGenerationJobSource)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(AgentEvaluatorGenerationJobSource)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + AgentEvaluatorGenerationJobSource IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (AgentEvaluatorGenerationJobSource)PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AgentEvaluatorGenerationJobSource)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + writer.WritePropertyName("agent_name"u8); + writer.WriteStringValue(AgentName); + if (Optional.IsDefined(AgentVersion)) + { + writer.WritePropertyName("agent_version"u8); + writer.WriteStringValue(AgentVersion); + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + AgentEvaluatorGenerationJobSource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (AgentEvaluatorGenerationJobSource)JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected override EvaluatorGenerationJobSource JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AgentEvaluatorGenerationJobSource)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAgentEvaluatorGenerationJobSource(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static AgentEvaluatorGenerationJobSource DeserializeAgentEvaluatorGenerationJobSource(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EvaluatorGenerationJobSourceType @type = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + string description = default; + string agentName = default; + string agentVersion = default; + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("type"u8)) + { + @type = new EvaluatorGenerationJobSourceType(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("description"u8)) + { + description = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("agent_name"u8)) + { + agentName = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("agent_version"u8)) + { + agentVersion = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new AgentEvaluatorGenerationJobSource(@type, additionalBinaryDataProperties, description, agentName, agentVersion); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AgentEvaluatorGenerationJobSource.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/AgentEvaluatorGenerationJobSource.cs new file mode 100644 index 000000000000..bebe79148fd7 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/AgentEvaluatorGenerationJobSource.cs @@ -0,0 +1,45 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + /// Agent source for evaluator generation jobs — references an agent to fetch instructions and metadata from. + public partial class AgentEvaluatorGenerationJobSource : EvaluatorGenerationJobSource + { + /// Initializes a new instance of . + /// The agent name to fetch instructions from. + /// is null. + public AgentEvaluatorGenerationJobSource(string agentName) : base(EvaluatorGenerationJobSourceType.Agent) + { + Argument.AssertNotNull(agentName, nameof(agentName)); + + AgentName = agentName; + } + + /// Initializes a new instance of . + /// The type of source. + /// Keeps track of any properties unknown to the library. + /// Optional description of what this source represents — helps the pipeline interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities'). + /// The agent name to fetch instructions from. + /// The agent version. If not specified, the latest version is used. + internal AgentEvaluatorGenerationJobSource(EvaluatorGenerationJobSourceType @type, IDictionary additionalBinaryDataProperties, string description, string agentName, string agentVersion) : base(@type, additionalBinaryDataProperties) + { + Description = description; + AgentName = agentName; + AgentVersion = agentVersion; + } + + /// Optional description of what this source represents — helps the pipeline interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities'). + public string Description { get; set; } + + /// The agent name to fetch instructions from. + public string AgentName { get; set; } + + /// The agent version. If not specified, the latest version is used. + public string AgentVersion { get; set; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AgentsPagedResultRoutine.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/AgentsPagedResultRoutine.Serialization.cs new file mode 100644 index 000000000000..ea458ed3b7a0 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/AgentsPagedResultRoutine.Serialization.cs @@ -0,0 +1,188 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.AI.Projects +{ + /// The response data for a requested list of items. + internal partial class AgentsPagedResultRoutine : IJsonModel + { + /// Initializes a new instance of for deserialization. + internal AgentsPagedResultRoutine() + { + } + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual AgentsPagedResultRoutine PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeAgentsPagedResultRoutine(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AgentsPagedResultRoutine)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(AgentsPagedResultRoutine)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + AgentsPagedResultRoutine IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The to deserialize the from. + public static explicit operator AgentsPagedResultRoutine(ClientResult result) + { + PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAgentsPagedResultRoutine(document.RootElement, ModelSerializationExtensions.WireOptions); + } + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AgentsPagedResultRoutine)} does not support writing '{format}' format."); + } + writer.WritePropertyName("data"u8); + writer.WriteStartArray(); + foreach (ProjectsRoutine item in Data) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(FirstId)) + { + writer.WritePropertyName("first_id"u8); + writer.WriteStringValue(FirstId); + } + if (Optional.IsDefined(LastId)) + { + writer.WritePropertyName("last_id"u8); + writer.WriteStringValue(LastId); + } + writer.WritePropertyName("has_more"u8); + writer.WriteBooleanValue(HasMore); + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + AgentsPagedResultRoutine IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual AgentsPagedResultRoutine JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AgentsPagedResultRoutine)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAgentsPagedResultRoutine(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static AgentsPagedResultRoutine DeserializeAgentsPagedResultRoutine(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList data = default; + string firstId = default; + string lastId = default; + bool hasMore = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("data"u8)) + { + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(ProjectsRoutine.DeserializeProjectsRoutine(item, options)); + } + data = array; + continue; + } + if (prop.NameEquals("first_id"u8)) + { + firstId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("last_id"u8)) + { + lastId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("has_more"u8)) + { + hasMore = prop.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new AgentsPagedResultRoutine(data, firstId, lastId, hasMore, additionalBinaryDataProperties); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AgentsPagedResultRoutine.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/AgentsPagedResultRoutine.cs new file mode 100644 index 000000000000..f8f039aab43f --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/AgentsPagedResultRoutine.cs @@ -0,0 +1,53 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.AI.Projects +{ + /// The response data for a requested list of items. + internal partial class AgentsPagedResultRoutine + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + /// The requested list of items. + /// A value indicating whether there are additional values available not captured in this list. + internal AgentsPagedResultRoutine(IEnumerable data, bool hasMore) + { + Data = data.ToList(); + HasMore = hasMore; + } + + /// Initializes a new instance of . + /// 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. + /// Keeps track of any properties unknown to the library. + internal AgentsPagedResultRoutine(IList data, string firstId, string lastId, bool hasMore, IDictionary additionalBinaryDataProperties) + { + Data = data; + FirstId = firstId; + LastId = lastId; + HasMore = hasMore; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// The requested list of items. + public IList Data { get; } + + /// The first ID represented in this list. + public string FirstId { get; } + + /// The last ID represented in this list. + public string LastId { get; } + + /// A value indicating whether there are additional values available not captured in this list. + public bool HasMore { get; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AgentsPagedResultRoutineRun.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/AgentsPagedResultRoutineRun.Serialization.cs new file mode 100644 index 000000000000..7ad8292a729c --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/AgentsPagedResultRoutineRun.Serialization.cs @@ -0,0 +1,188 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.AI.Projects +{ + /// The response data for a requested list of items. + internal partial class AgentsPagedResultRoutineRun : IJsonModel + { + /// Initializes a new instance of for deserialization. + internal AgentsPagedResultRoutineRun() + { + } + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual AgentsPagedResultRoutineRun PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeAgentsPagedResultRoutineRun(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(AgentsPagedResultRoutineRun)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(AgentsPagedResultRoutineRun)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + AgentsPagedResultRoutineRun IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The to deserialize the from. + public static explicit operator AgentsPagedResultRoutineRun(ClientResult result) + { + PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeAgentsPagedResultRoutineRun(document.RootElement, ModelSerializationExtensions.WireOptions); + } + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AgentsPagedResultRoutineRun)} does not support writing '{format}' format."); + } + writer.WritePropertyName("data"u8); + writer.WriteStartArray(); + foreach (RoutineRun item in Data) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(FirstId)) + { + writer.WritePropertyName("first_id"u8); + writer.WriteStringValue(FirstId); + } + if (Optional.IsDefined(LastId)) + { + writer.WritePropertyName("last_id"u8); + writer.WriteStringValue(LastId); + } + writer.WritePropertyName("has_more"u8); + writer.WriteBooleanValue(HasMore); + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + AgentsPagedResultRoutineRun IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual AgentsPagedResultRoutineRun JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(AgentsPagedResultRoutineRun)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeAgentsPagedResultRoutineRun(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static AgentsPagedResultRoutineRun DeserializeAgentsPagedResultRoutineRun(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList data = default; + string firstId = default; + string lastId = default; + bool hasMore = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("data"u8)) + { + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(RoutineRun.DeserializeRoutineRun(item, options)); + } + data = array; + continue; + } + if (prop.NameEquals("first_id"u8)) + { + firstId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("last_id"u8)) + { + lastId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("has_more"u8)) + { + hasMore = prop.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new AgentsPagedResultRoutineRun(data, firstId, lastId, hasMore, additionalBinaryDataProperties); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AgentsPagedResultRoutineRun.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/AgentsPagedResultRoutineRun.cs new file mode 100644 index 000000000000..26a5a440bab0 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/AgentsPagedResultRoutineRun.cs @@ -0,0 +1,53 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.AI.Projects +{ + /// The response data for a requested list of items. + internal partial class AgentsPagedResultRoutineRun + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + /// The requested list of items. + /// A value indicating whether there are additional values available not captured in this list. + internal AgentsPagedResultRoutineRun(IEnumerable data, bool hasMore) + { + Data = data.ToList(); + HasMore = hasMore; + } + + /// Initializes a new instance of . + /// 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. + /// Keeps track of any properties unknown to the library. + internal AgentsPagedResultRoutineRun(IList data, string firstId, string lastId, bool hasMore, IDictionary additionalBinaryDataProperties) + { + Data = data; + FirstId = firstId; + LastId = lastId; + HasMore = hasMore; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// The requested list of items. + public IList Data { get; } + + /// The first ID represented in this list. + public string FirstId { get; } + + /// The last ID represented in this list. + public string LastId { get; } + + /// A value indicating whether there are additional values available not captured in this list. + public bool HasMore { get; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AzureAIAgentTarget.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/AzureAIAgentTarget.Serialization.cs index 2ee994d032c2..59121950004f 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AzureAIAgentTarget.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/AzureAIAgentTarget.Serialization.cs @@ -94,6 +94,16 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri } writer.WriteEndArray(); } + if (Optional.IsCollectionDefined(InternalTools)) + { + writer.WritePropertyName("tools"u8); + writer.WriteStartArray(); + foreach (InternalTool item in InternalTools) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } } /// The JSON reader. @@ -126,6 +136,7 @@ internal static AzureAIAgentTarget DeserializeAzureAIAgentTarget(JsonElement ele string name = default; string version = default; IList toolDescriptions = default; + IList internalTools = default; foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("type"u8)) @@ -157,12 +168,32 @@ internal static AzureAIAgentTarget DeserializeAzureAIAgentTarget(JsonElement ele toolDescriptions = array; continue; } + if (prop.NameEquals("tools"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(InternalTool.DeserializeInternalTool(item, options)); + } + internalTools = array; + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new AzureAIAgentTarget(@type, additionalBinaryDataProperties, name, version, toolDescriptions ?? new ChangeTrackingList()); + return new AzureAIAgentTarget( + @type, + additionalBinaryDataProperties, + name, + version, + toolDescriptions ?? new ChangeTrackingList(), + internalTools ?? new ChangeTrackingList()); } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AzureAIAgentTarget.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/AzureAIAgentTarget.cs index 43b659e8612a..5d99092e6d1b 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AzureAIAgentTarget.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/AzureAIAgentTarget.cs @@ -20,6 +20,7 @@ public AzureAIAgentTarget(string name) : base("azure_ai_agent") Name = name; ToolDescriptions = new ChangeTrackingList(); + InternalTools = new ChangeTrackingList(); } /// Initializes a new instance of . @@ -28,11 +29,13 @@ public AzureAIAgentTarget(string name) : base("azure_ai_agent") /// The unique identifier of the Azure AI agent. /// The version of the Azure AI agent. /// The parameters used to control the sampling behavior of the agent during text generation. - internal AzureAIAgentTarget(string @type, IDictionary additionalBinaryDataProperties, string name, string version, IList toolDescriptions) : base(@type, additionalBinaryDataProperties) + /// + internal AzureAIAgentTarget(string @type, IDictionary additionalBinaryDataProperties, string name, string version, IList toolDescriptions, IList internalTools) : base(@type, additionalBinaryDataProperties) { Name = name; Version = version; ToolDescriptions = toolDescriptions; + InternalTools = internalTools; } /// The unique identifier of the Azure AI agent. diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AzureAIProjectsContext.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/AzureAIProjectsContext.cs index d9ad4dff89e6..b3b2841fa699 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AzureAIProjectsContext.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/AzureAIProjectsContext.cs @@ -17,8 +17,12 @@ namespace Azure.AI.Projects [ModelReaderWriterBuildable(typeof(A2APreviewTool))] [ModelReaderWriterBuildable(typeof(AgentClusterInsightRequest))] [ModelReaderWriterBuildable(typeof(AgentClusterInsightResult))] + [ModelReaderWriterBuildable(typeof(AgentDataGenerationJobSource))] + [ModelReaderWriterBuildable(typeof(AgentEvaluatorGenerationJobSource))] [ModelReaderWriterBuildable(typeof(AgenticIdentityPreviewCredentials))] [ModelReaderWriterBuildable(typeof(AgentsPagedResultMemoryItem))] + [ModelReaderWriterBuildable(typeof(AgentsPagedResultRoutine))] + [ModelReaderWriterBuildable(typeof(AgentsPagedResultRoutineRun))] [ModelReaderWriterBuildable(typeof(AgentTaxonomyInput))] [ModelReaderWriterBuildable(typeof(AIProjectBlobReference))] [ModelReaderWriterBuildable(typeof(AIProjectConnection))] @@ -78,12 +82,28 @@ namespace Azure.AI.Projects [ModelReaderWriterBuildable(typeof(CoordParam))] [ModelReaderWriterBuildable(typeof(CreateAsyncResponse))] [ModelReaderWriterBuildable(typeof(CreateMemoryRequest))] + [ModelReaderWriterBuildable(typeof(CreateOrUpdateRoutineRequest))] [ModelReaderWriterBuildable(typeof(CronTrigger))] [ModelReaderWriterBuildable(typeof(DailyRecurrenceSchedule))] + [ModelReaderWriterBuildable(typeof(DataGenerationJob))] + [ModelReaderWriterBuildable(typeof(DataGenerationJobInputs))] + [ModelReaderWriterBuildable(typeof(DataGenerationJobOptions))] + [ModelReaderWriterBuildable(typeof(DataGenerationJobOutput))] + [ModelReaderWriterBuildable(typeof(DataGenerationJobOutputOptions))] + [ModelReaderWriterBuildable(typeof(DataGenerationJobResult))] + [ModelReaderWriterBuildable(typeof(DataGenerationJobSource))] + [ModelReaderWriterBuildable(typeof(DataGenerationModelOptions))] + [ModelReaderWriterBuildable(typeof(DataGenerationTokenUsage))] [ModelReaderWriterBuildable(typeof(DatasetCredential))] + [ModelReaderWriterBuildable(typeof(DatasetDataGenerationJobOutput))] + [ModelReaderWriterBuildable(typeof(DatasetDataGenerationJobSource))] + [ModelReaderWriterBuildable(typeof(DatasetEvaluatorGenerationJobSource))] + [ModelReaderWriterBuildable(typeof(DatasetReference))] [ModelReaderWriterBuildable(typeof(DeleteMemoryResponse))] [ModelReaderWriterBuildable(typeof(DeleteMemoryStoreResponse))] [ModelReaderWriterBuildable(typeof(DeleteScopeRequest))] + [ModelReaderWriterBuildable(typeof(DispatchRoutineAsyncRequest))] + [ModelReaderWriterBuildable(typeof(DispatchRoutineResponse))] [ModelReaderWriterBuildable(typeof(DoubleClickAction))] [ModelReaderWriterBuildable(typeof(DragParam))] [ModelReaderWriterBuildable(typeof(EmbeddingConfiguration))] @@ -100,15 +120,24 @@ namespace Azure.AI.Projects [ModelReaderWriterBuildable(typeof(EvaluationRunClusterInsightRequest))] [ModelReaderWriterBuildable(typeof(EvaluationRunClusterInsightResult))] [ModelReaderWriterBuildable(typeof(EvaluationScheduleTask))] + [ModelReaderWriterBuildable(typeof(EvaluationsDimension))] [ModelReaderWriterBuildable(typeof(EvaluationTarget))] [ModelReaderWriterBuildable(typeof(EvaluationTaxonomy))] [ModelReaderWriterBuildable(typeof(EvaluationTaxonomyInput))] + [ModelReaderWriterBuildable(typeof(EvaluatorCredentialRequest))] [ModelReaderWriterBuildable(typeof(EvaluatorDefinition))] + [ModelReaderWriterBuildable(typeof(EvaluatorGenerationArtifacts))] + [ModelReaderWriterBuildable(typeof(EvaluatorGenerationInputs))] + [ModelReaderWriterBuildable(typeof(EvaluatorGenerationJob))] + [ModelReaderWriterBuildable(typeof(EvaluatorGenerationJobSource))] + [ModelReaderWriterBuildable(typeof(EvaluatorGenerationTokenUsage))] [ModelReaderWriterBuildable(typeof(EvaluatorMetric))] [ModelReaderWriterBuildable(typeof(EvaluatorVersion))] [ModelReaderWriterBuildable(typeof(FabricDataAgentToolParameters))] [ModelReaderWriterBuildable(typeof(FabricIQPreviewTool))] [ModelReaderWriterBuildable(typeof(FileCitationBody))] + [ModelReaderWriterBuildable(typeof(FileDataGenerationJobOutput))] + [ModelReaderWriterBuildable(typeof(FileDataGenerationJobSource))] [ModelReaderWriterBuildable(typeof(FileDataset))] [ModelReaderWriterBuildable(typeof(FilePath))] [ModelReaderWriterBuildable(typeof(FileSearchToolCallResults))] @@ -131,6 +160,7 @@ namespace Azure.AI.Projects [ModelReaderWriterBuildable(typeof(FunctionShellToolParamEnvironment))] [ModelReaderWriterBuildable(typeof(FunctionShellToolParamEnvironmentContainerReferenceParam))] [ModelReaderWriterBuildable(typeof(FunctionShellToolParamEnvironmentLocalEnvironmentParam))] + [ModelReaderWriterBuildable(typeof(GitHubIssueOpenedRoutineTrigger))] [ModelReaderWriterBuildable(typeof(HourlyRecurrenceSchedule))] #pragma warning disable AAIP001 // global::Azure.AI.Projects.Evaluation.HumanEvaluationPreviewRuleAction is experimental and may change in future versions. [ModelReaderWriterBuildable(typeof(HumanEvaluationPreviewRuleAction))] @@ -220,8 +250,13 @@ namespace Azure.AI.Projects [ModelReaderWriterBuildable(typeof(InternalWebSearchActionOpenPage))] [ModelReaderWriterBuildable(typeof(InternalWebSearchActionSearch))] [ModelReaderWriterBuildable(typeof(InternalWebSearchPreviewTool))] + [ModelReaderWriterBuildable(typeof(InvokeAgentInvocationsApiDispatchPayload))] + [ModelReaderWriterBuildable(typeof(InvokeAgentInvocationsApiRoutineAction))] + [ModelReaderWriterBuildable(typeof(InvokeAgentResponsesApiDispatchPayload))] + [ModelReaderWriterBuildable(typeof(InvokeAgentResponsesApiRoutineAction))] [ModelReaderWriterBuildable(typeof(ItemReferenceParam))] [ModelReaderWriterBuildable(typeof(KeyPressAction))] + [ModelReaderWriterBuildable(typeof(ListMemoriesRequest))] [ModelReaderWriterBuildable(typeof(LocalShellToolParam))] [ModelReaderWriterBuildable(typeof(LocalSkillParam))] [ModelReaderWriterBuildable(typeof(LoraConfig))] @@ -283,10 +318,14 @@ namespace Azure.AI.Projects [ModelReaderWriterBuildable(typeof(PagedScheduleRun))] [ModelReaderWriterBuildable(typeof(PendingUploadConfiguration))] [ModelReaderWriterBuildable(typeof(PendingUploadResult))] + [ModelReaderWriterBuildable(typeof(ProceduralMemoryItem))] [ModelReaderWriterBuildable(typeof(ProjectsInsight))] + [ModelReaderWriterBuildable(typeof(ProjectsRoutine))] [ModelReaderWriterBuildable(typeof(ProjectsSchedule))] [ModelReaderWriterBuildable(typeof(ProjectsScheduleTask))] [ModelReaderWriterBuildable(typeof(PromptBasedEvaluatorDefinition))] + [ModelReaderWriterBuildable(typeof(PromptDataGenerationJobSource))] + [ModelReaderWriterBuildable(typeof(PromptEvaluatorGenerationJobSource))] [ModelReaderWriterBuildable(typeof(RealtimeMCPError))] [ModelReaderWriterBuildable(typeof(RealtimeMCPHTTPError))] [ModelReaderWriterBuildable(typeof(RealtimeMCPProtocolError))] @@ -297,12 +336,20 @@ namespace Azure.AI.Projects [ModelReaderWriterBuildable(typeof(RedTeam))] [ModelReaderWriterBuildable(typeof(ResponseUsageInputTokensDetails))] [ModelReaderWriterBuildable(typeof(ResponseUsageOutputTokensDetails))] + [ModelReaderWriterBuildable(typeof(RoutineAction))] + [ModelReaderWriterBuildable(typeof(RoutineDispatchPayload))] + [ModelReaderWriterBuildable(typeof(RoutineRun))] + [ModelReaderWriterBuildable(typeof(RoutineRunDiagnostics))] + [ModelReaderWriterBuildable(typeof(RoutineTrigger))] + [ModelReaderWriterBuildable(typeof(RubricBasedEvaluatorDefinition))] + [ModelReaderWriterBuildable(typeof(ScheduleRoutineTrigger))] [ModelReaderWriterBuildable(typeof(ScheduleRun))] [ModelReaderWriterBuildable(typeof(ScheduleTrigger))] [ModelReaderWriterBuildable(typeof(ScreenshotParam))] [ModelReaderWriterBuildable(typeof(ScrollParam))] [ModelReaderWriterBuildable(typeof(SharepointGroundingToolParameters))] [ModelReaderWriterBuildable(typeof(SharepointPreviewTool))] + [ModelReaderWriterBuildable(typeof(SimpleQnADataGenerationJobOptions))] [ModelReaderWriterBuildable(typeof(SkillReferenceParam))] [ModelReaderWriterBuildable(typeof(StructuredOutputDefinition))] [ModelReaderWriterBuildable(typeof(SummaryTextContent))] @@ -310,10 +357,16 @@ namespace Azure.AI.Projects [ModelReaderWriterBuildable(typeof(TargetConfig))] [ModelReaderWriterBuildable(typeof(TaxonomyCategory))] [ModelReaderWriterBuildable(typeof(TaxonomySubCategory))] + [ModelReaderWriterBuildable(typeof(TimerRoutineTrigger))] [ModelReaderWriterBuildable(typeof(ToolboxSearchPreviewTool))] + [ModelReaderWriterBuildable(typeof(ToolConfig))] [ModelReaderWriterBuildable(typeof(ToolDescription))] [ModelReaderWriterBuildable(typeof(ToolProjectConnection))] [ModelReaderWriterBuildable(typeof(ToolSearchToolParam))] + [ModelReaderWriterBuildable(typeof(ToolUseFineTuningDataGenerationJobOptions))] + [ModelReaderWriterBuildable(typeof(TracesDataGenerationJobOptions))] + [ModelReaderWriterBuildable(typeof(TracesDataGenerationJobSource))] + [ModelReaderWriterBuildable(typeof(TracesEvaluatorGenerationJobSource))] [ModelReaderWriterBuildable(typeof(TypeParam))] [ModelReaderWriterBuildable(typeof(UnknownAIProjectConnectionBaseCredential))] [ModelReaderWriterBuildable(typeof(UnknownAIProjectDataset))] @@ -325,10 +378,14 @@ namespace Azure.AI.Projects [ModelReaderWriterBuildable(typeof(UnknownContainerNetworkPolicyParam))] [ModelReaderWriterBuildable(typeof(UnknownContainerSkill))] [ModelReaderWriterBuildable(typeof(UnknownCustomToolParamFormat))] + [ModelReaderWriterBuildable(typeof(UnknownDataGenerationJobOptions))] + [ModelReaderWriterBuildable(typeof(UnknownDataGenerationJobOutput))] + [ModelReaderWriterBuildable(typeof(UnknownDataGenerationJobSource))] [ModelReaderWriterBuildable(typeof(UnknownEvaluationRuleAction))] [ModelReaderWriterBuildable(typeof(UnknownEvaluationTarget))] [ModelReaderWriterBuildable(typeof(UnknownEvaluationTaxonomyInput))] [ModelReaderWriterBuildable(typeof(UnknownEvaluatorDefinition))] + [ModelReaderWriterBuildable(typeof(UnknownEvaluatorGenerationJobSource))] [ModelReaderWriterBuildable(typeof(UnknownFunctionAndCustomToolCallOutput))] [ModelReaderWriterBuildable(typeof(UnknownFunctionShellCallItemParamEnvironment))] [ModelReaderWriterBuildable(typeof(UnknownFunctionShellCallOutputOutcomeParam))] @@ -345,6 +402,9 @@ namespace Azure.AI.Projects [ModelReaderWriterBuildable(typeof(UnknownOutputMessageContent))] [ModelReaderWriterBuildable(typeof(UnknownRealtimeMCPError))] [ModelReaderWriterBuildable(typeof(UnknownRecurrenceSchedule))] + [ModelReaderWriterBuildable(typeof(UnknownRoutineAction))] + [ModelReaderWriterBuildable(typeof(UnknownRoutineDispatchPayload))] + [ModelReaderWriterBuildable(typeof(UnknownRoutineTrigger))] [ModelReaderWriterBuildable(typeof(UnknownScheduleTask))] [ModelReaderWriterBuildable(typeof(UnknownTargetConfig))] [ModelReaderWriterBuildable(typeof(UnknownTool))] diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AzureAISearchTool.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/AzureAISearchTool.Serialization.cs index b7851c6241dc..2ba4a84d5942 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AzureAISearchTool.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/AzureAISearchTool.Serialization.cs @@ -86,6 +86,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsCollectionDefined(ToolConfigs)) + { + writer.WritePropertyName("tool_configs"u8); + writer.WriteStartObject(); + foreach (var item in ToolConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } writer.WritePropertyName("azure_ai_search"u8); writer.WriteObjectValue(AzureAiSearch, options); } @@ -119,6 +130,7 @@ internal static AzureAISearchTool DeserializeAzureAISearchTool(JsonElement eleme IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); string name = default; string description = default; + IDictionary toolConfigs = default; AzureAISearchToolResource azureAiSearch = default; foreach (var prop in element.EnumerateObject()) { @@ -137,6 +149,20 @@ internal static AzureAISearchTool DeserializeAzureAISearchTool(JsonElement eleme description = prop.Value.GetString(); continue; } + if (prop.NameEquals("tool_configs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, ToolConfig.DeserializeToolConfig(prop0.Value, options)); + } + toolConfigs = dictionary; + continue; + } if (prop.NameEquals("azure_ai_search"u8)) { azureAiSearch = AzureAISearchToolResource.DeserializeAzureAISearchToolResource(prop.Value, options); @@ -147,7 +173,13 @@ internal static AzureAISearchTool DeserializeAzureAISearchTool(JsonElement eleme additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new AzureAISearchTool(@type, additionalBinaryDataProperties, name, description, azureAiSearch); + return new AzureAISearchTool( + @type, + additionalBinaryDataProperties, + name, + description, + toolConfigs ?? new ChangeTrackingDictionary(), + azureAiSearch); } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AzureAISearchTool.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/AzureAISearchTool.cs index 0bbc34022f33..07d86acd21aa 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AzureAISearchTool.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/AzureAISearchTool.cs @@ -17,6 +17,7 @@ public AzureAISearchTool(AzureAISearchToolResource azureAiSearch) : base(ToolTyp { Argument.AssertNotNull(azureAiSearch, nameof(azureAiSearch)); + ToolConfigs = new ChangeTrackingDictionary(); AzureAiSearch = azureAiSearch; } @@ -25,11 +26,17 @@ public AzureAISearchTool(AzureAISearchToolResource azureAiSearch) : base(ToolTyp /// Keeps track of any properties unknown to the library. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// /// The azure ai search index resource. - internal AzureAISearchTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, AzureAISearchToolResource azureAiSearch) : base(@type, additionalBinaryDataProperties) + internal AzureAISearchTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, IDictionary toolConfigs, AzureAISearchToolResource azureAiSearch) : base(@type, additionalBinaryDataProperties) { Name = name; Description = description; + ToolConfigs = toolConfigs; AzureAiSearch = azureAiSearch; } @@ -39,7 +46,14 @@ internal AzureAISearchTool(ToolType @type, IDictionary addit /// Optional user-defined description for this tool or configuration. public string Description { get; set; } + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + public IDictionary ToolConfigs { get; } + /// The azure ai search index resource. - public AzureAISearchToolResource AzureAiSearch { get; } + public AzureAISearchToolResource AzureAiSearch { get; set; } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AzureFunctionBinding.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/AzureFunctionBinding.cs index a671bd4c43cc..28448db0854a 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AzureFunctionBinding.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/AzureFunctionBinding.cs @@ -35,9 +35,9 @@ internal AzureFunctionBinding(string @type, AzureFunctionStorageQueue storageQue } /// The type of binding, which is always 'storage_queue'. - internal string Type { get; } = "storage_queue"; + public string Type { get; } = "storage_queue"; /// Storage queue. - public AzureFunctionStorageQueue StorageQueue { get; } + public AzureFunctionStorageQueue StorageQueue { get; set; } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AzureFunctionDefinition.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/AzureFunctionDefinition.cs index 3e0464bc9912..1da7d5eb488f 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AzureFunctionDefinition.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/AzureFunctionDefinition.cs @@ -43,12 +43,12 @@ internal AzureFunctionDefinition(AzureFunctionDefinitionFunction function, Azure } /// The definition of azure function and its parameters. - public AzureFunctionDefinitionFunction Function { get; } + public AzureFunctionDefinitionFunction Function { get; set; } /// Input storage queue. The queue storage trigger runs a function as messages are added to it. - public AzureFunctionBinding InputBinding { get; } + public AzureFunctionBinding InputBinding { get; set; } /// Output storage queue. The function writes output to this queue when the input items are processed. - public AzureFunctionBinding OutputBinding { get; } + public AzureFunctionBinding OutputBinding { get; set; } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AzureFunctionDefinitionFunction.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/AzureFunctionDefinitionFunction.cs index b9a5abbcf87b..9e99a989f608 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AzureFunctionDefinitionFunction.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/AzureFunctionDefinitionFunction.cs @@ -36,7 +36,7 @@ internal AzureFunctionDefinitionFunction(string name, string description, IDicti } /// The name of the function to be called. - public string Name { get; } + public string Name { get; set; } /// A description of what the function does, used by the model to choose when and how to call the function. public string Description { get; set; } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AzureFunctionStorageQueue.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/AzureFunctionStorageQueue.cs index c5898747f948..f3b144037c1f 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AzureFunctionStorageQueue.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/AzureFunctionStorageQueue.cs @@ -38,9 +38,9 @@ internal AzureFunctionStorageQueue(string queueServiceEndpoint, string queueName } /// URI to the Azure Storage Queue service allowing you to manipulate a queue. - public string QueueServiceEndpoint { get; } + public string QueueServiceEndpoint { get; set; } /// The name of an Azure function storage queue. - public string QueueName { get; } + public string QueueName { get; set; } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AzureFunctionTool.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/AzureFunctionTool.Serialization.cs index 21fa59392e38..63c5daf7fa69 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AzureFunctionTool.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/AzureFunctionTool.Serialization.cs @@ -78,6 +78,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); writer.WritePropertyName("azure_function"u8); writer.WriteObjectValue(AzureFunction, options); + if (Optional.IsCollectionDefined(ToolConfigs)) + { + writer.WritePropertyName("tool_configs"u8); + writer.WriteStartObject(); + foreach (var item in ToolConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } } /// The JSON reader. @@ -108,6 +119,7 @@ internal static AzureFunctionTool DeserializeAzureFunctionTool(JsonElement eleme ToolType @type = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); AzureFunctionDefinition azureFunction = default; + IDictionary toolConfigs = default; foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("type"u8)) @@ -120,12 +132,26 @@ internal static AzureFunctionTool DeserializeAzureFunctionTool(JsonElement eleme azureFunction = AzureFunctionDefinition.DeserializeAzureFunctionDefinition(prop.Value, options); continue; } + if (prop.NameEquals("tool_configs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, ToolConfig.DeserializeToolConfig(prop0.Value, options)); + } + toolConfigs = dictionary; + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new AzureFunctionTool(@type, additionalBinaryDataProperties, azureFunction); + return new AzureFunctionTool(@type, additionalBinaryDataProperties, azureFunction, toolConfigs ?? new ChangeTrackingDictionary()); } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AzureFunctionTool.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/AzureFunctionTool.cs index 4dc3ac8545f7..9a7a15c08f21 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/AzureFunctionTool.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/AzureFunctionTool.cs @@ -18,18 +18,32 @@ public AzureFunctionTool(AzureFunctionDefinition azureFunction) : base(ToolType. Argument.AssertNotNull(azureFunction, nameof(azureFunction)); AzureFunction = azureFunction; + ToolConfigs = new ChangeTrackingDictionary(); } /// Initializes a new instance of . /// /// Keeps track of any properties unknown to the library. /// The Azure Function Tool definition. - internal AzureFunctionTool(ToolType @type, IDictionary additionalBinaryDataProperties, AzureFunctionDefinition azureFunction) : base(@type, additionalBinaryDataProperties) + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + internal AzureFunctionTool(ToolType @type, IDictionary additionalBinaryDataProperties, AzureFunctionDefinition azureFunction, IDictionary toolConfigs) : base(@type, additionalBinaryDataProperties) { AzureFunction = azureFunction; + ToolConfigs = toolConfigs; } /// The Azure Function Tool definition. - public AzureFunctionDefinition AzureFunction { get; } + public AzureFunctionDefinition AzureFunction { get; set; } + + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + public IDictionary ToolConfigs { get; } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/BingCustomSearchConfiguration.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/BingCustomSearchConfiguration.cs index ab0b4f348cdb..6e94c63c9234 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/BingCustomSearchConfiguration.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/BingCustomSearchConfiguration.cs @@ -46,10 +46,10 @@ internal BingCustomSearchConfiguration(string projectConnectionId, string instan } /// Project connection id for grounding with bing search. - public string ProjectConnectionId { get; } + public string ProjectConnectionId { get; set; } /// Name of the custom configuration instance given to config. - public string InstanceName { get; } + public string InstanceName { get; set; } /// The market where the results come from. public string Market { get; set; } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/BingCustomSearchPreviewTool.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/BingCustomSearchPreviewTool.Serialization.cs index dfdfa03b8e41..6399a967ea7e 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/BingCustomSearchPreviewTool.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/BingCustomSearchPreviewTool.Serialization.cs @@ -86,6 +86,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsCollectionDefined(ToolConfigs)) + { + writer.WritePropertyName("tool_configs"u8); + writer.WriteStartObject(); + foreach (var item in ToolConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } writer.WritePropertyName("bing_custom_search_preview"u8); writer.WriteObjectValue(BingCustomSearchPreview, options); } @@ -119,6 +130,7 @@ internal static BingCustomSearchPreviewTool DeserializeBingCustomSearchPreviewTo IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); string name = default; string description = default; + IDictionary toolConfigs = default; BingCustomSearchToolParameters bingCustomSearchPreview = default; foreach (var prop in element.EnumerateObject()) { @@ -137,6 +149,20 @@ internal static BingCustomSearchPreviewTool DeserializeBingCustomSearchPreviewTo description = prop.Value.GetString(); continue; } + if (prop.NameEquals("tool_configs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, ToolConfig.DeserializeToolConfig(prop0.Value, options)); + } + toolConfigs = dictionary; + continue; + } if (prop.NameEquals("bing_custom_search_preview"u8)) { bingCustomSearchPreview = BingCustomSearchToolParameters.DeserializeBingCustomSearchToolParameters(prop.Value, options); @@ -147,7 +173,13 @@ internal static BingCustomSearchPreviewTool DeserializeBingCustomSearchPreviewTo additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new BingCustomSearchPreviewTool(@type, additionalBinaryDataProperties, name, description, bingCustomSearchPreview); + return new BingCustomSearchPreviewTool( + @type, + additionalBinaryDataProperties, + name, + description, + toolConfigs ?? new ChangeTrackingDictionary(), + bingCustomSearchPreview); } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/BingCustomSearchPreviewTool.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/BingCustomSearchPreviewTool.cs index 162be55384a5..cad1bc3a5b49 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/BingCustomSearchPreviewTool.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/BingCustomSearchPreviewTool.cs @@ -17,6 +17,7 @@ public BingCustomSearchPreviewTool(BingCustomSearchToolParameters bingCustomSear { Argument.AssertNotNull(bingCustomSearchPreview, nameof(bingCustomSearchPreview)); + ToolConfigs = new ChangeTrackingDictionary(); BingCustomSearchPreview = bingCustomSearchPreview; } @@ -25,11 +26,17 @@ public BingCustomSearchPreviewTool(BingCustomSearchToolParameters bingCustomSear /// Keeps track of any properties unknown to the library. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// /// The bing custom search tool parameters. - internal BingCustomSearchPreviewTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, BingCustomSearchToolParameters bingCustomSearchPreview) : base(@type, additionalBinaryDataProperties) + internal BingCustomSearchPreviewTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, IDictionary toolConfigs, BingCustomSearchToolParameters bingCustomSearchPreview) : base(@type, additionalBinaryDataProperties) { Name = name; Description = description; + ToolConfigs = toolConfigs; BingCustomSearchPreview = bingCustomSearchPreview; } @@ -39,7 +46,14 @@ internal BingCustomSearchPreviewTool(ToolType @type, IDictionary Optional user-defined description for this tool or configuration. public string Description { get; set; } + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + public IDictionary ToolConfigs { get; } + /// The bing custom search tool parameters. - public BingCustomSearchToolParameters BingCustomSearchPreview { get; } + public BingCustomSearchToolParameters BingCustomSearchPreview { get; set; } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/BingGroundingSearchConfiguration.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/BingGroundingSearchConfiguration.cs index a75ad09f80f9..703b1cd586d9 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/BingGroundingSearchConfiguration.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/BingGroundingSearchConfiguration.cs @@ -41,7 +41,7 @@ internal BingGroundingSearchConfiguration(string projectConnectionId, string mar } /// Project connection id for grounding with bing search. - public string ProjectConnectionId { get; } + public string ProjectConnectionId { get; set; } /// The market where the results come from. public string Market { get; set; } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/BingGroundingTool.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/BingGroundingTool.Serialization.cs index 536d035824c7..b623eb6716af 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/BingGroundingTool.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/BingGroundingTool.Serialization.cs @@ -86,6 +86,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsCollectionDefined(ToolConfigs)) + { + writer.WritePropertyName("tool_configs"u8); + writer.WriteStartObject(); + foreach (var item in ToolConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } writer.WritePropertyName("bing_grounding"u8); writer.WriteObjectValue(BingGrounding, options); } @@ -119,6 +130,7 @@ internal static BingGroundingTool DeserializeBingGroundingTool(JsonElement eleme IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); string name = default; string description = default; + IDictionary toolConfigs = default; BingGroundingSearchToolParameters bingGrounding = default; foreach (var prop in element.EnumerateObject()) { @@ -137,6 +149,20 @@ internal static BingGroundingTool DeserializeBingGroundingTool(JsonElement eleme description = prop.Value.GetString(); continue; } + if (prop.NameEquals("tool_configs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, ToolConfig.DeserializeToolConfig(prop0.Value, options)); + } + toolConfigs = dictionary; + continue; + } if (prop.NameEquals("bing_grounding"u8)) { bingGrounding = BingGroundingSearchToolParameters.DeserializeBingGroundingSearchToolParameters(prop.Value, options); @@ -147,7 +173,13 @@ internal static BingGroundingTool DeserializeBingGroundingTool(JsonElement eleme additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new BingGroundingTool(@type, additionalBinaryDataProperties, name, description, bingGrounding); + return new BingGroundingTool( + @type, + additionalBinaryDataProperties, + name, + description, + toolConfigs ?? new ChangeTrackingDictionary(), + bingGrounding); } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/BingGroundingTool.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/BingGroundingTool.cs index a42b274d79e0..17bb3b816f3c 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/BingGroundingTool.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/BingGroundingTool.cs @@ -17,6 +17,7 @@ public BingGroundingTool(BingGroundingSearchToolParameters bingGrounding) : base { Argument.AssertNotNull(bingGrounding, nameof(bingGrounding)); + ToolConfigs = new ChangeTrackingDictionary(); BingGrounding = bingGrounding; } @@ -25,11 +26,17 @@ public BingGroundingTool(BingGroundingSearchToolParameters bingGrounding) : base /// Keeps track of any properties unknown to the library. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// /// The bing grounding search tool parameters. - internal BingGroundingTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, BingGroundingSearchToolParameters bingGrounding) : base(@type, additionalBinaryDataProperties) + internal BingGroundingTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, IDictionary toolConfigs, BingGroundingSearchToolParameters bingGrounding) : base(@type, additionalBinaryDataProperties) { Name = name; Description = description; + ToolConfigs = toolConfigs; BingGrounding = bingGrounding; } @@ -39,7 +46,14 @@ internal BingGroundingTool(ToolType @type, IDictionary addit /// Optional user-defined description for this tool or configuration. public string Description { get; set; } + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + public IDictionary ToolConfigs { get; } + /// The bing grounding search tool parameters. - public BingGroundingSearchToolParameters BingGrounding { get; } + public BingGroundingSearchToolParameters BingGrounding { get; set; } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/BrowserAutomationPreviewTool.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/BrowserAutomationPreviewTool.Serialization.cs index 21bd7ff5fed5..97116025a6bd 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/BrowserAutomationPreviewTool.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/BrowserAutomationPreviewTool.Serialization.cs @@ -86,6 +86,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsCollectionDefined(ToolConfigs)) + { + writer.WritePropertyName("tool_configs"u8); + writer.WriteStartObject(); + foreach (var item in ToolConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } writer.WritePropertyName("browser_automation_preview"u8); writer.WriteObjectValue(BrowserAutomationPreview, options); } @@ -119,6 +130,7 @@ internal static BrowserAutomationPreviewTool DeserializeBrowserAutomationPreview IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); string name = default; string description = default; + IDictionary toolConfigs = default; BrowserAutomationToolParameters browserAutomationPreview = default; foreach (var prop in element.EnumerateObject()) { @@ -137,6 +149,20 @@ internal static BrowserAutomationPreviewTool DeserializeBrowserAutomationPreview description = prop.Value.GetString(); continue; } + if (prop.NameEquals("tool_configs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, ToolConfig.DeserializeToolConfig(prop0.Value, options)); + } + toolConfigs = dictionary; + continue; + } if (prop.NameEquals("browser_automation_preview"u8)) { browserAutomationPreview = BrowserAutomationToolParameters.DeserializeBrowserAutomationToolParameters(prop.Value, options); @@ -147,7 +173,13 @@ internal static BrowserAutomationPreviewTool DeserializeBrowserAutomationPreview additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new BrowserAutomationPreviewTool(@type, additionalBinaryDataProperties, name, description, browserAutomationPreview); + return new BrowserAutomationPreviewTool( + @type, + additionalBinaryDataProperties, + name, + description, + toolConfigs ?? new ChangeTrackingDictionary(), + browserAutomationPreview); } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/BrowserAutomationPreviewTool.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/BrowserAutomationPreviewTool.cs index fa253c78085d..aa761431cbe2 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/BrowserAutomationPreviewTool.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/BrowserAutomationPreviewTool.cs @@ -17,6 +17,7 @@ public BrowserAutomationPreviewTool(BrowserAutomationToolParameters browserAutom { Argument.AssertNotNull(browserAutomationPreview, nameof(browserAutomationPreview)); + ToolConfigs = new ChangeTrackingDictionary(); BrowserAutomationPreview = browserAutomationPreview; } @@ -25,11 +26,17 @@ public BrowserAutomationPreviewTool(BrowserAutomationToolParameters browserAutom /// Keeps track of any properties unknown to the library. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// /// The Browser Automation Tool parameters. - internal BrowserAutomationPreviewTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, BrowserAutomationToolParameters browserAutomationPreview) : base(@type, additionalBinaryDataProperties) + internal BrowserAutomationPreviewTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, IDictionary toolConfigs, BrowserAutomationToolParameters browserAutomationPreview) : base(@type, additionalBinaryDataProperties) { Name = name; Description = description; + ToolConfigs = toolConfigs; BrowserAutomationPreview = browserAutomationPreview; } @@ -39,7 +46,14 @@ internal BrowserAutomationPreviewTool(ToolType @type, IDictionary Optional user-defined description for this tool or configuration. public string Description { get; set; } + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + public IDictionary ToolConfigs { get; } + /// The Browser Automation Tool parameters. - public BrowserAutomationToolParameters BrowserAutomationPreview { get; } + public BrowserAutomationToolParameters BrowserAutomationPreview { get; set; } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/BrowserAutomationToolConnectionParameters.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/BrowserAutomationToolConnectionParameters.cs index 9df6d86ef797..d231b1b79792 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/BrowserAutomationToolConnectionParameters.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/BrowserAutomationToolConnectionParameters.cs @@ -33,6 +33,6 @@ internal BrowserAutomationToolConnectionParameters(string projectConnectionId, I } /// The ID of the project connection to your Azure Playwright resource. - public string ProjectConnectionId { get; } + public string ProjectConnectionId { get; set; } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/BrowserAutomationToolParameters.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/BrowserAutomationToolParameters.cs index 67c298c65e9b..548df8e8d28e 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/BrowserAutomationToolParameters.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/BrowserAutomationToolParameters.cs @@ -33,6 +33,6 @@ internal BrowserAutomationToolParameters(BrowserAutomationToolConnectionParamete } /// The project connection parameters associated with the Browser Automation Tool. - public BrowserAutomationToolConnectionParameters Connection { get; } + public BrowserAutomationToolConnectionParameters Connection { get; set; } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/CaptureStructuredOutputsTool.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/CaptureStructuredOutputsTool.Serialization.cs index f5c360fa9e58..6aff49fdce44 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/CaptureStructuredOutputsTool.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/CaptureStructuredOutputsTool.Serialization.cs @@ -86,6 +86,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsCollectionDefined(ToolConfigs)) + { + writer.WritePropertyName("tool_configs"u8); + writer.WriteStartObject(); + foreach (var item in ToolConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } writer.WritePropertyName("outputs"u8); writer.WriteObjectValue(Outputs, options); } @@ -119,6 +130,7 @@ internal static CaptureStructuredOutputsTool DeserializeCaptureStructuredOutputs IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); string name = default; string description = default; + IDictionary toolConfigs = default; StructuredOutputDefinition outputs = default; foreach (var prop in element.EnumerateObject()) { @@ -137,6 +149,20 @@ internal static CaptureStructuredOutputsTool DeserializeCaptureStructuredOutputs description = prop.Value.GetString(); continue; } + if (prop.NameEquals("tool_configs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, ToolConfig.DeserializeToolConfig(prop0.Value, options)); + } + toolConfigs = dictionary; + continue; + } if (prop.NameEquals("outputs"u8)) { outputs = StructuredOutputDefinition.DeserializeStructuredOutputDefinition(prop.Value, options); @@ -147,7 +173,13 @@ internal static CaptureStructuredOutputsTool DeserializeCaptureStructuredOutputs additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new CaptureStructuredOutputsTool(@type, additionalBinaryDataProperties, name, description, outputs); + return new CaptureStructuredOutputsTool( + @type, + additionalBinaryDataProperties, + name, + description, + toolConfigs ?? new ChangeTrackingDictionary(), + outputs); } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/CaptureStructuredOutputsTool.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/CaptureStructuredOutputsTool.cs index 3a1a3a182897..89d1cb776ac0 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/CaptureStructuredOutputsTool.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/CaptureStructuredOutputsTool.cs @@ -17,6 +17,7 @@ public CaptureStructuredOutputsTool(StructuredOutputDefinition outputs) : base(T { Argument.AssertNotNull(outputs, nameof(outputs)); + ToolConfigs = new ChangeTrackingDictionary(); Outputs = outputs; } @@ -25,11 +26,17 @@ public CaptureStructuredOutputsTool(StructuredOutputDefinition outputs) : base(T /// Keeps track of any properties unknown to the library. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// /// The structured outputs to capture from the model. - internal CaptureStructuredOutputsTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, StructuredOutputDefinition outputs) : base(@type, additionalBinaryDataProperties) + internal CaptureStructuredOutputsTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, IDictionary toolConfigs, StructuredOutputDefinition outputs) : base(@type, additionalBinaryDataProperties) { Name = name; Description = description; + ToolConfigs = toolConfigs; Outputs = outputs; } @@ -39,7 +46,14 @@ internal CaptureStructuredOutputsTool(ToolType @type, IDictionary Optional user-defined description for this tool or configuration. public string Description { get; set; } + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + public IDictionary ToolConfigs { get; } + /// The structured outputs to capture from the model. - public StructuredOutputDefinition Outputs { get; } + public StructuredOutputDefinition Outputs { get; set; } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/CreateOrUpdateRoutineRequest.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/CreateOrUpdateRoutineRequest.Serialization.cs new file mode 100644 index 000000000000..71458d89bca6 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/CreateOrUpdateRoutineRequest.Serialization.cs @@ -0,0 +1,195 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.AI.Projects +{ + /// The CreateOrUpdateRoutineRequest. + internal partial class CreateOrUpdateRoutineRequest : IJsonModel + { + /// Initializes a new instance of for deserialization. + internal CreateOrUpdateRoutineRequest() + { + } + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual CreateOrUpdateRoutineRequest PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeCreateOrUpdateRoutineRequest(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(CreateOrUpdateRoutineRequest)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(CreateOrUpdateRoutineRequest)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + CreateOrUpdateRoutineRequest IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The to serialize into . + public static implicit operator BinaryContent(CreateOrUpdateRoutineRequest createOrUpdateRoutineRequest) + { + if (createOrUpdateRoutineRequest == null) + { + return null; + } + return BinaryContent.Create(createOrUpdateRoutineRequest, ModelSerializationExtensions.WireOptions); + } + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CreateOrUpdateRoutineRequest)} does not support writing '{format}' format."); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (Optional.IsDefined(Enabled)) + { + writer.WritePropertyName("enabled"u8); + writer.WriteBooleanValue(Enabled.Value); + } + writer.WritePropertyName("triggers"u8); + writer.WriteStartObject(); + foreach (var item in Triggers) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + writer.WritePropertyName("action"u8); + writer.WriteObjectValue(Action, options); + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + CreateOrUpdateRoutineRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual CreateOrUpdateRoutineRequest JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(CreateOrUpdateRoutineRequest)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeCreateOrUpdateRoutineRequest(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static CreateOrUpdateRoutineRequest DeserializeCreateOrUpdateRoutineRequest(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string description = default; + bool? enabled = default; + IDictionary triggers = default; + RoutineAction action = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("description"u8)) + { + description = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("enabled"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + enabled = prop.Value.GetBoolean(); + continue; + } + if (prop.NameEquals("triggers"u8)) + { + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, RoutineTrigger.DeserializeRoutineTrigger(prop0.Value, options)); + } + triggers = dictionary; + continue; + } + if (prop.NameEquals("action"u8)) + { + action = RoutineAction.DeserializeRoutineAction(prop.Value, options); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new CreateOrUpdateRoutineRequest(description, enabled, triggers, action, additionalBinaryDataProperties); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/CreateOrUpdateRoutineRequest.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/CreateOrUpdateRoutineRequest.cs new file mode 100644 index 000000000000..b464ec7a940b --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/CreateOrUpdateRoutineRequest.cs @@ -0,0 +1,52 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + /// The CreateOrUpdateRoutineRequest. + internal partial class CreateOrUpdateRoutineRequest + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + /// The triggers configured for the routine. In v1, exactly one trigger entry is supported. + /// The action executed when the routine fires. + internal CreateOrUpdateRoutineRequest(IDictionary triggers, RoutineAction action) + { + Triggers = triggers; + Action = action; + } + + /// Initializes a new instance of . + /// A human-readable description of the routine. + /// Whether the routine is enabled. + /// The triggers configured for the routine. In v1, exactly one trigger entry is supported. + /// The action executed when the routine fires. + /// Keeps track of any properties unknown to the library. + internal CreateOrUpdateRoutineRequest(string description, bool? enabled, IDictionary triggers, RoutineAction action, IDictionary additionalBinaryDataProperties) + { + Description = description; + Enabled = enabled; + Triggers = triggers; + Action = action; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// A human-readable description of the routine. + public string Description { get; } + + /// Whether the routine is enabled. + public bool? Enabled { get; } + + /// The triggers configured for the routine. In v1, exactly one trigger entry is supported. + public IDictionary Triggers { get; } + + /// The action executed when the routine fires. + public RoutineAction Action { get; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/DataGenerationJob.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DataGenerationJob.Serialization.cs new file mode 100644 index 000000000000..715a65cec062 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DataGenerationJob.Serialization.cs @@ -0,0 +1,246 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.AI.Projects +{ + /// Data Generation Job resource. + public partial class DataGenerationJob : IJsonModel + { + /// The data to parse. + /// The client options for reading and writing models. + protected virtual DataGenerationJob PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeDataGenerationJob(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataGenerationJob)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(DataGenerationJob)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + DataGenerationJob IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The to serialize into . + public static implicit operator BinaryContent(DataGenerationJob dataGenerationJob) + { + if (dataGenerationJob == null) + { + return null; + } + return BinaryContent.Create(dataGenerationJob, ModelSerializationExtensions.WireOptions); + } + + /// The to deserialize the from. + public static explicit operator DataGenerationJob(ClientResult result) + { + PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDataGenerationJob(document.RootElement, ModelSerializationExtensions.WireOptions); + } + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataGenerationJob)} does not support writing '{format}' format."); + } + if (options.Format != "W") + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (Optional.IsDefined(Inputs)) + { + writer.WritePropertyName("inputs"u8); + writer.WriteObjectValue(Inputs, options); + } + if (options.Format != "W" && Optional.IsDefined(Result)) + { + writer.WritePropertyName("result"u8); + writer.WriteObjectValue(Result, options); + } + if (options.Format != "W") + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(Error)) + { + writer.WritePropertyName("error"u8); + writer.WriteObjectValue(Error, options); + } + if (options.Format != "W") + { + writer.WritePropertyName("created_at"u8); + writer.WriteNumberValue(CreatedAt, "U"); + } + if (options.Format != "W" && Optional.IsDefined(FinishedAt)) + { + writer.WritePropertyName("finished_at"u8); + writer.WriteNumberValue(FinishedAt.Value, "U"); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + DataGenerationJob IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual DataGenerationJob JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataGenerationJob)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataGenerationJob(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static DataGenerationJob DeserializeDataGenerationJob(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string id = default; + DataGenerationJobInputs inputs = default; + DataGenerationJobResult result = default; + JobStatus status = default; + FoundryOpenAIError error = default; + DateTimeOffset createdAt = default; + DateTimeOffset? finishedAt = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("id"u8)) + { + id = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("inputs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + inputs = DataGenerationJobInputs.DeserializeDataGenerationJobInputs(prop.Value, options); + continue; + } + if (prop.NameEquals("result"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + result = DataGenerationJobResult.DeserializeDataGenerationJobResult(prop.Value, options); + continue; + } + if (prop.NameEquals("status"u8)) + { + status = new JobStatus(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("error"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + error = FoundryOpenAIError.DeserializeFoundryOpenAIError(prop.Value, options); + continue; + } + if (prop.NameEquals("created_at"u8)) + { + createdAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); + continue; + } + if (prop.NameEquals("finished_at"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + finishedAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new DataGenerationJob( + id, + inputs, + result, + status, + error, + createdAt, + finishedAt, + additionalBinaryDataProperties); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/DataGenerationJob.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DataGenerationJob.cs new file mode 100644 index 000000000000..5f70eb21c809 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DataGenerationJob.cs @@ -0,0 +1,60 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + /// Data Generation Job resource. + public partial class DataGenerationJob + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + public DataGenerationJob() + { + } + + /// Initializes a new instance of . + /// Server-assigned unique identifier. + /// Caller-supplied inputs. + /// Result produced on success. + /// Current lifecycle status. + /// Error details — populated only on failure. + /// The timestamp when the job was created, represented in Unix time (seconds since January 1, 1970). + /// The timestamp when the job was finished, represented in Unix time (seconds since January 1, 1970). + /// Keeps track of any properties unknown to the library. + internal DataGenerationJob(string id, DataGenerationJobInputs inputs, DataGenerationJobResult result, JobStatus status, FoundryOpenAIError error, DateTimeOffset createdAt, DateTimeOffset? finishedAt, IDictionary additionalBinaryDataProperties) + { + Id = id; + Inputs = inputs; + Result = result; + Status = status; + Error = error; + CreatedAt = createdAt; + FinishedAt = finishedAt; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// Server-assigned unique identifier. + public string Id { get; } + + /// Caller-supplied inputs. + public DataGenerationJobInputs Inputs { get; set; } + + /// Result produced on success. + public DataGenerationJobResult Result { get; } + + /// Current lifecycle status. + public JobStatus Status { get; } + + /// The timestamp when the job was created, represented in Unix time (seconds since January 1, 1970). + public DateTimeOffset CreatedAt { get; } + + /// The timestamp when the job was finished, represented in Unix time (seconds since January 1, 1970). + public DateTimeOffset? FinishedAt { get; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/DataGenerationJobInputs.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DataGenerationJobInputs.Serialization.cs new file mode 100644 index 000000000000..702a60123ce8 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DataGenerationJobInputs.Serialization.cs @@ -0,0 +1,194 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.AI.Projects +{ + /// Caller-supplied inputs for a data generation job. + public partial class DataGenerationJobInputs : IJsonModel + { + /// Initializes a new instance of for deserialization. + internal DataGenerationJobInputs() + { + } + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual DataGenerationJobInputs PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeDataGenerationJobInputs(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataGenerationJobInputs)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(DataGenerationJobInputs)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + DataGenerationJobInputs IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataGenerationJobInputs)} does not support writing '{format}' format."); + } + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("sources"u8); + writer.WriteStartArray(); + foreach (DataGenerationJobSource item in Sources) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + writer.WritePropertyName("options"u8); + writer.WriteObjectValue(Options, options); + writer.WritePropertyName("scenario"u8); + writer.WriteStringValue(Scenario.ToString()); + if (Optional.IsDefined(OutputOptions)) + { + writer.WritePropertyName("output_options"u8); + writer.WriteObjectValue(OutputOptions, options); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + DataGenerationJobInputs IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual DataGenerationJobInputs JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataGenerationJobInputs)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataGenerationJobInputs(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static DataGenerationJobInputs DeserializeDataGenerationJobInputs(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + IList sources = default; + DataGenerationJobOptions options0 = default; + DataGenerationJobScenario scenario = default; + DataGenerationJobOutputOptions outputOptions = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("name"u8)) + { + name = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("sources"u8)) + { + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(DataGenerationJobSource.DeserializeDataGenerationJobSource(item, options)); + } + sources = array; + continue; + } + if (prop.NameEquals("options"u8)) + { + options0 = DataGenerationJobOptions.DeserializeDataGenerationJobOptions(prop.Value, options); + continue; + } + if (prop.NameEquals("scenario"u8)) + { + scenario = new DataGenerationJobScenario(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("output_options"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + outputOptions = DataGenerationJobOutputOptions.DeserializeDataGenerationJobOutputOptions(prop.Value, options); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new DataGenerationJobInputs( + name, + sources, + options0, + scenario, + outputOptions, + additionalBinaryDataProperties); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/DataGenerationJobInputs.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DataGenerationJobInputs.cs new file mode 100644 index 000000000000..7c62b402c5cc --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DataGenerationJobInputs.cs @@ -0,0 +1,67 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.AI.Projects +{ + /// Caller-supplied inputs for a data generation job. + public partial class DataGenerationJobInputs + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + /// The display name of the data generation job. + /// The sources used for the data generation job. + /// The options for the data generation job. + /// The scenario of the data generation job. Either for fine-tuning or evaluation. + /// , or is null. + public DataGenerationJobInputs(string name, IEnumerable sources, DataGenerationJobOptions options, DataGenerationJobScenario scenario) + { + Argument.AssertNotNull(name, nameof(name)); + Argument.AssertNotNull(sources, nameof(sources)); + Argument.AssertNotNull(options, nameof(options)); + + Name = name; + Sources = sources.ToList(); + Options = options; + Scenario = scenario; + } + + /// Initializes a new instance of . + /// The display name of the data generation job. + /// The sources used for the data generation job. + /// The options for the data generation job. + /// The scenario of the data generation job. Either for fine-tuning or evaluation. + /// Optional caller-supplied metadata for the job's output. See individual fields for whether they apply to file outputs (fine-tuning scenarios), dataset outputs (evaluation scenario), or both. + /// Keeps track of any properties unknown to the library. + internal DataGenerationJobInputs(string name, IList sources, DataGenerationJobOptions options, DataGenerationJobScenario scenario, DataGenerationJobOutputOptions outputOptions, IDictionary additionalBinaryDataProperties) + { + Name = name; + Sources = sources; + Options = options; + Scenario = scenario; + OutputOptions = outputOptions; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// The display name of the data generation job. + public string Name { get; set; } + + /// The sources used for the data generation job. + public IList Sources { get; } + + /// The options for the data generation job. + public DataGenerationJobOptions Options { get; set; } + + /// The scenario of the data generation job. Either for fine-tuning or evaluation. + public DataGenerationJobScenario Scenario { get; set; } + + /// Optional caller-supplied metadata for the job's output. See individual fields for whether they apply to file outputs (fine-tuning scenarios), dataset outputs (evaluation scenario), or both. + public DataGenerationJobOutputOptions OutputOptions { get; set; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/DataGenerationJobKind.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DataGenerationJobKind.cs new file mode 100644 index 000000000000..52cbd9a213de --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DataGenerationJobKind.cs @@ -0,0 +1,72 @@ +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.AI.Projects +{ + /// The supported data generation job types. + public readonly partial struct DataGenerationJobKind : IEquatable + { + private readonly string _value; + /// Simple question and answers between user and agent. + private const string SimpleQnaValue = "simple_qna"; + /// Single turn query and response from agent traces. + private const string TracesValue = "traces"; + /// Tool calling conversation between user and agent. + private const string ToolUseValue = "tool_use"; + + /// Initializes a new instance of . + /// The value. + /// is null. + public DataGenerationJobKind(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + + /// Simple question and answers between user and agent. + public static DataGenerationJobKind SimpleQna { get; } = new DataGenerationJobKind(SimpleQnaValue); + + /// Single turn query and response from agent traces. + public static DataGenerationJobKind Traces { get; } = new DataGenerationJobKind(TracesValue); + + /// Tool calling conversation between user and agent. + public static DataGenerationJobKind ToolUse { get; } = new DataGenerationJobKind(ToolUseValue); + + /// Determines if two values are the same. + /// The left value to compare. + /// The right value to compare. + public static bool operator ==(DataGenerationJobKind left, DataGenerationJobKind right) => left.Equals(right); + + /// Determines if two values are not the same. + /// The left value to compare. + /// The right value to compare. + public static bool operator !=(DataGenerationJobKind left, DataGenerationJobKind right) => !left.Equals(right); + + /// Converts a string to a . + /// The value. + public static implicit operator DataGenerationJobKind(string value) => new DataGenerationJobKind(value); + + /// Converts a string to a . + /// The value. + public static implicit operator DataGenerationJobKind?(string value) => value == null ? null : new DataGenerationJobKind(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DataGenerationJobKind other && Equals(other); + + /// + public bool Equals(DataGenerationJobKind 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/Models/DataGenerationJobOptions.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DataGenerationJobOptions.Serialization.cs new file mode 100644 index 000000000000..3b741864e2b8 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DataGenerationJobOptions.Serialization.cs @@ -0,0 +1,152 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.AI.Projects +{ + /// + /// Options for managing data generation jobs. + /// Please note this is the abstract base class. The derived classes available for instantiation are: , , and . + /// + [PersistableModelProxy(typeof(UnknownDataGenerationJobOptions))] + public abstract partial class DataGenerationJobOptions : IJsonModel + { + /// Initializes a new instance of for deserialization. + internal DataGenerationJobOptions() + { + } + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual DataGenerationJobOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeDataGenerationJobOptions(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataGenerationJobOptions)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(DataGenerationJobOptions)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + DataGenerationJobOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataGenerationJobOptions)} does not support writing '{format}' format."); + } + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); + writer.WritePropertyName("max_samples"u8); + writer.WriteNumberValue(MaxSamples); + if (Optional.IsDefined(TrainSplit)) + { + writer.WritePropertyName("train_split"u8); + writer.WriteNumberValue(TrainSplit.Value); + } + if (Optional.IsDefined(ModelOptions)) + { + writer.WritePropertyName("model_options"u8); + writer.WriteObjectValue(ModelOptions, options); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + DataGenerationJobOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual DataGenerationJobOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataGenerationJobOptions)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataGenerationJobOptions(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static DataGenerationJobOptions DeserializeDataGenerationJobOptions(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("type"u8, out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "simple_qna": + return SimpleQnADataGenerationJobOptions.DeserializeSimpleQnADataGenerationJobOptions(element, options); + case "traces": + return TracesDataGenerationJobOptions.DeserializeTracesDataGenerationJobOptions(element, options); + case "tool_use": + return ToolUseFineTuningDataGenerationJobOptions.DeserializeToolUseFineTuningDataGenerationJobOptions(element, options); + } + } + return UnknownDataGenerationJobOptions.DeserializeUnknownDataGenerationJobOptions(element, options); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/DataGenerationJobOptions.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DataGenerationJobOptions.cs new file mode 100644 index 000000000000..b9fcf8bd495f --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DataGenerationJobOptions.cs @@ -0,0 +1,55 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + /// + /// Options for managing data generation jobs. + /// Please note this is the abstract base class. The derived classes available for instantiation are: , , and . + /// + public abstract partial class DataGenerationJobOptions + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + /// The data generation job type. + /// Maximum number of samples to generate. + private protected DataGenerationJobOptions(DataGenerationJobKind @type, int maxSamples) + { + Type = @type; + MaxSamples = maxSamples; + } + + /// Initializes a new instance of . + /// The data generation job type. + /// Maximum number of samples to generate. + /// The proportion of the generated data to be used for training when the data is used for fine-tuning. The rest will be used for validation. Value should be between 0 and 1. + /// The LLM model options. + /// Keeps track of any properties unknown to the library. + internal DataGenerationJobOptions(DataGenerationJobKind @type, int maxSamples, float? trainSplit, DataGenerationModelOptions modelOptions, IDictionary additionalBinaryDataProperties) + { + Type = @type; + MaxSamples = maxSamples; + TrainSplit = trainSplit; + ModelOptions = modelOptions; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// The data generation job type. + internal DataGenerationJobKind Type { get; set; } + + /// Maximum number of samples to generate. + public int MaxSamples { get; set; } + + /// The proportion of the generated data to be used for training when the data is used for fine-tuning. The rest will be used for validation. Value should be between 0 and 1. + public float? TrainSplit { get; set; } + + /// The LLM model options. + public DataGenerationModelOptions ModelOptions { get; set; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/DataGenerationJobOutput.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DataGenerationJobOutput.Serialization.cs new file mode 100644 index 000000000000..2d743d199620 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DataGenerationJobOutput.Serialization.cs @@ -0,0 +1,138 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.AI.Projects +{ + /// + /// Output information for a data generation job. + /// Please note this is the abstract base class. The derived classes available for instantiation are: and . + /// + [PersistableModelProxy(typeof(UnknownDataGenerationJobOutput))] + public abstract partial class DataGenerationJobOutput : IJsonModel + { + /// Initializes a new instance of for deserialization. + internal DataGenerationJobOutput() + { + } + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual DataGenerationJobOutput PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeDataGenerationJobOutput(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataGenerationJobOutput)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(DataGenerationJobOutput)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + DataGenerationJobOutput IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataGenerationJobOutput)} does not support writing '{format}' format."); + } + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + DataGenerationJobOutput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual DataGenerationJobOutput JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataGenerationJobOutput)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataGenerationJobOutput(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static DataGenerationJobOutput DeserializeDataGenerationJobOutput(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("type"u8, out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "file": + return FileDataGenerationJobOutput.DeserializeFileDataGenerationJobOutput(element, options); + case "dataset": + return DatasetDataGenerationJobOutput.DeserializeDatasetDataGenerationJobOutput(element, options); + } + } + return UnknownDataGenerationJobOutput.DeserializeUnknownDataGenerationJobOutput(element, options); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/DataGenerationJobOutput.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DataGenerationJobOutput.cs new file mode 100644 index 000000000000..4f80e22f3be7 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DataGenerationJobOutput.cs @@ -0,0 +1,38 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + /// + /// Output information for a data generation job. + /// Please note this is the abstract base class. The derived classes available for instantiation are: and . + /// + public abstract partial class DataGenerationJobOutput + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + /// The type of the output. + private protected DataGenerationJobOutput(DataGenerationJobOutputType @type) + { + Type = @type; + } + + /// Initializes a new instance of . + /// The type of the output. + /// Keeps track of any properties unknown to the library. + internal DataGenerationJobOutput(DataGenerationJobOutputType @type, IDictionary additionalBinaryDataProperties) + { + Type = @type; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// The type of the output. + internal DataGenerationJobOutputType Type { get; set; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/DataGenerationJobOutputOptions.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DataGenerationJobOutputOptions.Serialization.cs new file mode 100644 index 000000000000..4fe2ec1dd240 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DataGenerationJobOutputOptions.Serialization.cs @@ -0,0 +1,186 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.AI.Projects +{ + /// Output options for data generation job. + public partial class DataGenerationJobOutputOptions : IJsonModel + { + /// The data to parse. + /// The client options for reading and writing models. + protected virtual DataGenerationJobOutputOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeDataGenerationJobOutputOptions(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataGenerationJobOutputOptions)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(DataGenerationJobOutputOptions)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + DataGenerationJobOutputOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataGenerationJobOutputOptions)} does not support writing '{format}' format."); + } + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + DataGenerationJobOutputOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual DataGenerationJobOutputOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataGenerationJobOutputOptions)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataGenerationJobOutputOptions(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static DataGenerationJobOutputOptions DeserializeDataGenerationJobOutputOptions(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + string description = default; + IDictionary tags = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("name"u8)) + { + name = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("description"u8)) + { + description = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("tags"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + if (prop0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(prop0.Name, null); + } + else + { + dictionary.Add(prop0.Name, prop0.Value.GetString()); + } + } + tags = dictionary; + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new DataGenerationJobOutputOptions(name, description, tags ?? new ChangeTrackingDictionary(), additionalBinaryDataProperties); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/DataGenerationJobOutputOptions.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DataGenerationJobOutputOptions.cs new file mode 100644 index 000000000000..f22ca17b779d --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DataGenerationJobOutputOptions.cs @@ -0,0 +1,44 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + /// Output options for data generation job. + public partial class DataGenerationJobOutputOptions + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + public DataGenerationJobOutputOptions() + { + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// Name to assign to the output. Used as the filename for Azure OpenAI file outputs (fine-tuning scenarios) and as the dataset name for dataset outputs (evaluation scenario). + /// Description to assign to the output. Applies only to dataset outputs (evaluation scenario); ignored for Azure OpenAI file outputs. + /// Tags to assign to the output. Applies only to dataset outputs (evaluation scenario); ignored for Azure OpenAI file outputs. + /// Keeps track of any properties unknown to the library. + internal DataGenerationJobOutputOptions(string name, string description, IDictionary tags, IDictionary additionalBinaryDataProperties) + { + Name = name; + Description = description; + Tags = tags; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// Name to assign to the output. Used as the filename for Azure OpenAI file outputs (fine-tuning scenarios) and as the dataset name for dataset outputs (evaluation scenario). + public string Name { get; set; } + + /// Description to assign to the output. Applies only to dataset outputs (evaluation scenario); ignored for Azure OpenAI file outputs. + public string Description { get; set; } + + /// Tags to assign to the output. Applies only to dataset outputs (evaluation scenario); ignored for Azure OpenAI file outputs. + public IDictionary Tags { get; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/DataGenerationJobOutputType.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DataGenerationJobOutputType.cs new file mode 100644 index 000000000000..fd17873ad989 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DataGenerationJobOutputType.cs @@ -0,0 +1,67 @@ +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.AI.Projects +{ + /// The supported output file types for a data generation job. + internal readonly partial struct DataGenerationJobOutputType : IEquatable + { + private readonly string _value; + /// The generated data is an Azure OpenAI File. + private const string FileValue = "file"; + /// The generated data is a Dataset. + private const string DatasetValue = "dataset"; + + /// Initializes a new instance of . + /// The value. + /// is null. + public DataGenerationJobOutputType(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + + /// The generated data is an Azure OpenAI File. + public static DataGenerationJobOutputType File { get; } = new DataGenerationJobOutputType(FileValue); + + /// The generated data is a Dataset. + public static DataGenerationJobOutputType Dataset { get; } = new DataGenerationJobOutputType(DatasetValue); + + /// Determines if two values are the same. + /// The left value to compare. + /// The right value to compare. + public static bool operator ==(DataGenerationJobOutputType left, DataGenerationJobOutputType right) => left.Equals(right); + + /// Determines if two values are not the same. + /// The left value to compare. + /// The right value to compare. + public static bool operator !=(DataGenerationJobOutputType left, DataGenerationJobOutputType right) => !left.Equals(right); + + /// Converts a string to a . + /// The value. + public static implicit operator DataGenerationJobOutputType(string value) => new DataGenerationJobOutputType(value); + + /// Converts a string to a . + /// The value. + public static implicit operator DataGenerationJobOutputType?(string value) => value == null ? null : new DataGenerationJobOutputType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DataGenerationJobOutputType other && Equals(other); + + /// + public bool Equals(DataGenerationJobOutputType 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/Models/DataGenerationJobResult.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DataGenerationJobResult.Serialization.cs new file mode 100644 index 000000000000..09df4a12d288 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DataGenerationJobResult.Serialization.cs @@ -0,0 +1,179 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.AI.Projects +{ + /// Result produced by a successful data generation job. + public partial class DataGenerationJobResult : IJsonModel + { + /// Initializes a new instance of for deserialization. + internal DataGenerationJobResult() + { + } + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual DataGenerationJobResult PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeDataGenerationJobResult(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataGenerationJobResult)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(DataGenerationJobResult)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + DataGenerationJobResult IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataGenerationJobResult)} does not support writing '{format}' format."); + } + if (Optional.IsCollectionDefined(Outputs)) + { + writer.WritePropertyName("outputs"u8); + writer.WriteStartArray(); + foreach (DataGenerationJobOutput item in Outputs) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + } + writer.WritePropertyName("generated_samples"u8); + writer.WriteNumberValue(GeneratedSamples); + if (Optional.IsDefined(TokenUsage)) + { + writer.WritePropertyName("token_usage"u8); + writer.WriteObjectValue(TokenUsage, options); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + DataGenerationJobResult IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual DataGenerationJobResult JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataGenerationJobResult)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataGenerationJobResult(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static DataGenerationJobResult DeserializeDataGenerationJobResult(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList outputs = default; + int generatedSamples = default; + DataGenerationTokenUsage tokenUsage = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("outputs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(DataGenerationJobOutput.DeserializeDataGenerationJobOutput(item, options)); + } + outputs = array; + continue; + } + if (prop.NameEquals("generated_samples"u8)) + { + generatedSamples = prop.Value.GetInt32(); + continue; + } + if (prop.NameEquals("token_usage"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + tokenUsage = DataGenerationTokenUsage.DeserializeDataGenerationTokenUsage(prop.Value, options); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new DataGenerationJobResult(outputs ?? new ChangeTrackingList(), generatedSamples, tokenUsage, additionalBinaryDataProperties); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/DataGenerationJobResult.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DataGenerationJobResult.cs new file mode 100644 index 000000000000..491053aa4277 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DataGenerationJobResult.cs @@ -0,0 +1,46 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + /// Result produced by a successful data generation job. + public partial class DataGenerationJobResult + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + /// The number of samples actually generated. + internal DataGenerationJobResult(int generatedSamples) + { + Outputs = new ChangeTrackingList(); + GeneratedSamples = generatedSamples; + } + + /// Initializes a new instance of . + /// The final job outputs: Azure OpenAI files for fine-tuning, or datasets for evaluation. + /// The number of samples actually generated. + /// The token usage information for the data generation job. + /// Keeps track of any properties unknown to the library. + internal DataGenerationJobResult(IList outputs, int generatedSamples, DataGenerationTokenUsage tokenUsage, IDictionary additionalBinaryDataProperties) + { + Outputs = outputs; + GeneratedSamples = generatedSamples; + TokenUsage = tokenUsage; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// The final job outputs: Azure OpenAI files for fine-tuning, or datasets for evaluation. + public IList Outputs { get; } + + /// The number of samples actually generated. + public int GeneratedSamples { get; } + + /// The token usage information for the data generation job. + public DataGenerationTokenUsage TokenUsage { get; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/DataGenerationJobScenario.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DataGenerationJobScenario.cs new file mode 100644 index 000000000000..0c626a4fae49 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DataGenerationJobScenario.cs @@ -0,0 +1,72 @@ +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.AI.Projects +{ + /// The supported scenarios for a data generation job. + public readonly partial struct DataGenerationJobScenario : IEquatable + { + private readonly string _value; + /// Supervised Fine-tuning scenario. + private const string SupervisedFinetuningValue = "supervised_finetuning"; + /// Reinforcement Fine-tuning scenario. + private const string ReinforcementFinetuningValue = "reinforcement_finetuning"; + /// Evaluation scenario. + private const string EvaluationValue = "evaluation"; + + /// Initializes a new instance of . + /// The value. + /// is null. + public DataGenerationJobScenario(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + + /// Supervised Fine-tuning scenario. + public static DataGenerationJobScenario SupervisedFinetuning { get; } = new DataGenerationJobScenario(SupervisedFinetuningValue); + + /// Reinforcement Fine-tuning scenario. + public static DataGenerationJobScenario ReinforcementFinetuning { get; } = new DataGenerationJobScenario(ReinforcementFinetuningValue); + + /// Evaluation scenario. + public static DataGenerationJobScenario Evaluation { get; } = new DataGenerationJobScenario(EvaluationValue); + + /// Determines if two values are the same. + /// The left value to compare. + /// The right value to compare. + public static bool operator ==(DataGenerationJobScenario left, DataGenerationJobScenario right) => left.Equals(right); + + /// Determines if two values are not the same. + /// The left value to compare. + /// The right value to compare. + public static bool operator !=(DataGenerationJobScenario left, DataGenerationJobScenario right) => !left.Equals(right); + + /// Converts a string to a . + /// The value. + public static implicit operator DataGenerationJobScenario(string value) => new DataGenerationJobScenario(value); + + /// Converts a string to a . + /// The value. + public static implicit operator DataGenerationJobScenario?(string value) => value == null ? null : new DataGenerationJobScenario(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DataGenerationJobScenario other && Equals(other); + + /// + public bool Equals(DataGenerationJobScenario 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/Models/DataGenerationJobSource.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DataGenerationJobSource.Serialization.cs new file mode 100644 index 000000000000..a8411e1f9b9d --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DataGenerationJobSource.Serialization.cs @@ -0,0 +1,149 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.AI.Projects +{ + /// + /// The base source model for data generation jobs. + /// Please note this is the abstract base class. The derived classes available for instantiation are: , , , , and . + /// + [PersistableModelProxy(typeof(UnknownDataGenerationJobSource))] + public abstract partial class DataGenerationJobSource : IJsonModel + { + /// Initializes a new instance of for deserialization. + internal DataGenerationJobSource() + { + } + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual DataGenerationJobSource PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeDataGenerationJobSource(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataGenerationJobSource)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(DataGenerationJobSource)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + DataGenerationJobSource IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataGenerationJobSource)} does not support writing '{format}' format."); + } + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + DataGenerationJobSource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual DataGenerationJobSource JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataGenerationJobSource)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataGenerationJobSource(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static DataGenerationJobSource DeserializeDataGenerationJobSource(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("type"u8, out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "prompt": + return PromptDataGenerationJobSource.DeserializePromptDataGenerationJobSource(element, options); + case "agent": + return AgentDataGenerationJobSource.DeserializeAgentDataGenerationJobSource(element, options); + case "traces": + return TracesDataGenerationJobSource.DeserializeTracesDataGenerationJobSource(element, options); + case "dataset": + return DatasetDataGenerationJobSource.DeserializeDatasetDataGenerationJobSource(element, options); + case "file": + return FileDataGenerationJobSource.DeserializeFileDataGenerationJobSource(element, options); + } + } + return UnknownDataGenerationJobSource.DeserializeUnknownDataGenerationJobSource(element, options); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/DataGenerationJobSource.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DataGenerationJobSource.cs new file mode 100644 index 000000000000..2d7a937a01bd --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DataGenerationJobSource.cs @@ -0,0 +1,43 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + /// + /// The base source model for data generation jobs. + /// Please note this is the abstract base class. The derived classes available for instantiation are: , , , , and . + /// + public abstract partial class DataGenerationJobSource + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + /// The type of source. + private protected DataGenerationJobSource(DataGenerationJobSourceType @type) + { + Type = @type; + } + + /// Initializes a new instance of . + /// The type of source. + /// Optional description of what this source represents — helps the pipeline interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities'). + /// Keeps track of any properties unknown to the library. + internal DataGenerationJobSource(DataGenerationJobSourceType @type, string description, IDictionary additionalBinaryDataProperties) + { + Type = @type; + Description = description; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// The type of source. + internal DataGenerationJobSourceType Type { get; set; } + + /// Optional description of what this source represents — helps the pipeline interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities'). + public virtual string Description { get; set; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/DataGenerationJobSourceType.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DataGenerationJobSourceType.cs new file mode 100644 index 000000000000..8d0108388e23 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DataGenerationJobSourceType.cs @@ -0,0 +1,82 @@ +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.AI.Projects +{ + /// The supported source types for data generation jobs. + internal readonly partial struct DataGenerationJobSourceType : IEquatable + { + private readonly string _value; + /// Prompt source — inline text provided by the user. + private const string PromptValue = "prompt"; + /// Agent source — references an agent. + private const string AgentValue = "agent"; + /// Traces source — conversation traces from Application Insights. + private const string TracesValue = "traces"; + /// Dataset source — reference to a dataset. + private const string DatasetValue = "dataset"; + /// File source — Azure OpenAI file. + private const string FileValue = "file"; + + /// Initializes a new instance of . + /// The value. + /// is null. + public DataGenerationJobSourceType(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + + /// Prompt source — inline text provided by the user. + public static DataGenerationJobSourceType Prompt { get; } = new DataGenerationJobSourceType(PromptValue); + + /// Agent source — references an agent. + public static DataGenerationJobSourceType Agent { get; } = new DataGenerationJobSourceType(AgentValue); + + /// Traces source — conversation traces from Application Insights. + public static DataGenerationJobSourceType Traces { get; } = new DataGenerationJobSourceType(TracesValue); + + /// Dataset source — reference to a dataset. + public static DataGenerationJobSourceType Dataset { get; } = new DataGenerationJobSourceType(DatasetValue); + + /// File source — Azure OpenAI file. + public static DataGenerationJobSourceType File { get; } = new DataGenerationJobSourceType(FileValue); + + /// Determines if two values are the same. + /// The left value to compare. + /// The right value to compare. + public static bool operator ==(DataGenerationJobSourceType left, DataGenerationJobSourceType right) => left.Equals(right); + + /// Determines if two values are not the same. + /// The left value to compare. + /// The right value to compare. + public static bool operator !=(DataGenerationJobSourceType left, DataGenerationJobSourceType right) => !left.Equals(right); + + /// Converts a string to a . + /// The value. + public static implicit operator DataGenerationJobSourceType(string value) => new DataGenerationJobSourceType(value); + + /// Converts a string to a . + /// The value. + public static implicit operator DataGenerationJobSourceType?(string value) => value == null ? null : new DataGenerationJobSourceType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is DataGenerationJobSourceType other && Equals(other); + + /// + public bool Equals(DataGenerationJobSourceType 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.Extensions.OpenAI/src/Generated/Models/MemoryToolSearchItem.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DataGenerationModelOptions.Serialization.cs similarity index 59% rename from sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/MemoryToolSearchItem.Serialization.cs rename to sdk/ai/Azure.AI.Projects/src/Generated/Models/DataGenerationModelOptions.Serialization.cs index 2f9ebd3412fc..202231de50ef 100644 --- a/sdk/ai/Azure.AI.Extensions.OpenAI/src/Generated/Models/MemoryToolSearchItem.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DataGenerationModelOptions.Serialization.cs @@ -7,59 +7,59 @@ using System.Collections.Generic; using System.Text.Json; -namespace Azure.AI.Extensions.OpenAI +namespace Azure.AI.Projects { - /// A retrieved memory item from memory search. - public partial class MemoryToolSearchItem : IJsonModel + /// LLM model options for data generation jobs. + public partial class DataGenerationModelOptions : IJsonModel { - /// Initializes a new instance of for deserialization. - internal MemoryToolSearchItem() + /// Initializes a new instance of for deserialization. + internal DataGenerationModelOptions() { } /// The data to parse. /// The client options for reading and writing models. - protected virtual MemoryToolSearchItem PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + protected virtual DataGenerationModelOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) { - return DeserializeMemoryToolSearchItem(document.RootElement, options); + return DeserializeDataGenerationModelOptions(document.RootElement, options); } default: - throw new FormatException($"The model {nameof(MemoryToolSearchItem)} does not support reading '{options.Format}' format."); + throw new FormatException($"The model {nameof(DataGenerationModelOptions)} does not support reading '{options.Format}' format."); } } /// The client options for reading and writing models. protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; switch (format) { case "J": - return ModelReaderWriter.Write(this, options, AzureAIExtensionsOpenAIContext.Default); + return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); default: - throw new FormatException($"The model {nameof(MemoryToolSearchItem)} does not support writing '{options.Format}' format."); + throw new FormatException($"The model {nameof(DataGenerationModelOptions)} does not support writing '{options.Format}' format."); } } /// The client options for reading and writing models. - BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); /// The data to parse. /// The client options for reading and writing models. - MemoryToolSearchItem IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + DataGenerationModelOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); /// The client options for reading and writing models. - string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; /// The JSON writer. /// The client options for reading and writing models. - void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) { writer.WriteStartObject(); JsonModelWriteCore(writer, options); @@ -70,13 +70,13 @@ void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWr /// The client options for reading and writing models. protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(MemoryToolSearchItem)} does not support writing '{format}' format."); + throw new FormatException($"The model {nameof(DataGenerationModelOptions)} does not support writing '{format}' format."); } - writer.WritePropertyName("memory_item"u8); - writer.WriteObjectValue(MemoryItem, options); + writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model); if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -96,36 +96,36 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit /// The JSON reader. /// The client options for reading and writing models. - MemoryToolSearchItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + DataGenerationModelOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); /// The JSON reader. /// The client options for reading and writing models. - protected virtual MemoryToolSearchItem JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + protected virtual DataGenerationModelOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) { - string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; if (format != "J") { - throw new FormatException($"The model {nameof(MemoryToolSearchItem)} does not support reading '{format}' format."); + throw new FormatException($"The model {nameof(DataGenerationModelOptions)} does not support reading '{format}' format."); } using JsonDocument document = JsonDocument.ParseValue(ref reader); - return DeserializeMemoryToolSearchItem(document.RootElement, options); + return DeserializeDataGenerationModelOptions(document.RootElement, options); } /// The JSON element to deserialize. /// The client options for reading and writing models. - internal static MemoryToolSearchItem DeserializeMemoryToolSearchItem(JsonElement element, ModelReaderWriterOptions options) + internal static DataGenerationModelOptions DeserializeDataGenerationModelOptions(JsonElement element, ModelReaderWriterOptions options) { if (element.ValueKind == JsonValueKind.Null) { return null; } - MemoryOutputItem memoryItem = default; + string model = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { - if (prop.NameEquals("memory_item"u8)) + if (prop.NameEquals("model"u8)) { - memoryItem = MemoryOutputItem.DeserializeMemoryOutputItem(prop.Value, options); + model = prop.Value.GetString(); continue; } if (options.Format != "W") @@ -133,7 +133,7 @@ internal static MemoryToolSearchItem DeserializeMemoryToolSearchItem(JsonElement additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new MemoryToolSearchItem(memoryItem, additionalBinaryDataProperties); + return new DataGenerationModelOptions(model, additionalBinaryDataProperties); } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/DataGenerationModelOptions.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DataGenerationModelOptions.cs new file mode 100644 index 000000000000..ab256b5fc049 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DataGenerationModelOptions.cs @@ -0,0 +1,38 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + /// LLM model options for data generation jobs. + public partial class DataGenerationModelOptions + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + /// Base model name used to generate data. + /// is null. + public DataGenerationModelOptions(string model) + { + Argument.AssertNotNull(model, nameof(model)); + + Model = model; + } + + /// Initializes a new instance of . + /// Base model name used to generate data. + /// Keeps track of any properties unknown to the library. + internal DataGenerationModelOptions(string model, IDictionary additionalBinaryDataProperties) + { + Model = model; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// Base model name used to generate data. + public string Model { get; set; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/DataGenerationTokenUsage.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DataGenerationTokenUsage.Serialization.cs new file mode 100644 index 000000000000..28e1c7b2e287 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DataGenerationTokenUsage.Serialization.cs @@ -0,0 +1,159 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.AI.Projects +{ + /// Token usage information for a data generation job. + public partial class DataGenerationTokenUsage : IJsonModel + { + /// The data to parse. + /// The client options for reading and writing models. + protected virtual DataGenerationTokenUsage PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeDataGenerationTokenUsage(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataGenerationTokenUsage)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(DataGenerationTokenUsage)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + DataGenerationTokenUsage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataGenerationTokenUsage)} does not support writing '{format}' format."); + } + if (options.Format != "W") + { + writer.WritePropertyName("prompt_tokens"u8); + writer.WriteNumberValue(PromptTokens); + } + if (options.Format != "W") + { + writer.WritePropertyName("completion_tokens"u8); + writer.WriteNumberValue(CompletionTokens); + } + if (options.Format != "W") + { + writer.WritePropertyName("total_tokens"u8); + writer.WriteNumberValue(TotalTokens); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + DataGenerationTokenUsage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual DataGenerationTokenUsage JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataGenerationTokenUsage)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataGenerationTokenUsage(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static DataGenerationTokenUsage DeserializeDataGenerationTokenUsage(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + long promptTokens = default; + long completionTokens = default; + long totalTokens = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("prompt_tokens"u8)) + { + promptTokens = prop.Value.GetInt64(); + continue; + } + if (prop.NameEquals("completion_tokens"u8)) + { + completionTokens = prop.Value.GetInt64(); + continue; + } + if (prop.NameEquals("total_tokens"u8)) + { + totalTokens = prop.Value.GetInt64(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new DataGenerationTokenUsage(promptTokens, completionTokens, totalTokens, additionalBinaryDataProperties); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/DataGenerationTokenUsage.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DataGenerationTokenUsage.cs new file mode 100644 index 000000000000..4c94f0068204 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DataGenerationTokenUsage.cs @@ -0,0 +1,43 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + /// Token usage information for a data generation job. + public partial class DataGenerationTokenUsage + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + internal DataGenerationTokenUsage() + { + } + + /// Initializes a new instance of . + /// The number of prompt tokens used. + /// The number of completion tokens generated. + /// Total number of tokens used. + /// Keeps track of any properties unknown to the library. + internal DataGenerationTokenUsage(long promptTokens, long completionTokens, long totalTokens, IDictionary additionalBinaryDataProperties) + { + PromptTokens = promptTokens; + CompletionTokens = completionTokens; + TotalTokens = totalTokens; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// The number of prompt tokens used. + public long PromptTokens { get; } + + /// The number of completion tokens generated. + public long CompletionTokens { get; } + + /// Total number of tokens used. + public long TotalTokens { get; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/DatasetDataGenerationJobOutput.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DatasetDataGenerationJobOutput.Serialization.cs new file mode 100644 index 000000000000..719d66a14639 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DatasetDataGenerationJobOutput.Serialization.cs @@ -0,0 +1,207 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.AI.Projects +{ + /// Dataset output for a data generation job. + public partial class DatasetDataGenerationJobOutput : DataGenerationJobOutput, IJsonModel + { + /// The data to parse. + /// The client options for reading and writing models. + protected override DataGenerationJobOutput PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeDatasetDataGenerationJobOutput(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DatasetDataGenerationJobOutput)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(DatasetDataGenerationJobOutput)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + DatasetDataGenerationJobOutput IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (DatasetDataGenerationJobOutput)PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DatasetDataGenerationJobOutput)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + if (options.Format != "W" && Optional.IsDefined(Id)) + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W" && Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (options.Format != "W" && Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"u8); + writer.WriteStringValue(Version); + } + if (options.Format != "W" && Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (options.Format != "W" && Optional.IsCollectionDefined(Tags)) + { + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + DatasetDataGenerationJobOutput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (DatasetDataGenerationJobOutput)JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected override DataGenerationJobOutput JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DatasetDataGenerationJobOutput)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDatasetDataGenerationJobOutput(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static DatasetDataGenerationJobOutput DeserializeDatasetDataGenerationJobOutput(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DataGenerationJobOutputType @type = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + string id = default; + string name = default; + string version = default; + string description = default; + IReadOnlyDictionary tags = default; + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("type"u8)) + { + @type = new DataGenerationJobOutputType(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("id"u8)) + { + id = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("name"u8)) + { + name = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("version"u8)) + { + version = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("description"u8)) + { + description = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("tags"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + if (prop0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(prop0.Name, null); + } + else + { + dictionary.Add(prop0.Name, prop0.Value.GetString()); + } + } + tags = dictionary; + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new DatasetDataGenerationJobOutput( + @type, + additionalBinaryDataProperties, + id, + name, + version, + description, + tags ?? new ChangeTrackingDictionary()); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/DatasetDataGenerationJobOutput.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DatasetDataGenerationJobOutput.cs new file mode 100644 index 000000000000..264638180fde --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DatasetDataGenerationJobOutput.cs @@ -0,0 +1,51 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + /// Dataset output for a data generation job. + public partial class DatasetDataGenerationJobOutput : DataGenerationJobOutput + { + /// Initializes a new instance of . + internal DatasetDataGenerationJobOutput() : base(DataGenerationJobOutputType.Dataset) + { + Tags = new ChangeTrackingDictionary(); + } + + /// Initializes a new instance of . + /// The type of the output. + /// Keeps track of any properties unknown to the library. + /// The id of the output dataset created. + /// The name of the output dataset. + /// The version of the output dataset. + /// Description of the output dataset. + /// Tag dictionary of the output dataset. + internal DatasetDataGenerationJobOutput(DataGenerationJobOutputType @type, IDictionary additionalBinaryDataProperties, string id, string name, string version, string description, IReadOnlyDictionary tags) : base(@type, additionalBinaryDataProperties) + { + Id = id; + Name = name; + Version = version; + Description = description; + Tags = tags; + } + + /// The id of the output dataset created. + public string Id { get; } + + /// The name of the output dataset. + public string Name { get; } + + /// The version of the output dataset. + public string Version { get; } + + /// Description of the output dataset. + public string Description { get; } + + /// Tag dictionary of the output dataset. + public IReadOnlyDictionary Tags { get; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/DatasetDataGenerationJobSource.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DatasetDataGenerationJobSource.Serialization.cs new file mode 100644 index 000000000000..763ed91fb5b3 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DatasetDataGenerationJobSource.Serialization.cs @@ -0,0 +1,153 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.AI.Projects +{ + /// Dataset source for data generation jobs — reference to a dataset. + public partial class DatasetDataGenerationJobSource : DataGenerationJobSource, IJsonModel + { + /// Initializes a new instance of for deserialization. + internal DatasetDataGenerationJobSource() + { + } + + /// The data to parse. + /// The client options for reading and writing models. + protected override DataGenerationJobSource PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeDatasetDataGenerationJobSource(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DatasetDataGenerationJobSource)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(DatasetDataGenerationJobSource)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + DatasetDataGenerationJobSource IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (DatasetDataGenerationJobSource)PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DatasetDataGenerationJobSource)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"u8); + writer.WriteStringValue(Version); + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + DatasetDataGenerationJobSource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (DatasetDataGenerationJobSource)JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected override DataGenerationJobSource JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DatasetDataGenerationJobSource)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDatasetDataGenerationJobSource(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static DatasetDataGenerationJobSource DeserializeDatasetDataGenerationJobSource(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DataGenerationJobSourceType @type = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + string description = default; + string name = default; + string version = default; + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("type"u8)) + { + @type = new DataGenerationJobSourceType(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("description"u8)) + { + description = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("name"u8)) + { + name = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("version"u8)) + { + version = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new DatasetDataGenerationJobSource(@type, additionalBinaryDataProperties, description, name, version); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/DatasetDataGenerationJobSource.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DatasetDataGenerationJobSource.cs new file mode 100644 index 000000000000..e2b291c64cb2 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DatasetDataGenerationJobSource.cs @@ -0,0 +1,44 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + /// Dataset source for data generation jobs — reference to a dataset. + public partial class DatasetDataGenerationJobSource : DataGenerationJobSource + { + /// Initializes a new instance of . + /// The name of the dataset. + /// is null. + public DatasetDataGenerationJobSource(string name) : base(DataGenerationJobSourceType.Dataset) + { + Argument.AssertNotNull(name, nameof(name)); + + Name = name; + } + + /// Initializes a new instance of . + /// The type of source. + /// Keeps track of any properties unknown to the library. + /// Optional description of what this source represents — helps the pipeline interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities'). + /// The name of the dataset. + /// The version of the dataset. If not specified, the latest version is used. + internal DatasetDataGenerationJobSource(DataGenerationJobSourceType @type, IDictionary additionalBinaryDataProperties, string description, string name, string version) : base(@type, description, additionalBinaryDataProperties) + { + Name = name; + Version = version; + } + + /// Optional description of what this source represents — helps the pipeline interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities'). + public override string Description { get; set; } + + /// The name of the dataset. + public string Name { get; set; } + + /// The version of the dataset. If not specified, the latest version is used. + public string Version { get; set; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/DatasetEvaluatorGenerationJobSource.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DatasetEvaluatorGenerationJobSource.Serialization.cs new file mode 100644 index 000000000000..13777c59b154 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DatasetEvaluatorGenerationJobSource.Serialization.cs @@ -0,0 +1,153 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.AI.Projects +{ + /// Dataset source for evaluator generation jobs — reference to a dataset. + public partial class DatasetEvaluatorGenerationJobSource : EvaluatorGenerationJobSource, IJsonModel + { + /// Initializes a new instance of for deserialization. + internal DatasetEvaluatorGenerationJobSource() + { + } + + /// The data to parse. + /// The client options for reading and writing models. + protected override EvaluatorGenerationJobSource PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeDatasetEvaluatorGenerationJobSource(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DatasetEvaluatorGenerationJobSource)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(DatasetEvaluatorGenerationJobSource)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + DatasetEvaluatorGenerationJobSource IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (DatasetEvaluatorGenerationJobSource)PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DatasetEvaluatorGenerationJobSource)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + if (Optional.IsDefined(Version)) + { + writer.WritePropertyName("version"u8); + writer.WriteStringValue(Version); + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + DatasetEvaluatorGenerationJobSource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (DatasetEvaluatorGenerationJobSource)JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected override EvaluatorGenerationJobSource JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DatasetEvaluatorGenerationJobSource)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDatasetEvaluatorGenerationJobSource(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static DatasetEvaluatorGenerationJobSource DeserializeDatasetEvaluatorGenerationJobSource(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EvaluatorGenerationJobSourceType @type = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + string description = default; + string name = default; + string version = default; + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("type"u8)) + { + @type = new EvaluatorGenerationJobSourceType(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("description"u8)) + { + description = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("name"u8)) + { + name = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("version"u8)) + { + version = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new DatasetEvaluatorGenerationJobSource(@type, additionalBinaryDataProperties, description, name, version); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/DatasetEvaluatorGenerationJobSource.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DatasetEvaluatorGenerationJobSource.cs new file mode 100644 index 000000000000..1e0d0897dc9c --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DatasetEvaluatorGenerationJobSource.cs @@ -0,0 +1,45 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + /// Dataset source for evaluator generation jobs — reference to a dataset. + public partial class DatasetEvaluatorGenerationJobSource : EvaluatorGenerationJobSource + { + /// Initializes a new instance of . + /// The name of the dataset. + /// is null. + public DatasetEvaluatorGenerationJobSource(string name) : base(EvaluatorGenerationJobSourceType.Dataset) + { + Argument.AssertNotNull(name, nameof(name)); + + Name = name; + } + + /// Initializes a new instance of . + /// The type of source. + /// Keeps track of any properties unknown to the library. + /// Optional description of what this source represents — helps the pipeline interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities'). + /// The name of the dataset. + /// The version of the dataset. If not specified, the latest version is used. + internal DatasetEvaluatorGenerationJobSource(EvaluatorGenerationJobSourceType @type, IDictionary additionalBinaryDataProperties, string description, string name, string version) : base(@type, additionalBinaryDataProperties) + { + Description = description; + Name = name; + Version = version; + } + + /// Optional description of what this source represents — helps the pipeline interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities'). + public string Description { get; set; } + + /// The name of the dataset. + public string Name { get; set; } + + /// The version of the dataset. If not specified, the latest version is used. + public string Version { get; set; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/DatasetReference.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DatasetReference.Serialization.cs new file mode 100644 index 000000000000..d0e968080457 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DatasetReference.Serialization.cs @@ -0,0 +1,147 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.AI.Projects +{ + /// Reference to a versioned Foundry Dataset. + public partial class DatasetReference : IJsonModel + { + /// Initializes a new instance of for deserialization. + internal DatasetReference() + { + } + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual DatasetReference PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeDatasetReference(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DatasetReference)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(DatasetReference)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + DatasetReference IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DatasetReference)} does not support writing '{format}' format."); + } + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + writer.WritePropertyName("version"u8); + writer.WriteStringValue(Version); + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + DatasetReference IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual DatasetReference JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DatasetReference)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDatasetReference(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static DatasetReference DeserializeDatasetReference(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + string version = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("name"u8)) + { + name = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("version"u8)) + { + version = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new DatasetReference(name, version, additionalBinaryDataProperties); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/DatasetReference.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DatasetReference.cs new file mode 100644 index 000000000000..9805bab42f4c --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DatasetReference.cs @@ -0,0 +1,42 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + /// Reference to a versioned Foundry Dataset. + public partial class DatasetReference + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + /// Dataset name. + /// Dataset version. + internal DatasetReference(string name, string version) + { + Name = name; + Version = version; + } + + /// Initializes a new instance of . + /// Dataset name. + /// Dataset version. + /// Keeps track of any properties unknown to the library. + internal DatasetReference(string name, string version, IDictionary additionalBinaryDataProperties) + { + Name = name; + Version = version; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// Dataset name. + public string Name { get; } + + /// Dataset version. + public string Version { get; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/DeleteMemoryResponse.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DeleteMemoryResponse.Serialization.cs index 74255e76ae6f..8d8e18cd1fdd 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/DeleteMemoryResponse.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DeleteMemoryResponse.Serialization.cs @@ -87,8 +87,6 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("object"u8); writer.WriteStringValue(Object.ToString()); - writer.WritePropertyName("name"u8); - writer.WriteStringValue(Name); writer.WritePropertyName("memory_id"u8); writer.WriteStringValue(MemoryId); writer.WritePropertyName("deleted"u8); @@ -136,7 +134,6 @@ internal static DeleteMemoryResponse DeserializeDeleteMemoryResponse(JsonElement return null; } MemoryStoreObjectType @object = default; - string name = default; string memoryId = default; bool deleted = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); @@ -147,11 +144,6 @@ internal static DeleteMemoryResponse DeserializeDeleteMemoryResponse(JsonElement @object = new MemoryStoreObjectType(prop.Value.GetString()); continue; } - if (prop.NameEquals("name"u8)) - { - name = prop.Value.GetString(); - continue; - } if (prop.NameEquals("memory_id"u8)) { memoryId = prop.Value.GetString(); @@ -167,7 +159,7 @@ internal static DeleteMemoryResponse DeserializeDeleteMemoryResponse(JsonElement additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new DeleteMemoryResponse(@object, name, memoryId, deleted, additionalBinaryDataProperties); + return new DeleteMemoryResponse(@object, memoryId, deleted, additionalBinaryDataProperties); } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/DeleteMemoryResponse.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DeleteMemoryResponse.cs index 3e7227e07508..136feadca1fc 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/DeleteMemoryResponse.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DeleteMemoryResponse.cs @@ -15,36 +15,29 @@ public partial class DeleteMemoryResponse private protected readonly IDictionary _additionalBinaryDataProperties; /// Initializes a new instance of . - /// The name of the memory store. /// The unique ID of the deleted memory item. /// Whether the memory item was successfully deleted. - internal DeleteMemoryResponse(string name, string memoryId, bool deleted) + internal DeleteMemoryResponse(string memoryId, bool deleted) { - Name = name; MemoryId = memoryId; Deleted = deleted; } /// Initializes a new instance of . - /// The object type. Always 'memory.deleted'. - /// The name of the memory store. + /// The object type. Always 'memory_store.item.deleted'. /// The unique ID of the deleted memory item. /// Whether the memory item was successfully deleted. /// Keeps track of any properties unknown to the library. - internal DeleteMemoryResponse(MemoryStoreObjectType @object, string name, string memoryId, bool deleted, IDictionary additionalBinaryDataProperties) + internal DeleteMemoryResponse(MemoryStoreObjectType @object, string memoryId, bool deleted, IDictionary additionalBinaryDataProperties) { Object = @object; - Name = name; MemoryId = memoryId; Deleted = deleted; _additionalBinaryDataProperties = additionalBinaryDataProperties; } - /// The object type. Always 'memory.deleted'. - public MemoryStoreObjectType Object { get; } = "memory.deleted"; - - /// The name of the memory store. - public string Name { get; } + /// The object type. Always 'memory_store.item.deleted'. + public MemoryStoreObjectType Object { get; } = "memory_store.item.deleted"; /// The unique ID of the deleted memory item. public string MemoryId { get; } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/DispatchRoutineAsyncRequest.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DispatchRoutineAsyncRequest.Serialization.cs new file mode 100644 index 000000000000..f5ae1920fe4b --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DispatchRoutineAsyncRequest.Serialization.cs @@ -0,0 +1,152 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.AI.Projects +{ + /// The DispatchRoutineAsyncRequest. + internal partial class DispatchRoutineAsyncRequest : IJsonModel + { + /// The data to parse. + /// The client options for reading and writing models. + protected virtual DispatchRoutineAsyncRequest PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeDispatchRoutineAsyncRequest(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DispatchRoutineAsyncRequest)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(DispatchRoutineAsyncRequest)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + DispatchRoutineAsyncRequest IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The to serialize into . + public static implicit operator BinaryContent(DispatchRoutineAsyncRequest dispatchRoutineAsyncRequest) + { + if (dispatchRoutineAsyncRequest == null) + { + return null; + } + return BinaryContent.Create(dispatchRoutineAsyncRequest, ModelSerializationExtensions.WireOptions); + } + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DispatchRoutineAsyncRequest)} does not support writing '{format}' format."); + } + if (Optional.IsDefined(Payload)) + { + writer.WritePropertyName("payload"u8); + writer.WriteObjectValue(Payload, options); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + DispatchRoutineAsyncRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual DispatchRoutineAsyncRequest JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DispatchRoutineAsyncRequest)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDispatchRoutineAsyncRequest(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static DispatchRoutineAsyncRequest DeserializeDispatchRoutineAsyncRequest(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + RoutineDispatchPayload payload = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("payload"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + payload = RoutineDispatchPayload.DeserializeRoutineDispatchPayload(prop.Value, options); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new DispatchRoutineAsyncRequest(payload, additionalBinaryDataProperties); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/DispatchRoutineAsyncRequest.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DispatchRoutineAsyncRequest.cs new file mode 100644 index 000000000000..2378b6d61781 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DispatchRoutineAsyncRequest.cs @@ -0,0 +1,33 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + /// The DispatchRoutineAsyncRequest. + internal partial class DispatchRoutineAsyncRequest + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + internal DispatchRoutineAsyncRequest() + { + } + + /// Initializes a new instance of . + /// A direct action-input override sent downstream when testing a routine. + /// Keeps track of any properties unknown to the library. + internal DispatchRoutineAsyncRequest(RoutineDispatchPayload payload, IDictionary additionalBinaryDataProperties) + { + Payload = payload; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// A direct action-input override sent downstream when testing a routine. + public RoutineDispatchPayload Payload { get; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/DispatchRoutineResponse.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DispatchRoutineResponse.Serialization.cs new file mode 100644 index 000000000000..759548ac6cc9 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DispatchRoutineResponse.Serialization.cs @@ -0,0 +1,168 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.AI.Projects +{ + /// Identifiers returned after a routine dispatch is queued. + public partial class DispatchRoutineResponse : IJsonModel + { + /// The data to parse. + /// The client options for reading and writing models. + protected virtual DispatchRoutineResponse PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeDispatchRoutineResponse(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DispatchRoutineResponse)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(DispatchRoutineResponse)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + DispatchRoutineResponse IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The to deserialize the from. + public static explicit operator DispatchRoutineResponse(ClientResult result) + { + PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeDispatchRoutineResponse(document.RootElement, ModelSerializationExtensions.WireOptions); + } + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DispatchRoutineResponse)} does not support writing '{format}' format."); + } + if (Optional.IsDefined(DispatchId)) + { + writer.WritePropertyName("dispatch_id"u8); + writer.WriteStringValue(DispatchId); + } + if (Optional.IsDefined(ActionCorrelationId)) + { + writer.WritePropertyName("action_correlation_id"u8); + writer.WriteStringValue(ActionCorrelationId); + } + if (Optional.IsDefined(TaskId)) + { + writer.WritePropertyName("task_id"u8); + writer.WriteStringValue(TaskId); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + DispatchRoutineResponse IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual DispatchRoutineResponse JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DispatchRoutineResponse)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDispatchRoutineResponse(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static DispatchRoutineResponse DeserializeDispatchRoutineResponse(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string dispatchId = default; + string actionCorrelationId = default; + string taskId = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("dispatch_id"u8)) + { + dispatchId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("action_correlation_id"u8)) + { + actionCorrelationId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("task_id"u8)) + { + taskId = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new DispatchRoutineResponse(dispatchId, actionCorrelationId, taskId, additionalBinaryDataProperties); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/DispatchRoutineResponse.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DispatchRoutineResponse.cs new file mode 100644 index 000000000000..280f27414fd5 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/DispatchRoutineResponse.cs @@ -0,0 +1,43 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + /// Identifiers returned after a routine dispatch is queued. + public partial class DispatchRoutineResponse + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + internal DispatchRoutineResponse() + { + } + + /// Initializes a new instance of . + /// The dispatch identifier created for the routine dispatch. + /// A downstream action correlation identifier, when available. + /// A workspace task identifier created for the dispatch, when available. + /// Keeps track of any properties unknown to the library. + internal DispatchRoutineResponse(string dispatchId, string actionCorrelationId, string taskId, IDictionary additionalBinaryDataProperties) + { + DispatchId = dispatchId; + ActionCorrelationId = actionCorrelationId; + TaskId = taskId; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// The dispatch identifier created for the routine dispatch. + public string DispatchId { get; } + + /// A downstream action correlation identifier, when available. + public string ActionCorrelationId { get; } + + /// A workspace task identifier created for the dispatch, when available. + public string TaskId { get; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/EvaluationsDimension.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/EvaluationsDimension.Serialization.cs new file mode 100644 index 000000000000..ec8bfe120c57 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/EvaluationsDimension.Serialization.cs @@ -0,0 +1,171 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.AI.Projects; + +namespace Azure.AI.Projects.Evaluation +{ + /// A single dimension — one independent, measurable quality dimension within a rubric evaluator's scoring blueprint. + public partial class EvaluationsDimension : IJsonModel + { + /// Initializes a new instance of for deserialization. + internal EvaluationsDimension() + { + } + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual EvaluationsDimension PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeEvaluationsDimension(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EvaluationsDimension)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(EvaluationsDimension)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + EvaluationsDimension IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EvaluationsDimension)} does not support writing '{format}' format."); + } + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + writer.WritePropertyName("weight"u8); + writer.WriteNumberValue(Weight); + if (Optional.IsDefined(AlwaysApplicable)) + { + writer.WritePropertyName("always_applicable"u8); + writer.WriteBooleanValue(AlwaysApplicable.Value); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + EvaluationsDimension IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual EvaluationsDimension JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EvaluationsDimension)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEvaluationsDimension(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static EvaluationsDimension DeserializeEvaluationsDimension(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string id = default; + string description = default; + int weight = default; + bool? alwaysApplicable = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("id"u8)) + { + id = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("description"u8)) + { + description = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("weight"u8)) + { + weight = prop.Value.GetInt32(); + continue; + } + if (prop.NameEquals("always_applicable"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + alwaysApplicable = prop.Value.GetBoolean(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new EvaluationsDimension(id, description, weight, alwaysApplicable, additionalBinaryDataProperties); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/EvaluationsDimension.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/EvaluationsDimension.cs new file mode 100644 index 000000000000..3ff3f4909ae0 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/EvaluationsDimension.cs @@ -0,0 +1,59 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.AI.Projects; + +namespace Azure.AI.Projects.Evaluation +{ + /// A single dimension — one independent, measurable quality dimension within a rubric evaluator's scoring blueprint. + public partial class EvaluationsDimension + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + /// Stable identifier for this dimension (snake_case, e.g., `correct_resolution`). Required. Provided by the user when manually creating a rubric evaluator or during human-in-the-loop review of a generated set; the generation pipeline produces an initial value the user can edit. Editable when saving new versions. + /// What this dimension measures (e.g., 'Correctly identifies the user's reservation intent and pursues the appropriate workflow'). + /// Relative weight of this dimension (1-10). The generation pipeline assigns exactly one dimension weight 8-10; all others use 1-6. User edits are not constrained by this heuristic. + /// or is null. + public EvaluationsDimension(string id, string description, int weight) + { + Argument.AssertNotNull(id, nameof(id)); + Argument.AssertNotNull(description, nameof(description)); + + Id = id; + Description = description; + Weight = weight; + } + + /// Initializes a new instance of . + /// Stable identifier for this dimension (snake_case, e.g., `correct_resolution`). Required. Provided by the user when manually creating a rubric evaluator or during human-in-the-loop review of a generated set; the generation pipeline produces an initial value the user can edit. Editable when saving new versions. + /// What this dimension measures (e.g., 'Correctly identifies the user's reservation intent and pursues the appropriate workflow'). + /// Relative weight of this dimension (1-10). The generation pipeline assigns exactly one dimension weight 8-10; all others use 1-6. User edits are not constrained by this heuristic. + /// When true, the LLM judge always scores this dimension regardless of relevance (skips applicability assessment). The service-generated general quality/policy dimension has this set to true and is non-editable. Users may set this on their own custom dimensions. + /// Keeps track of any properties unknown to the library. + internal EvaluationsDimension(string id, string description, int weight, bool? alwaysApplicable, IDictionary additionalBinaryDataProperties) + { + Id = id; + Description = description; + Weight = weight; + AlwaysApplicable = alwaysApplicable; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// Stable identifier for this dimension (snake_case, e.g., `correct_resolution`). Required. Provided by the user when manually creating a rubric evaluator or during human-in-the-loop review of a generated set; the generation pipeline produces an initial value the user can edit. Editable when saving new versions. + public string Id { get; set; } + + /// What this dimension measures (e.g., 'Correctly identifies the user's reservation intent and pursues the appropriate workflow'). + public string Description { get; set; } + + /// Relative weight of this dimension (1-10). The generation pipeline assigns exactly one dimension weight 8-10; all others use 1-6. User edits are not constrained by this heuristic. + public int Weight { get; set; } + + /// When true, the LLM judge always scores this dimension regardless of relevance (skips applicability assessment). The service-generated general quality/policy dimension has this set to true and is non-editable. Users may set this on their own custom dimensions. + public bool? AlwaysApplicable { get; set; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/EvaluatorCredentialRequest.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/EvaluatorCredentialRequest.Serialization.cs new file mode 100644 index 000000000000..0c97c44467e5 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/EvaluatorCredentialRequest.Serialization.cs @@ -0,0 +1,150 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.AI.Projects +{ + /// Request body for getting evaluator credentials. + public partial class EvaluatorCredentialRequest : IJsonModel + { + /// Initializes a new instance of for deserialization. + internal EvaluatorCredentialRequest() + { + } + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual EvaluatorCredentialRequest PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeEvaluatorCredentialRequest(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EvaluatorCredentialRequest)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(EvaluatorCredentialRequest)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + EvaluatorCredentialRequest IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The to serialize into . + public static implicit operator BinaryContent(EvaluatorCredentialRequest evaluatorCredentialRequest) + { + if (evaluatorCredentialRequest == null) + { + return null; + } + return BinaryContent.Create(evaluatorCredentialRequest, ModelSerializationExtensions.WireOptions); + } + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EvaluatorCredentialRequest)} does not support writing '{format}' format."); + } + writer.WritePropertyName("blob_uri"u8); + writer.WriteStringValue(BlobUri.AbsoluteUri); + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + EvaluatorCredentialRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual EvaluatorCredentialRequest JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EvaluatorCredentialRequest)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEvaluatorCredentialRequest(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static EvaluatorCredentialRequest DeserializeEvaluatorCredentialRequest(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Uri blobUri = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("blob_uri"u8)) + { + blobUri = string.IsNullOrEmpty(prop.Value.GetString()) ? null : new Uri(prop.Value.GetString(), UriKind.RelativeOrAbsolute); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new EvaluatorCredentialRequest(blobUri, additionalBinaryDataProperties); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/EvaluatorCredentialRequest.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/EvaluatorCredentialRequest.cs new file mode 100644 index 000000000000..2c2ec00e16ec --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/EvaluatorCredentialRequest.cs @@ -0,0 +1,38 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + /// Request body for getting evaluator credentials. + public partial class EvaluatorCredentialRequest + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + /// The blob URI for the evaluator storage. Example: `https://account.blob.core.windows.net:443/container`. + /// is null. + public EvaluatorCredentialRequest(Uri blobUri) + { + Argument.AssertNotNull(blobUri, nameof(blobUri)); + + BlobUri = blobUri; + } + + /// Initializes a new instance of . + /// The blob URI for the evaluator storage. Example: `https://account.blob.core.windows.net:443/container`. + /// Keeps track of any properties unknown to the library. + internal EvaluatorCredentialRequest(Uri blobUri, IDictionary additionalBinaryDataProperties) + { + BlobUri = blobUri; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// The blob URI for the evaluator storage. Example: `https://account.blob.core.windows.net:443/container`. + public Uri BlobUri { get; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/EvaluatorDefinition.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/EvaluatorDefinition.Serialization.cs index 373ed747f5c9..c991aa9d15e4 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/EvaluatorDefinition.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/EvaluatorDefinition.Serialization.cs @@ -11,7 +11,7 @@ namespace Azure.AI.Projects.Evaluation { /// /// Base evaluator configuration with discriminator - /// Please note this is the abstract base class. The derived classes available for instantiation are: and . + /// Please note this is the abstract base class. The derived classes available for instantiation are: , , and . /// [PersistableModelProxy(typeof(UnknownEvaluatorDefinition))] public abstract partial class EvaluatorDefinition : IJsonModel @@ -166,6 +166,8 @@ internal static EvaluatorDefinition DeserializeEvaluatorDefinition(JsonElement e return CodeBasedEvaluatorDefinition.DeserializeCodeBasedEvaluatorDefinition(element, options); case "prompt": return PromptBasedEvaluatorDefinition.DeserializePromptBasedEvaluatorDefinition(element, options); + case "rubric": + return RubricBasedEvaluatorDefinition.DeserializeRubricBasedEvaluatorDefinition(element, options); } } return UnknownEvaluatorDefinition.DeserializeUnknownEvaluatorDefinition(element, options); diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/EvaluatorDefinition.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/EvaluatorDefinition.cs index 15ed5f448a81..12228a6d2696 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/EvaluatorDefinition.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/EvaluatorDefinition.cs @@ -10,7 +10,7 @@ namespace Azure.AI.Projects.Evaluation { /// /// Base evaluator configuration with discriminator - /// Please note this is the abstract base class. The derived classes available for instantiation are: and . + /// Please note this is the abstract base class. The derived classes available for instantiation are: , , and . /// public abstract partial class EvaluatorDefinition { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/EvaluatorDefinitionType.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/EvaluatorDefinitionType.cs index 136ee65b73d5..12978a391bae 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/EvaluatorDefinitionType.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/EvaluatorDefinitionType.cs @@ -22,6 +22,8 @@ namespace Azure.AI.Projects.Evaluation private const string ServiceValue = "service"; /// OpenAI graders. private const string OpenaiGradersValue = "openai_graders"; + /// Rubric-based evaluator definition. Stores dimensions (the scoring blueprint) for both quality and safety evaluators. Can be created via the generate API or manually via createVersion. + private const string RubricValue = "rubric"; /// Initializes a new instance of . /// The value. @@ -48,6 +50,9 @@ public EvaluatorDefinitionType(string value) /// OpenAI graders. public static EvaluatorDefinitionType OpenaiGraders { get; } = new EvaluatorDefinitionType(OpenaiGradersValue); + /// Rubric-based evaluator definition. Stores dimensions (the scoring blueprint) for both quality and safety evaluators. Can be created via the generate API or manually via createVersion. + public static EvaluatorDefinitionType Rubric { get; } = new EvaluatorDefinitionType(RubricValue); + /// Determines if two values are the same. /// The left value to compare. /// The right value to compare. diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/EvaluatorGenerationArtifacts.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/EvaluatorGenerationArtifacts.Serialization.cs new file mode 100644 index 000000000000..0459a78d89c6 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/EvaluatorGenerationArtifacts.Serialization.cs @@ -0,0 +1,169 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.AI.Projects +{ + /// Service-managed provenance artifacts produced by an evaluator generation job. Present only on EvaluatorVersion resources created via the generation pipeline. The combined-JSONL Foundry Dataset is read-only and resolves to a versioned dataset in a service-reserved namespace. + public partial class EvaluatorGenerationArtifacts : IJsonModel + { + /// Initializes a new instance of for deserialization. + internal EvaluatorGenerationArtifacts() + { + } + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual EvaluatorGenerationArtifacts PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeEvaluatorGenerationArtifacts(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EvaluatorGenerationArtifacts)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(EvaluatorGenerationArtifacts)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + EvaluatorGenerationArtifacts IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EvaluatorGenerationArtifacts)} does not support writing '{format}' format."); + } + writer.WritePropertyName("dataset"u8); + writer.WriteObjectValue(Dataset, options); + writer.WritePropertyName("kinds"u8); + writer.WriteStartArray(); + foreach (string item in Kinds) + { + if (item == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + EvaluatorGenerationArtifacts IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual EvaluatorGenerationArtifacts JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EvaluatorGenerationArtifacts)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEvaluatorGenerationArtifacts(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static EvaluatorGenerationArtifacts DeserializeEvaluatorGenerationArtifacts(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DatasetReference dataset = default; + IList kinds = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("dataset"u8)) + { + dataset = DatasetReference.DeserializeDatasetReference(prop.Value, options); + continue; + } + if (prop.NameEquals("kinds"u8)) + { + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + if (item.ValueKind == JsonValueKind.Null) + { + array.Add(null); + } + else + { + array.Add(item.GetString()); + } + } + kinds = array; + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new EvaluatorGenerationArtifacts(dataset, kinds, additionalBinaryDataProperties); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/EvaluatorGenerationArtifacts.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/EvaluatorGenerationArtifacts.cs new file mode 100644 index 000000000000..40fcc0cc6efa --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/EvaluatorGenerationArtifacts.cs @@ -0,0 +1,43 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.AI.Projects +{ + /// Service-managed provenance artifacts produced by an evaluator generation job. Present only on EvaluatorVersion resources created via the generation pipeline. The combined-JSONL Foundry Dataset is read-only and resolves to a versioned dataset in a service-reserved namespace. + public partial class EvaluatorGenerationArtifacts + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + /// Reference to the single Foundry Dataset (one combined JSONL file, version-aligned to `EvaluatorVersion.version`) holding all artifacts produced by the generation pipeline. Each row in the JSONL carries a `kind` field discriminating its content (e.g. `spec`, `tools`, `context`). + /// The kinds of rows present in `dataset`. Always contains `"spec"` (the generated evaluation specification, a Markdown document describing what the evaluator measures). May additionally contain `"tools"` (when the generation pipeline produced or inferred OpenAI tool schemas) and/or `"context"` (when supplementary materials such as file uploads or trace samples were used during generation). + internal EvaluatorGenerationArtifacts(DatasetReference dataset, IEnumerable kinds) + { + Dataset = dataset; + Kinds = kinds.ToList(); + } + + /// Initializes a new instance of . + /// Reference to the single Foundry Dataset (one combined JSONL file, version-aligned to `EvaluatorVersion.version`) holding all artifacts produced by the generation pipeline. Each row in the JSONL carries a `kind` field discriminating its content (e.g. `spec`, `tools`, `context`). + /// The kinds of rows present in `dataset`. Always contains `"spec"` (the generated evaluation specification, a Markdown document describing what the evaluator measures). May additionally contain `"tools"` (when the generation pipeline produced or inferred OpenAI tool schemas) and/or `"context"` (when supplementary materials such as file uploads or trace samples were used during generation). + /// Keeps track of any properties unknown to the library. + internal EvaluatorGenerationArtifacts(DatasetReference dataset, IList kinds, IDictionary additionalBinaryDataProperties) + { + Dataset = dataset; + Kinds = kinds; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// Reference to the single Foundry Dataset (one combined JSONL file, version-aligned to `EvaluatorVersion.version`) holding all artifacts produced by the generation pipeline. Each row in the JSONL carries a `kind` field discriminating its content (e.g. `spec`, `tools`, `context`). + public DatasetReference Dataset { get; } + + /// The kinds of rows present in `dataset`. Always contains `"spec"` (the generated evaluation specification, a Markdown document describing what the evaluator measures). May additionally contain `"tools"` (when the generation pipeline produced or inferred OpenAI tool schemas) and/or `"context"` (when supplementary materials such as file uploads or trace samples were used during generation). + public IList Kinds { get; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/EvaluatorGenerationInputs.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/EvaluatorGenerationInputs.Serialization.cs new file mode 100644 index 000000000000..f40cedb2153a --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/EvaluatorGenerationInputs.Serialization.cs @@ -0,0 +1,193 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.AI.Projects +{ + /// Caller-supplied inputs for an evaluator generation job. + public partial class EvaluatorGenerationInputs : IJsonModel + { + /// Initializes a new instance of for deserialization. + internal EvaluatorGenerationInputs() + { + } + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual EvaluatorGenerationInputs PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeEvaluatorGenerationInputs(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EvaluatorGenerationInputs)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(EvaluatorGenerationInputs)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + EvaluatorGenerationInputs IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EvaluatorGenerationInputs)} does not support writing '{format}' format."); + } + writer.WritePropertyName("sources"u8); + writer.WriteStartArray(); + foreach (EvaluatorGenerationJobSource item in Sources) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + writer.WritePropertyName("model"u8); + writer.WriteStringValue(Model); + writer.WritePropertyName("evaluator_name"u8); + writer.WriteStringValue(EvaluatorName); + if (Optional.IsDefined(EvaluatorDisplayName)) + { + writer.WritePropertyName("evaluator_display_name"u8); + writer.WriteStringValue(EvaluatorDisplayName); + } + if (Optional.IsDefined(EvaluatorDescription)) + { + writer.WritePropertyName("evaluator_description"u8); + writer.WriteStringValue(EvaluatorDescription); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + EvaluatorGenerationInputs IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual EvaluatorGenerationInputs JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EvaluatorGenerationInputs)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEvaluatorGenerationInputs(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static EvaluatorGenerationInputs DeserializeEvaluatorGenerationInputs(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IList sources = default; + string model = default; + string evaluatorName = default; + string evaluatorDisplayName = default; + string evaluatorDescription = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("sources"u8)) + { + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(EvaluatorGenerationJobSource.DeserializeEvaluatorGenerationJobSource(item, options)); + } + sources = array; + continue; + } + if (prop.NameEquals("model"u8)) + { + model = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("evaluator_name"u8)) + { + evaluatorName = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("evaluator_display_name"u8)) + { + evaluatorDisplayName = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("evaluator_description"u8)) + { + evaluatorDescription = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new EvaluatorGenerationInputs( + sources, + model, + evaluatorName, + evaluatorDisplayName, + evaluatorDescription, + additionalBinaryDataProperties); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/EvaluatorGenerationInputs.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/EvaluatorGenerationInputs.cs new file mode 100644 index 000000000000..9b65295c187e --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/EvaluatorGenerationInputs.cs @@ -0,0 +1,65 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Azure.AI.Projects +{ + /// Caller-supplied inputs for an evaluator generation job. + public partial class EvaluatorGenerationInputs + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + /// Source materials for generation — agent descriptions, prompts, traces, or datasets. Each entry is an `EvaluatorGenerationJobSource` variant discriminated by `type`. + /// The LLM model to use for rubric generation (e.g., 'gpt-4o'). Required — users must provide their own model rather than relying on service-owned capacity. + /// The evaluator name (immutable identifier). 1-256 characters; allowed characters are ASCII letters, digits, underscore (`_`), period (`.`), tilde (`~`), and hyphen (`-`). The prefix `builtin.` is reserved for system-managed evaluators and is rejected by the service. If an evaluator with this name already exists in the project (and is rubric-subtype), the service creates a new version under the same name and uses the prior version's `dimensions` as context for incremental improvement (foundation of the post-//build adaptive loop). Old versions remain queryable via `get_version(name, version)`. If the existing evaluator is not a rubric-subtype evaluator (built-in, prompt-based, code-based), the request is rejected with `400 Bad Request`. + /// , or is null. + public EvaluatorGenerationInputs(IEnumerable sources, string model, string evaluatorName) + { + Argument.AssertNotNull(sources, nameof(sources)); + Argument.AssertNotNull(model, nameof(model)); + Argument.AssertNotNull(evaluatorName, nameof(evaluatorName)); + + Sources = sources.ToList(); + Model = model; + EvaluatorName = evaluatorName; + } + + /// Initializes a new instance of . + /// Source materials for generation — agent descriptions, prompts, traces, or datasets. Each entry is an `EvaluatorGenerationJobSource` variant discriminated by `type`. + /// The LLM model to use for rubric generation (e.g., 'gpt-4o'). Required — users must provide their own model rather than relying on service-owned capacity. + /// The evaluator name (immutable identifier). 1-256 characters; allowed characters are ASCII letters, digits, underscore (`_`), period (`.`), tilde (`~`), and hyphen (`-`). The prefix `builtin.` is reserved for system-managed evaluators and is rejected by the service. If an evaluator with this name already exists in the project (and is rubric-subtype), the service creates a new version under the same name and uses the prior version's `dimensions` as context for incremental improvement (foundation of the post-//build adaptive loop). Old versions remain queryable via `get_version(name, version)`. If the existing evaluator is not a rubric-subtype evaluator (built-in, prompt-based, code-based), the request is rejected with `400 Bad Request`. + /// Optional human-friendly display name for the resulting evaluator. Surfaced as `EvaluatorVersion.display_name` on the persisted evaluator. When omitted, the service uses `evaluator_name` as the display name. The `evaluator_` prefix disambiguates this from the immutable `evaluator_name` identifier. + /// Optional human-friendly description for the resulting evaluator. Surfaced as `EvaluatorVersion.description` on the persisted evaluator. Typically collected from the UI alongside `evaluator_display_name`. The `evaluator_` prefix disambiguates this from any other description fields on related models. + /// Keeps track of any properties unknown to the library. + internal EvaluatorGenerationInputs(IList sources, string model, string evaluatorName, string evaluatorDisplayName, string evaluatorDescription, IDictionary additionalBinaryDataProperties) + { + Sources = sources; + Model = model; + EvaluatorName = evaluatorName; + EvaluatorDisplayName = evaluatorDisplayName; + EvaluatorDescription = evaluatorDescription; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// Source materials for generation — agent descriptions, prompts, traces, or datasets. Each entry is an `EvaluatorGenerationJobSource` variant discriminated by `type`. + public IList Sources { get; } + + /// The LLM model to use for rubric generation (e.g., 'gpt-4o'). Required — users must provide their own model rather than relying on service-owned capacity. + public string Model { get; set; } + + /// The evaluator name (immutable identifier). 1-256 characters; allowed characters are ASCII letters, digits, underscore (`_`), period (`.`), tilde (`~`), and hyphen (`-`). The prefix `builtin.` is reserved for system-managed evaluators and is rejected by the service. If an evaluator with this name already exists in the project (and is rubric-subtype), the service creates a new version under the same name and uses the prior version's `dimensions` as context for incremental improvement (foundation of the post-//build adaptive loop). Old versions remain queryable via `get_version(name, version)`. If the existing evaluator is not a rubric-subtype evaluator (built-in, prompt-based, code-based), the request is rejected with `400 Bad Request`. + public string EvaluatorName { get; set; } + + /// Optional human-friendly display name for the resulting evaluator. Surfaced as `EvaluatorVersion.display_name` on the persisted evaluator. When omitted, the service uses `evaluator_name` as the display name. The `evaluator_` prefix disambiguates this from the immutable `evaluator_name` identifier. + public string EvaluatorDisplayName { get; set; } + + /// Optional human-friendly description for the resulting evaluator. Surfaced as `EvaluatorVersion.description` on the persisted evaluator. Typically collected from the UI alongside `evaluator_display_name`. The `evaluator_` prefix disambiguates this from any other description fields on related models. + public string EvaluatorDescription { get; set; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/EvaluatorGenerationJob.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/EvaluatorGenerationJob.Serialization.cs new file mode 100644 index 000000000000..f4d8d044b299 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/EvaluatorGenerationJob.Serialization.cs @@ -0,0 +1,263 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.AI.Projects.Evaluation; + +namespace Azure.AI.Projects +{ + /// Evaluator Generation Job resource — a long-running job that generates rubric-based evaluator definitions from source materials. On success, the result is the persisted EvaluatorVersion. + public partial class EvaluatorGenerationJob : IJsonModel + { + /// The data to parse. + /// The client options for reading and writing models. + protected virtual EvaluatorGenerationJob PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeEvaluatorGenerationJob(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EvaluatorGenerationJob)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(EvaluatorGenerationJob)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + EvaluatorGenerationJob IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The to serialize into . + public static implicit operator BinaryContent(EvaluatorGenerationJob evaluatorGenerationJob) + { + if (evaluatorGenerationJob == null) + { + return null; + } + return BinaryContent.Create(evaluatorGenerationJob, ModelSerializationExtensions.WireOptions); + } + + /// The to deserialize the from. + public static explicit operator EvaluatorGenerationJob(ClientResult result) + { + PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeEvaluatorGenerationJob(document.RootElement, ModelSerializationExtensions.WireOptions); + } + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EvaluatorGenerationJob)} does not support writing '{format}' format."); + } + if (options.Format != "W") + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (Optional.IsDefined(Inputs)) + { + writer.WritePropertyName("inputs"u8); + writer.WriteObjectValue(Inputs, options); + } + if (options.Format != "W" && Optional.IsDefined(Result)) + { + writer.WritePropertyName("result"u8); + writer.WriteObjectValue(Result, options); + } + if (options.Format != "W") + { + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status.ToString()); + } + if (options.Format != "W" && Optional.IsDefined(Error)) + { + writer.WritePropertyName("error"u8); + writer.WriteObjectValue(Error, options); + } + if (options.Format != "W") + { + writer.WritePropertyName("created_at"u8); + writer.WriteNumberValue(CreatedAt, "U"); + } + if (options.Format != "W" && Optional.IsDefined(FinishedAt)) + { + writer.WritePropertyName("finished_at"u8); + writer.WriteNumberValue(FinishedAt.Value, "U"); + } + if (options.Format != "W" && Optional.IsDefined(Usage)) + { + writer.WritePropertyName("usage"u8); + writer.WriteObjectValue(Usage, options); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + EvaluatorGenerationJob IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual EvaluatorGenerationJob JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EvaluatorGenerationJob)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEvaluatorGenerationJob(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static EvaluatorGenerationJob DeserializeEvaluatorGenerationJob(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string id = default; + EvaluatorGenerationInputs inputs = default; + EvaluatorVersion result = default; + JobStatus status = default; + FoundryOpenAIError error = default; + DateTimeOffset createdAt = default; + DateTimeOffset? finishedAt = default; + EvaluatorGenerationTokenUsage usage = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("id"u8)) + { + id = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("inputs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + inputs = EvaluatorGenerationInputs.DeserializeEvaluatorGenerationInputs(prop.Value, options); + continue; + } + if (prop.NameEquals("result"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + result = EvaluatorVersion.DeserializeEvaluatorVersion(prop.Value, options); + continue; + } + if (prop.NameEquals("status"u8)) + { + status = new JobStatus(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("error"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + error = FoundryOpenAIError.DeserializeFoundryOpenAIError(prop.Value, options); + continue; + } + if (prop.NameEquals("created_at"u8)) + { + createdAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); + continue; + } + if (prop.NameEquals("finished_at"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + finishedAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); + continue; + } + if (prop.NameEquals("usage"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + usage = EvaluatorGenerationTokenUsage.DeserializeEvaluatorGenerationTokenUsage(prop.Value, options); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new EvaluatorGenerationJob( + id, + inputs, + result, + status, + error, + createdAt, + finishedAt, + usage, + additionalBinaryDataProperties); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/EvaluatorGenerationJob.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/EvaluatorGenerationJob.cs new file mode 100644 index 000000000000..379c2275cee0 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/EvaluatorGenerationJob.cs @@ -0,0 +1,66 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.AI.Projects.Evaluation; + +namespace Azure.AI.Projects +{ + /// Evaluator Generation Job resource — a long-running job that generates rubric-based evaluator definitions from source materials. On success, the result is the persisted EvaluatorVersion. + public partial class EvaluatorGenerationJob + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + public EvaluatorGenerationJob() + { + } + + /// Initializes a new instance of . + /// Server-assigned unique identifier. + /// Caller-supplied inputs. + /// Result produced on success. + /// Current lifecycle status. + /// Error details — populated only on failure. + /// The timestamp when the job was created, represented in Unix time (seconds since January 1, 1970). + /// The timestamp when the job finished, represented in Unix time (seconds since January 1, 1970). + /// Token consumption summary. Populated when the job reaches a terminal state. + /// Keeps track of any properties unknown to the library. + internal EvaluatorGenerationJob(string id, EvaluatorGenerationInputs inputs, EvaluatorVersion result, JobStatus status, FoundryOpenAIError error, DateTimeOffset createdAt, DateTimeOffset? finishedAt, EvaluatorGenerationTokenUsage usage, IDictionary additionalBinaryDataProperties) + { + Id = id; + Inputs = inputs; + Result = result; + Status = status; + Error = error; + CreatedAt = createdAt; + FinishedAt = finishedAt; + Usage = usage; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// Server-assigned unique identifier. + public string Id { get; } + + /// Caller-supplied inputs. + public EvaluatorGenerationInputs Inputs { get; set; } + + /// Result produced on success. + public EvaluatorVersion Result { get; } + + /// Current lifecycle status. + public JobStatus Status { get; } + + /// The timestamp when the job was created, represented in Unix time (seconds since January 1, 1970). + public DateTimeOffset CreatedAt { get; } + + /// The timestamp when the job finished, represented in Unix time (seconds since January 1, 1970). + public DateTimeOffset? FinishedAt { get; } + + /// Token consumption summary. Populated when the job reaches a terminal state. + public EvaluatorGenerationTokenUsage Usage { get; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/EvaluatorGenerationJobSource.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/EvaluatorGenerationJobSource.Serialization.cs new file mode 100644 index 000000000000..2502fcec4faf --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/EvaluatorGenerationJobSource.Serialization.cs @@ -0,0 +1,142 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.AI.Projects +{ + /// + /// The base source model for evaluator generation jobs. Polymorphic over `type`. + /// Please note this is the abstract base class. The derived classes available for instantiation are: , , , and . + /// + [PersistableModelProxy(typeof(UnknownEvaluatorGenerationJobSource))] + public abstract partial class EvaluatorGenerationJobSource : IJsonModel + { + /// Initializes a new instance of for deserialization. + internal EvaluatorGenerationJobSource() + { + } + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual EvaluatorGenerationJobSource PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeEvaluatorGenerationJobSource(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EvaluatorGenerationJobSource)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(EvaluatorGenerationJobSource)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + EvaluatorGenerationJobSource IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EvaluatorGenerationJobSource)} does not support writing '{format}' format."); + } + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + EvaluatorGenerationJobSource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual EvaluatorGenerationJobSource JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EvaluatorGenerationJobSource)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEvaluatorGenerationJobSource(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static EvaluatorGenerationJobSource DeserializeEvaluatorGenerationJobSource(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("type"u8, out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "prompt": + return PromptEvaluatorGenerationJobSource.DeserializePromptEvaluatorGenerationJobSource(element, options); + case "agent": + return AgentEvaluatorGenerationJobSource.DeserializeAgentEvaluatorGenerationJobSource(element, options); + case "traces": + return TracesEvaluatorGenerationJobSource.DeserializeTracesEvaluatorGenerationJobSource(element, options); + case "dataset": + return DatasetEvaluatorGenerationJobSource.DeserializeDatasetEvaluatorGenerationJobSource(element, options); + } + } + return UnknownEvaluatorGenerationJobSource.DeserializeUnknownEvaluatorGenerationJobSource(element, options); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/EvaluatorGenerationJobSource.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/EvaluatorGenerationJobSource.cs new file mode 100644 index 000000000000..5e91696b1cf0 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/EvaluatorGenerationJobSource.cs @@ -0,0 +1,38 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + /// + /// The base source model for evaluator generation jobs. Polymorphic over `type`. + /// Please note this is the abstract base class. The derived classes available for instantiation are: , , , and . + /// + public abstract partial class EvaluatorGenerationJobSource + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + /// The type of source. + private protected EvaluatorGenerationJobSource(EvaluatorGenerationJobSourceType @type) + { + Type = @type; + } + + /// Initializes a new instance of . + /// The type of source. + /// Keeps track of any properties unknown to the library. + internal EvaluatorGenerationJobSource(EvaluatorGenerationJobSourceType @type, IDictionary additionalBinaryDataProperties) + { + Type = @type; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// The type of source. + internal EvaluatorGenerationJobSourceType Type { get; set; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/EvaluatorGenerationJobSourceType.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/EvaluatorGenerationJobSourceType.cs new file mode 100644 index 000000000000..395304460ce7 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/EvaluatorGenerationJobSourceType.cs @@ -0,0 +1,77 @@ +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.AI.Projects +{ + /// The supported source types for evaluator generation jobs. + internal readonly partial struct EvaluatorGenerationJobSourceType : IEquatable + { + private readonly string _value; + /// Prompt source — inline text provided by the user. + private const string PromptValue = "prompt"; + /// Agent source — references an agent to fetch instructions and metadata from. + private const string AgentValue = "agent"; + /// Traces source — conversation traces from Application Insights. + private const string TracesValue = "traces"; + /// Dataset source — reference to a dataset. + private const string DatasetValue = "dataset"; + + /// Initializes a new instance of . + /// The value. + /// is null. + public EvaluatorGenerationJobSourceType(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + + /// Prompt source — inline text provided by the user. + public static EvaluatorGenerationJobSourceType Prompt { get; } = new EvaluatorGenerationJobSourceType(PromptValue); + + /// Agent source — references an agent to fetch instructions and metadata from. + public static EvaluatorGenerationJobSourceType Agent { get; } = new EvaluatorGenerationJobSourceType(AgentValue); + + /// Traces source — conversation traces from Application Insights. + public static EvaluatorGenerationJobSourceType Traces { get; } = new EvaluatorGenerationJobSourceType(TracesValue); + + /// Dataset source — reference to a dataset. + public static EvaluatorGenerationJobSourceType Dataset { get; } = new EvaluatorGenerationJobSourceType(DatasetValue); + + /// Determines if two values are the same. + /// The left value to compare. + /// The right value to compare. + public static bool operator ==(EvaluatorGenerationJobSourceType left, EvaluatorGenerationJobSourceType right) => left.Equals(right); + + /// Determines if two values are not the same. + /// The left value to compare. + /// The right value to compare. + public static bool operator !=(EvaluatorGenerationJobSourceType left, EvaluatorGenerationJobSourceType right) => !left.Equals(right); + + /// Converts a string to a . + /// The value. + public static implicit operator EvaluatorGenerationJobSourceType(string value) => new EvaluatorGenerationJobSourceType(value); + + /// Converts a string to a . + /// The value. + public static implicit operator EvaluatorGenerationJobSourceType?(string value) => value == null ? null : new EvaluatorGenerationJobSourceType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is EvaluatorGenerationJobSourceType other && Equals(other); + + /// + public bool Equals(EvaluatorGenerationJobSourceType 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/Models/EvaluatorGenerationTokenUsage.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/EvaluatorGenerationTokenUsage.Serialization.cs new file mode 100644 index 000000000000..3123baba14cf --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/EvaluatorGenerationTokenUsage.Serialization.cs @@ -0,0 +1,155 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.AI.Projects +{ + /// Token consumption summary for an evaluator generation job. Populated when the job reaches a terminal state. + public partial class EvaluatorGenerationTokenUsage : IJsonModel + { + /// Initializes a new instance of for deserialization. + internal EvaluatorGenerationTokenUsage() + { + } + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual EvaluatorGenerationTokenUsage PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeEvaluatorGenerationTokenUsage(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EvaluatorGenerationTokenUsage)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(EvaluatorGenerationTokenUsage)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + EvaluatorGenerationTokenUsage IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EvaluatorGenerationTokenUsage)} does not support writing '{format}' format."); + } + writer.WritePropertyName("input_tokens"u8); + writer.WriteNumberValue(InputTokens); + writer.WritePropertyName("output_tokens"u8); + writer.WriteNumberValue(OutputTokens); + writer.WritePropertyName("total_tokens"u8); + writer.WriteNumberValue(TotalTokens); + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + EvaluatorGenerationTokenUsage IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual EvaluatorGenerationTokenUsage JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EvaluatorGenerationTokenUsage)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEvaluatorGenerationTokenUsage(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static EvaluatorGenerationTokenUsage DeserializeEvaluatorGenerationTokenUsage(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + long inputTokens = default; + long outputTokens = default; + long totalTokens = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("input_tokens"u8)) + { + inputTokens = prop.Value.GetInt64(); + continue; + } + if (prop.NameEquals("output_tokens"u8)) + { + outputTokens = prop.Value.GetInt64(); + continue; + } + if (prop.NameEquals("total_tokens"u8)) + { + totalTokens = prop.Value.GetInt64(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new EvaluatorGenerationTokenUsage(inputTokens, outputTokens, totalTokens, additionalBinaryDataProperties); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/EvaluatorGenerationTokenUsage.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/EvaluatorGenerationTokenUsage.cs new file mode 100644 index 000000000000..56e84ffbdaf2 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/EvaluatorGenerationTokenUsage.cs @@ -0,0 +1,49 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + /// Token consumption summary for an evaluator generation job. Populated when the job reaches a terminal state. + public partial class EvaluatorGenerationTokenUsage + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + /// Number of input (prompt) tokens consumed. + /// Number of output (completion) tokens generated. + /// Total tokens consumed (input + output). + internal EvaluatorGenerationTokenUsage(long inputTokens, long outputTokens, long totalTokens) + { + InputTokens = inputTokens; + OutputTokens = outputTokens; + TotalTokens = totalTokens; + } + + /// Initializes a new instance of . + /// Number of input (prompt) tokens consumed. + /// Number of output (completion) tokens generated. + /// Total tokens consumed (input + output). + /// Keeps track of any properties unknown to the library. + internal EvaluatorGenerationTokenUsage(long inputTokens, long outputTokens, long totalTokens, IDictionary additionalBinaryDataProperties) + { + InputTokens = inputTokens; + OutputTokens = outputTokens; + TotalTokens = totalTokens; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// Number of input (prompt) tokens consumed. + public long InputTokens { get; } + + /// Number of output (completion) tokens generated. + public long OutputTokens { get; } + + /// Total tokens consumed (input + output). + public long TotalTokens { get; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/EvaluatorVersion.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/EvaluatorVersion.Serialization.cs index b99e7141f5d8..f1aeda03ca5c 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/EvaluatorVersion.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/EvaluatorVersion.Serialization.cs @@ -127,6 +127,11 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit writer.WriteEndArray(); writer.WritePropertyName("definition"u8); writer.WriteObjectValue(Definition, options); + if (options.Format != "W" && Optional.IsDefined(GenerationArtifacts)) + { + writer.WritePropertyName("generation_artifacts"u8); + writer.WriteObjectValue(GenerationArtifacts, options); + } if (options.Format != "W") { writer.WritePropertyName("created_by"u8); @@ -225,6 +230,7 @@ internal static EvaluatorVersion DeserializeEvaluatorVersion(JsonElement element EvaluatorType evaluatorType = default; IList categories = default; EvaluatorDefinition definition = default; + EvaluatorGenerationArtifacts generationArtifacts = default; string createdBy = default; string createdAt = default; string modifiedAt = default; @@ -282,6 +288,15 @@ internal static EvaluatorVersion DeserializeEvaluatorVersion(JsonElement element definition = EvaluatorDefinition.DeserializeEvaluatorDefinition(prop.Value, options); continue; } + if (prop.NameEquals("generation_artifacts"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + generationArtifacts = EvaluatorGenerationArtifacts.DeserializeEvaluatorGenerationArtifacts(prop.Value, options); + continue; + } if (prop.NameEquals("created_by"u8)) { createdBy = prop.Value.GetString(); @@ -349,6 +364,7 @@ internal static EvaluatorVersion DeserializeEvaluatorVersion(JsonElement element evaluatorType, categories, definition, + generationArtifacts, createdBy, createdAt, modifiedAt, diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/EvaluatorVersion.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/EvaluatorVersion.cs index 2ac7f65edf66..23a278ee1ee0 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/EvaluatorVersion.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/EvaluatorVersion.cs @@ -38,6 +38,7 @@ public EvaluatorVersion(EvaluatorType evaluatorType, IEnumerable The type of the evaluator. /// The categories of the evaluator. /// Definition of the evaluator. + /// Provenance artifacts from the generation pipeline. Read-only; present only on evaluator versions created via an EvaluatorGenerationJob. Each artifact resolves to a versioned Foundry Dataset. /// Creator of the evaluator. /// Creation date/time of the evaluator. /// Last modified date/time of the evaluator. @@ -47,13 +48,14 @@ public EvaluatorVersion(EvaluatorType evaluatorType, IEnumerable The asset description text. /// Tag dictionary. Tags can be added, removed, and updated. /// Keeps track of any properties unknown to the library. - internal EvaluatorVersion(string displayName, IDictionary metadata, EvaluatorType evaluatorType, IList categories, EvaluatorDefinition definition, string createdBy, string createdAt, string modifiedAt, string id, string name, string version, string description, IDictionary tags, IDictionary additionalBinaryDataProperties) + internal EvaluatorVersion(string displayName, IDictionary metadata, EvaluatorType evaluatorType, IList categories, EvaluatorDefinition definition, EvaluatorGenerationArtifacts generationArtifacts, string createdBy, string createdAt, string modifiedAt, string id, string name, string version, string description, IDictionary tags, IDictionary additionalBinaryDataProperties) { DisplayName = displayName; Metadata = metadata; EvaluatorType = evaluatorType; Categories = categories; Definition = definition; + GenerationArtifacts = generationArtifacts; CreatedBy = createdBy; CreatedAt = createdAt; ModifiedAt = modifiedAt; @@ -80,6 +82,9 @@ internal EvaluatorVersion(string displayName, IDictionary metada /// Definition of the evaluator. public EvaluatorDefinition Definition { get; set; } + /// Provenance artifacts from the generation pipeline. Read-only; present only on evaluator versions created via an EvaluatorGenerationJob. Each artifact resolves to a versioned Foundry Dataset. + public EvaluatorGenerationArtifacts GenerationArtifacts { get; } + /// Creator of the evaluator. public string CreatedBy { get; } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/FabricIQPreviewTool.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/FabricIQPreviewTool.Serialization.cs index 94b6f3ac565f..4dc4b3a902a7 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/FabricIQPreviewTool.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/FabricIQPreviewTool.Serialization.cs @@ -110,6 +110,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsCollectionDefined(ToolConfigs)) + { + writer.WritePropertyName("tool_configs"u8); + writer.WriteStartObject(); + foreach (var item in ToolConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } } /// The JSON reader. @@ -145,6 +156,7 @@ internal static FabricIQPreviewTool DeserializeFabricIQPreviewTool(JsonElement e BinaryData requireApproval = default; string name = default; string description = default; + IDictionary toolConfigs = default; foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("type"u8)) @@ -191,6 +203,20 @@ internal static FabricIQPreviewTool DeserializeFabricIQPreviewTool(JsonElement e description = prop.Value.GetString(); continue; } + if (prop.NameEquals("tool_configs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, ToolConfig.DeserializeToolConfig(prop0.Value, options)); + } + toolConfigs = dictionary; + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); @@ -204,7 +230,8 @@ internal static FabricIQPreviewTool DeserializeFabricIQPreviewTool(JsonElement e serverUrl, requireApproval, name, - description); + description, + toolConfigs ?? new ChangeTrackingDictionary()); } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/FabricIQPreviewTool.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/FabricIQPreviewTool.cs index 7e37d271e9b0..ce675ad977e8 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/FabricIQPreviewTool.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/FabricIQPreviewTool.cs @@ -19,6 +19,7 @@ public FabricIQPreviewTool(string projectConnectionId) : base(ToolType.FabricIqP Argument.AssertNotNull(projectConnectionId, nameof(projectConnectionId)); ProjectConnectionId = projectConnectionId; + ToolConfigs = new ChangeTrackingDictionary(); } /// Initializes a new instance of . @@ -30,7 +31,12 @@ public FabricIQPreviewTool(string projectConnectionId) : base(ToolType.FabricIqP /// (Optional) Whether the agent requires approval before executing actions. Default is always. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. - internal FabricIQPreviewTool(ToolType @type, IDictionary additionalBinaryDataProperties, string projectConnectionId, string serverLabel, Uri serverUrl, BinaryData requireApproval, string name, string description) : base(@type, additionalBinaryDataProperties) + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + internal FabricIQPreviewTool(ToolType @type, IDictionary additionalBinaryDataProperties, string projectConnectionId, string serverLabel, Uri serverUrl, BinaryData requireApproval, string name, string description, IDictionary toolConfigs) : base(@type, additionalBinaryDataProperties) { ProjectConnectionId = projectConnectionId; ServerLabel = serverLabel; @@ -38,10 +44,11 @@ internal FabricIQPreviewTool(ToolType @type, IDictionary add RequireApproval = requireApproval; Name = name; Description = description; + ToolConfigs = toolConfigs; } /// The ID of the FabricIQ project connection. - public string ProjectConnectionId { get; } + public string ProjectConnectionId { get; set; } /// (Optional) The label of the FabricIQ MCP server to connect to. public string ServerLabel { get; set; } @@ -95,5 +102,12 @@ internal FabricIQPreviewTool(ToolType @type, IDictionary add /// Optional user-defined description for this tool or configuration. public string Description { get; set; } + + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + public IDictionary ToolConfigs { get; } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/FileDataGenerationJobOutput.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/FileDataGenerationJobOutput.Serialization.cs new file mode 100644 index 000000000000..87833b9d609c --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/FileDataGenerationJobOutput.Serialization.cs @@ -0,0 +1,140 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.AI.Projects +{ + /// Azure OpenAI file output for a data generation job. + public partial class FileDataGenerationJobOutput : DataGenerationJobOutput, IJsonModel + { + /// The data to parse. + /// The client options for reading and writing models. + protected override DataGenerationJobOutput PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeFileDataGenerationJobOutput(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FileDataGenerationJobOutput)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(FileDataGenerationJobOutput)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + FileDataGenerationJobOutput IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (FileDataGenerationJobOutput)PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FileDataGenerationJobOutput)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + if (options.Format != "W") + { + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + if (options.Format != "W") + { + writer.WritePropertyName("filename"u8); + writer.WriteStringValue(Filename); + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + FileDataGenerationJobOutput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (FileDataGenerationJobOutput)JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected override DataGenerationJobOutput JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FileDataGenerationJobOutput)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFileDataGenerationJobOutput(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static FileDataGenerationJobOutput DeserializeFileDataGenerationJobOutput(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DataGenerationJobOutputType @type = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + string id = default; + string filename = default; + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("type"u8)) + { + @type = new DataGenerationJobOutputType(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("id"u8)) + { + id = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("filename"u8)) + { + filename = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new FileDataGenerationJobOutput(@type, additionalBinaryDataProperties, id, filename); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/FileDataGenerationJobOutput.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/FileDataGenerationJobOutput.cs new file mode 100644 index 000000000000..91fcf9b6538d --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/FileDataGenerationJobOutput.cs @@ -0,0 +1,35 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + /// Azure OpenAI file output for a data generation job. + public partial class FileDataGenerationJobOutput : DataGenerationJobOutput + { + /// Initializes a new instance of . + internal FileDataGenerationJobOutput() : base(DataGenerationJobOutputType.File) + { + } + + /// Initializes a new instance of . + /// The type of the output. + /// Keeps track of any properties unknown to the library. + /// The id of the output Azure OpenAI file. + /// The filename of the output Azure OpenAI file. + internal FileDataGenerationJobOutput(DataGenerationJobOutputType @type, IDictionary additionalBinaryDataProperties, string id, string filename) : base(@type, additionalBinaryDataProperties) + { + Id = id; + Filename = filename; + } + + /// The id of the output Azure OpenAI file. + public string Id { get; } + + /// The filename of the output Azure OpenAI file. + public string Filename { get; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/FileDataGenerationJobSource.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/FileDataGenerationJobSource.Serialization.cs new file mode 100644 index 000000000000..2363952245b2 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/FileDataGenerationJobSource.Serialization.cs @@ -0,0 +1,137 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.AI.Projects +{ + /// File source for data generation jobs — Azure OpenAI file input. + public partial class FileDataGenerationJobSource : DataGenerationJobSource, IJsonModel + { + /// Initializes a new instance of for deserialization. + internal FileDataGenerationJobSource() + { + } + + /// The data to parse. + /// The client options for reading and writing models. + protected override DataGenerationJobSource PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeFileDataGenerationJobSource(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(FileDataGenerationJobSource)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(FileDataGenerationJobSource)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + FileDataGenerationJobSource IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (FileDataGenerationJobSource)PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FileDataGenerationJobSource)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + } + + /// The JSON reader. + /// The client options for reading and writing models. + FileDataGenerationJobSource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (FileDataGenerationJobSource)JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected override DataGenerationJobSource JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(FileDataGenerationJobSource)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeFileDataGenerationJobSource(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static FileDataGenerationJobSource DeserializeFileDataGenerationJobSource(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DataGenerationJobSourceType @type = default; + string description = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + string id = default; + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("type"u8)) + { + @type = new DataGenerationJobSourceType(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("description"u8)) + { + description = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("id"u8)) + { + id = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new FileDataGenerationJobSource(@type, description, additionalBinaryDataProperties, id); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/FileDataGenerationJobSource.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/FileDataGenerationJobSource.cs new file mode 100644 index 000000000000..ccb6de4f0f92 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/FileDataGenerationJobSource.cs @@ -0,0 +1,36 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + /// File source for data generation jobs — Azure OpenAI file input. + public partial class FileDataGenerationJobSource : DataGenerationJobSource + { + /// Initializes a new instance of . + /// Input Azure Open AI file id used for data generation. + /// is null. + public FileDataGenerationJobSource(string id) : base(DataGenerationJobSourceType.File) + { + Argument.AssertNotNull(id, nameof(id)); + + Id = id; + } + + /// Initializes a new instance of . + /// The type of source. + /// Optional description of what this source represents — helps the pipeline interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities'). + /// Keeps track of any properties unknown to the library. + /// Input Azure Open AI file id used for data generation. + internal FileDataGenerationJobSource(DataGenerationJobSourceType @type, string description, IDictionary additionalBinaryDataProperties, string id) : base(@type, description, additionalBinaryDataProperties) + { + Id = id; + } + + /// Input Azure Open AI file id used for data generation. + public string Id { get; set; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/FoundryFeaturesOptInKeys.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/FoundryFeaturesOptInKeys.Serialization.cs index 55f7054d04d4..54199bad478c 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/FoundryFeaturesOptInKeys.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/FoundryFeaturesOptInKeys.Serialization.cs @@ -16,7 +16,7 @@ internal static partial class FoundryFeaturesOptInKeysExtensions FoundryFeaturesOptInKeys.RedTeamsV1Preview => "RedTeams=V1Preview", FoundryFeaturesOptInKeys.InsightsV1Preview => "Insights=V1Preview", FoundryFeaturesOptInKeys.MemoryStoresV1Preview => "MemoryStores=V1Preview", - FoundryFeaturesOptInKeys.ToolboxesV1Preview => "Toolboxes=V1Preview", + FoundryFeaturesOptInKeys.RoutinesV1Preview => "Routines=V1Preview", FoundryFeaturesOptInKeys.SkillsV1Preview => "Skills=V1Preview", FoundryFeaturesOptInKeys.DataGenerationJobsV1Preview => "DataGenerationJobs=V1Preview", FoundryFeaturesOptInKeys.ModelsV1Preview => "Models=V1Preview", @@ -47,9 +47,9 @@ public static FoundryFeaturesOptInKeys ToFoundryFeaturesOptInKeys(this string va { return FoundryFeaturesOptInKeys.MemoryStoresV1Preview; } - if (StringComparer.OrdinalIgnoreCase.Equals(value, "Toolboxes=V1Preview")) + if (StringComparer.OrdinalIgnoreCase.Equals(value, "Routines=V1Preview")) { - return FoundryFeaturesOptInKeys.ToolboxesV1Preview; + return FoundryFeaturesOptInKeys.RoutinesV1Preview; } if (StringComparer.OrdinalIgnoreCase.Equals(value, "Skills=V1Preview")) { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/FoundryFeaturesOptInKeys.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/FoundryFeaturesOptInKeys.cs index aef746ad7d1d..b01ecb84246d 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/FoundryFeaturesOptInKeys.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/FoundryFeaturesOptInKeys.cs @@ -17,8 +17,8 @@ public enum FoundryFeaturesOptInKeys InsightsV1Preview, /// MemoryStoresV1Preview. MemoryStoresV1Preview, - /// ToolboxesV1Preview. - ToolboxesV1Preview, + /// RoutinesV1Preview. + RoutinesV1Preview, /// SkillsV1Preview. SkillsV1Preview, /// DataGenerationJobsV1Preview. diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/FunctionShellToolParam.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/FunctionShellToolParam.Serialization.cs index 8ff1644ec5e4..f30890f65af4 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/FunctionShellToolParam.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/FunctionShellToolParam.Serialization.cs @@ -86,6 +86,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsCollectionDefined(ToolConfigs)) + { + writer.WritePropertyName("tool_configs"u8); + writer.WriteStartObject(); + foreach (var item in ToolConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } } /// The JSON reader. @@ -118,6 +129,7 @@ internal static FunctionShellToolParam DeserializeFunctionShellToolParam(JsonEle FunctionShellToolParamEnvironment environment = default; string name = default; string description = default; + IDictionary toolConfigs = default; foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("type"u8)) @@ -145,12 +157,32 @@ internal static FunctionShellToolParam DeserializeFunctionShellToolParam(JsonEle description = prop.Value.GetString(); continue; } + if (prop.NameEquals("tool_configs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, ToolConfig.DeserializeToolConfig(prop0.Value, options)); + } + toolConfigs = dictionary; + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new FunctionShellToolParam(@type, additionalBinaryDataProperties, environment, name, description); + return new FunctionShellToolParam( + @type, + additionalBinaryDataProperties, + environment, + name, + description, + toolConfigs ?? new ChangeTrackingDictionary()); } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/FunctionShellToolParam.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/FunctionShellToolParam.cs index 5f616b75d552..9a5778eeb132 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/FunctionShellToolParam.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/FunctionShellToolParam.cs @@ -13,6 +13,7 @@ internal partial class FunctionShellToolParam : InternalTool /// Initializes a new instance of . public FunctionShellToolParam() : base(ToolType.Shell) { + ToolConfigs = new ChangeTrackingDictionary(); } /// Initializes a new instance of . @@ -21,11 +22,17 @@ public FunctionShellToolParam() : base(ToolType.Shell) /// /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. - internal FunctionShellToolParam(ToolType @type, IDictionary additionalBinaryDataProperties, FunctionShellToolParamEnvironment environment, string name, string description) : base(@type, additionalBinaryDataProperties) + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + internal FunctionShellToolParam(ToolType @type, IDictionary additionalBinaryDataProperties, FunctionShellToolParamEnvironment environment, string name, string description, IDictionary toolConfigs) : base(@type, additionalBinaryDataProperties) { Environment = environment; Name = name; Description = description; + ToolConfigs = toolConfigs; } /// Gets or sets the Environment. @@ -36,5 +43,12 @@ internal FunctionShellToolParam(ToolType @type, IDictionary /// Optional user-defined description for this tool or configuration. public string Description { get; set; } + + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + public IDictionary ToolConfigs { get; } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/FunctionShellToolParamEnvironmentContainerReferenceParam.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/FunctionShellToolParamEnvironmentContainerReferenceParam.cs index af46de94a130..17af59bdca8e 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/FunctionShellToolParamEnvironmentContainerReferenceParam.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/FunctionShellToolParamEnvironmentContainerReferenceParam.cs @@ -30,6 +30,6 @@ internal FunctionShellToolParamEnvironmentContainerReferenceParam(FunctionShellT } /// The ID of the referenced container. - public string ContainerId { get; } + public string ContainerId { get; set; } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/GitHubIssueOpenedRoutineTrigger.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/GitHubIssueOpenedRoutineTrigger.Serialization.cs new file mode 100644 index 000000000000..35af28dd846f --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/GitHubIssueOpenedRoutineTrigger.Serialization.cs @@ -0,0 +1,147 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.AI.Projects +{ + /// A GitHub issue-opened routine trigger. + public partial class GitHubIssueOpenedRoutineTrigger : RoutineTrigger, IJsonModel + { + /// Initializes a new instance of for deserialization. + internal GitHubIssueOpenedRoutineTrigger() + { + } + + /// The data to parse. + /// The client options for reading and writing models. + protected override RoutineTrigger PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeGitHubIssueOpenedRoutineTrigger(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(GitHubIssueOpenedRoutineTrigger)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(GitHubIssueOpenedRoutineTrigger)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + GitHubIssueOpenedRoutineTrigger IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (GitHubIssueOpenedRoutineTrigger)PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(GitHubIssueOpenedRoutineTrigger)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("connection_id"u8); + writer.WriteStringValue(ConnectionId); + writer.WritePropertyName("assignee"u8); + writer.WriteStringValue(Assignee); + writer.WritePropertyName("repository"u8); + writer.WriteStringValue(Repository); + } + + /// The JSON reader. + /// The client options for reading and writing models. + GitHubIssueOpenedRoutineTrigger IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (GitHubIssueOpenedRoutineTrigger)JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected override RoutineTrigger JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(GitHubIssueOpenedRoutineTrigger)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeGitHubIssueOpenedRoutineTrigger(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static GitHubIssueOpenedRoutineTrigger DeserializeGitHubIssueOpenedRoutineTrigger(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + RoutineTriggerType @type = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + string connectionId = default; + string assignee = default; + string repository = default; + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("type"u8)) + { + @type = new RoutineTriggerType(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("connection_id"u8)) + { + connectionId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("assignee"u8)) + { + assignee = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("repository"u8)) + { + repository = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new GitHubIssueOpenedRoutineTrigger(@type, additionalBinaryDataProperties, connectionId, assignee, repository); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/GitHubIssueOpenedRoutineTrigger.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/GitHubIssueOpenedRoutineTrigger.cs new file mode 100644 index 000000000000..b0c69f72e38e --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/GitHubIssueOpenedRoutineTrigger.cs @@ -0,0 +1,51 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + /// A GitHub issue-opened routine trigger. + public partial class GitHubIssueOpenedRoutineTrigger : RoutineTrigger + { + /// Initializes a new instance of . + /// The workspace connection identifier that resolves the GitHub configuration for the trigger. + /// The GitHub assignee or organization filter that scopes which issues can fire the trigger. + /// The GitHub repository filter that scopes which issues can fire the trigger. + /// , or is null. + public GitHubIssueOpenedRoutineTrigger(string connectionId, string assignee, string repository) : base(RoutineTriggerType.GithubIssueOpened) + { + Argument.AssertNotNull(connectionId, nameof(connectionId)); + Argument.AssertNotNull(assignee, nameof(assignee)); + Argument.AssertNotNull(repository, nameof(repository)); + + ConnectionId = connectionId; + Assignee = assignee; + Repository = repository; + } + + /// Initializes a new instance of . + /// The trigger type. + /// Keeps track of any properties unknown to the library. + /// The workspace connection identifier that resolves the GitHub configuration for the trigger. + /// The GitHub assignee or organization filter that scopes which issues can fire the trigger. + /// The GitHub repository filter that scopes which issues can fire the trigger. + internal GitHubIssueOpenedRoutineTrigger(RoutineTriggerType @type, IDictionary additionalBinaryDataProperties, string connectionId, string assignee, string repository) : base(@type, additionalBinaryDataProperties) + { + ConnectionId = connectionId; + Assignee = assignee; + Repository = repository; + } + + /// The workspace connection identifier that resolves the GitHub configuration for the trigger. + public string ConnectionId { get; set; } + + /// The GitHub assignee or organization filter that scopes which issues can fire the trigger. + public string Assignee { get; set; } + + /// The GitHub repository filter that scopes which issues can fire the trigger. + public string Repository { get; set; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/HybridSearchOptions.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/HybridSearchOptions.cs index 2df8e65b6d4c..6fa3810fa30e 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/HybridSearchOptions.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/HybridSearchOptions.cs @@ -34,9 +34,9 @@ internal HybridSearchOptions(double embeddingWeight, double textWeight, IDiction } /// The weight of the embedding in the reciprocal ranking fusion. - public double EmbeddingWeight { get; } + public double EmbeddingWeight { get; set; } /// The weight of the text in the reciprocal ranking fusion. - public double TextWeight { get; } + public double TextWeight { get; set; } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/InlineSkillParam.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/InlineSkillParam.cs index 8557a0338022..66b0515df09d 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/InlineSkillParam.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/InlineSkillParam.cs @@ -40,12 +40,12 @@ internal InlineSkillParam(ContainerSkillType @type, IDictionary The name of the skill. - public string Name { get; } + public string Name { get; set; } /// The description of the skill. - public string Description { get; } + public string Description { get; set; } /// Inline skill payload. - public InlineSkillSourceParam Source { get; } + public InlineSkillSourceParam Source { get; set; } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/InlineSkillSourceParam.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/InlineSkillSourceParam.cs index 97c611d56fa5..e9b2b5d54908 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/InlineSkillSourceParam.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/InlineSkillSourceParam.cs @@ -37,12 +37,12 @@ internal InlineSkillSourceParam(string @type, string mediaType, string data, IDi } /// The type of the inline skill source. Must be `base64`. - internal string Type { get; } = "base64"; + public string Type { get; } = "base64"; /// The media type of the inline skill payload. Must be `application/zip`. - internal string MediaType { get; } = "application/zip"; + public string MediaType { get; } = "application/zip"; /// Base64-encoded skill zip bundle. - public string Data { get; } + public string Data { get; set; } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalApproximateLocation.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalApproximateLocation.cs index 58850e545980..e5e3677b5908 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalApproximateLocation.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalApproximateLocation.cs @@ -35,7 +35,7 @@ internal InternalApproximateLocation(string @type, string country, string region } /// The type of location approximation. Always `approximate`. - internal string Type { get; } = "approximate"; + public string Type { get; } = "approximate"; /// Gets or sets the Country. public string Country { get; set; } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalAutoCodeInterpreterToolParam.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalAutoCodeInterpreterToolParam.cs index 676bd4765bd5..1d369dceac28 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalAutoCodeInterpreterToolParam.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalAutoCodeInterpreterToolParam.cs @@ -34,7 +34,7 @@ internal InternalAutoCodeInterpreterToolParam(string @type, IList fileId } /// Always `auto`. - internal string Type { get; } = "auto"; + public string Type { get; } = "auto"; /// An optional list of uploaded files to make available to your code. public IList FileIds { get; } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalCodeInterpreterTool.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalCodeInterpreterTool.Serialization.cs index 10b4122cfb94..e530b1966fc7 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalCodeInterpreterTool.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalCodeInterpreterTool.Serialization.cs @@ -81,6 +81,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsCollectionDefined(ToolConfigs)) + { + writer.WritePropertyName("tool_configs"u8); + writer.WriteStartObject(); + foreach (var item in ToolConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } if (Optional.IsDefined(Container)) { writer.WritePropertyName("container"u8); @@ -124,6 +135,7 @@ internal static InternalCodeInterpreterTool DeserializeInternalCodeInterpreterTo IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); string name = default; string description = default; + IDictionary toolConfigs = default; BinaryData container = default; foreach (var prop in element.EnumerateObject()) { @@ -142,6 +154,20 @@ internal static InternalCodeInterpreterTool DeserializeInternalCodeInterpreterTo description = prop.Value.GetString(); continue; } + if (prop.NameEquals("tool_configs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, ToolConfig.DeserializeToolConfig(prop0.Value, options)); + } + toolConfigs = dictionary; + continue; + } if (prop.NameEquals("container"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -156,7 +182,13 @@ internal static InternalCodeInterpreterTool DeserializeInternalCodeInterpreterTo additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new InternalCodeInterpreterTool(@type, additionalBinaryDataProperties, name, description, container); + return new InternalCodeInterpreterTool( + @type, + additionalBinaryDataProperties, + name, + description, + toolConfigs ?? new ChangeTrackingDictionary(), + container); } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalCodeInterpreterTool.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalCodeInterpreterTool.cs index 067248e08c85..370dfffcc3b6 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalCodeInterpreterTool.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalCodeInterpreterTool.cs @@ -14,6 +14,7 @@ internal partial class InternalCodeInterpreterTool : InternalTool /// Initializes a new instance of . public InternalCodeInterpreterTool() : base(ToolType.CodeInterpreter) { + ToolConfigs = new ChangeTrackingDictionary(); } /// Initializes a new instance of . @@ -21,16 +22,22 @@ public InternalCodeInterpreterTool() : base(ToolType.CodeInterpreter) /// Keeps track of any properties unknown to the library. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// /// /// The code interpreter container. Can be a container ID or an object that /// specifies uploaded file IDs to make available to your code, along with an /// optional `memory_limit` setting. /// If not provided, the service assumes auto. /// - internal InternalCodeInterpreterTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, BinaryData container) : base(@type, additionalBinaryDataProperties) + internal InternalCodeInterpreterTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, IDictionary toolConfigs, BinaryData container) : base(@type, additionalBinaryDataProperties) { Name = name; Description = description; + ToolConfigs = toolConfigs; Container = container; } @@ -40,6 +47,13 @@ internal InternalCodeInterpreterTool(ToolType @type, IDictionary Optional user-defined description for this tool or configuration. public string Description { get; set; } + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + public IDictionary ToolConfigs { get; } + /// /// The code interpreter container. Can be a container ID or an object that /// specifies uploaded file IDs to make available to your code, along with an diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalComparisonFilter.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalComparisonFilter.cs index f6aae710ffa7..443e7014d31f 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalComparisonFilter.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalComparisonFilter.cs @@ -48,10 +48,10 @@ internal InternalComparisonFilter(FileSearchToolFiltersType @type, string key, B /// Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`. /// `eq`: equals`ne`: not equal`gt`: greater than`gte`: greater than or equal`lt`: less than`lte`: less than or equal`in`: in`nin`: not in /// - public FileSearchToolFiltersType Type { get; } + public FileSearchToolFiltersType Type { get; set; } /// The key to compare against the value. - public string Key { get; } + public string Key { get; set; } /// /// The value to compare against the attribute key; supports string, number, or boolean types. @@ -98,6 +98,6 @@ internal InternalComparisonFilter(FileSearchToolFiltersType @type, string key, B /// /// /// - public BinaryData Value { get; } + public BinaryData Value { get; set; } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalCompoundFilter.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalCompoundFilter.cs index 976c4a305a70..8734f7f19e9b 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalCompoundFilter.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalCompoundFilter.cs @@ -36,7 +36,7 @@ internal InternalCompoundFilter(FileSearchToolFiltersType1 @type, IList Type of operation: `and` or `or`. - public FileSearchToolFiltersType1 Type { get; } + public FileSearchToolFiltersType1 Type { get; set; } /// /// Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`. diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalComputerUsePreviewTool.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalComputerUsePreviewTool.cs index 32e14b0afa17..f44a7f600afc 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalComputerUsePreviewTool.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalComputerUsePreviewTool.cs @@ -35,12 +35,12 @@ internal InternalComputerUsePreviewTool(ToolType @type, IDictionary The type of computer environment to control. - public ComputerEnvironment Environment { get; } + public ComputerEnvironment Environment { get; set; } /// The width of the computer display. - public long DisplayWidth { get; } + public long DisplayWidth { get; set; } /// The height of the computer display. - public long DisplayHeight { get; } + public long DisplayHeight { get; set; } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalContainerNetworkPolicyDomainSecretParam.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalContainerNetworkPolicyDomainSecretParam.cs index b09902f49d07..0a3eee1efc04 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalContainerNetworkPolicyDomainSecretParam.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalContainerNetworkPolicyDomainSecretParam.cs @@ -37,12 +37,12 @@ internal InternalContainerNetworkPolicyDomainSecretParam(string domain, string n } /// The domain associated with the secret. - public string Domain { get; } + public string Domain { get; set; } /// The name of the secret to inject for the domain. - public string Name { get; } + public string Name { get; set; } /// The secret value to inject for the domain. - public string Value { get; } + public string Value { get; set; } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalCustomGrammarFormatParam.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalCustomGrammarFormatParam.cs index f3b3441abf43..b3335630de52 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalCustomGrammarFormatParam.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalCustomGrammarFormatParam.cs @@ -30,9 +30,9 @@ internal InternalCustomGrammarFormatParam(CustomToolParamFormatType @type, IDict } /// The syntax of the grammar definition. One of `lark` or `regex`. - public GrammarSyntax1 Syntax { get; } + public GrammarSyntax1 Syntax { get; set; } /// The grammar definition. - public string Definition { get; } + public string Definition { get; set; } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalCustomToolParam.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalCustomToolParam.cs index 967e7d6fd47f..5b029b031eea 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalCustomToolParam.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalCustomToolParam.cs @@ -32,7 +32,7 @@ internal InternalCustomToolParam(ToolType @type, IDictionary } /// The name of the custom tool, used to identify it in tool calls. - public string Name { get; } + public string Name { get; set; } /// Optional description of the custom tool, used to provide more context. public string Description { get; set; } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalFileSearchTool.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalFileSearchTool.Serialization.cs index 894d1f0e27aa..9513bc5bc779 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalFileSearchTool.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalFileSearchTool.Serialization.cs @@ -120,6 +120,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsCollectionDefined(ToolConfigs)) + { + writer.WritePropertyName("tool_configs"u8); + writer.WriteStartObject(); + foreach (var item in ToolConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } } /// The JSON reader. @@ -155,6 +166,7 @@ internal static InternalFileSearchTool DeserializeInternalFileSearchTool(JsonEle BinaryData filters = default; string name = default; string description = default; + IDictionary toolConfigs = default; foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("type"u8)) @@ -217,6 +229,20 @@ internal static InternalFileSearchTool DeserializeInternalFileSearchTool(JsonEle description = prop.Value.GetString(); continue; } + if (prop.NameEquals("tool_configs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, ToolConfig.DeserializeToolConfig(prop0.Value, options)); + } + toolConfigs = dictionary; + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); @@ -230,7 +256,8 @@ internal static InternalFileSearchTool DeserializeInternalFileSearchTool(JsonEle rankingOptions, filters, name, - description); + description, + toolConfigs ?? new ChangeTrackingDictionary()); } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalFileSearchTool.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalFileSearchTool.cs index aa062cfcaf86..4c85e2c24cc1 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalFileSearchTool.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalFileSearchTool.cs @@ -17,6 +17,7 @@ internal partial class InternalFileSearchTool : InternalTool public InternalFileSearchTool(IEnumerable vectorStoreIds) : base(ToolType.FileSearch) { VectorStoreIds = vectorStoreIds.ToList(); + ToolConfigs = new ChangeTrackingDictionary(); } /// Initializes a new instance of . @@ -28,7 +29,12 @@ public InternalFileSearchTool(IEnumerable vectorStoreIds) : base(ToolTyp /// /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. - internal InternalFileSearchTool(ToolType @type, IDictionary additionalBinaryDataProperties, IList vectorStoreIds, long? maxNumResults, InternalRankingOptions rankingOptions, BinaryData filters, string name, string description) : base(@type, additionalBinaryDataProperties) + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + internal InternalFileSearchTool(ToolType @type, IDictionary additionalBinaryDataProperties, IList vectorStoreIds, long? maxNumResults, InternalRankingOptions rankingOptions, BinaryData filters, string name, string description, IDictionary toolConfigs) : base(@type, additionalBinaryDataProperties) { VectorStoreIds = vectorStoreIds; MaxNumResults = maxNumResults; @@ -36,6 +42,7 @@ internal InternalFileSearchTool(ToolType @type, IDictionary Filters = filters; Name = name; Description = description; + ToolConfigs = toolConfigs; } /// The IDs of the vector stores to search. @@ -93,5 +100,12 @@ internal InternalFileSearchTool(ToolType @type, IDictionary /// Optional user-defined description for this tool or configuration. public string Description { get; set; } + + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + public IDictionary ToolConfigs { get; } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalFunctionTool.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalFunctionTool.cs index a4f4a69a6ba8..0a3f63a3d426 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalFunctionTool.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalFunctionTool.cs @@ -40,13 +40,13 @@ internal InternalFunctionTool(ToolType @type, IDictionary ad } /// The name of the function to call. - public string Name { get; } + public string Name { get; set; } /// Gets or sets the Description. public string Description { get; set; } /// - /// Gets the Parameters. + /// Gets or sets the Parameters. /// To assign an object to the value of this property use . /// To assign an already formatted json string to this property use . /// @@ -71,10 +71,10 @@ internal InternalFunctionTool(ToolType @type, IDictionary ad /// /// /// - public IDictionary Parameters { get; } + public IDictionary Parameters { get; set; } - /// Gets the Strict. - public bool? Strict { get; } + /// Gets or sets the Strict. + public bool? Strict { get; set; } /// Whether this function is deferred and loaded via tool search. public bool? DeferLoading { get; set; } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalFunctionToolParam.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalFunctionToolParam.cs index ca39fbbc2d53..db18aaa497f3 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalFunctionToolParam.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalFunctionToolParam.cs @@ -38,8 +38,8 @@ internal InternalFunctionToolParam(string name, string description, InternalEmpt _additionalBinaryDataProperties = additionalBinaryDataProperties; } - /// Gets the Name. - public string Name { get; } + /// Gets or sets the Name. + public string Name { get; set; } /// Gets or sets the Description. public string Description { get; set; } @@ -51,7 +51,7 @@ internal InternalFunctionToolParam(string name, string description, InternalEmpt public bool? Strict { get; set; } /// Gets the Type. - internal string Type { get; } = "function"; + public string Type { get; } = "function"; /// Whether this function should be deferred and discovered via tool search. public bool? DeferLoading { get; set; } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalImageGenTool.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalImageGenTool.Serialization.cs index 3a8384a5724a..5f20e60d4173 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalImageGenTool.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalImageGenTool.Serialization.cs @@ -136,6 +136,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsCollectionDefined(ToolConfigs)) + { + writer.WritePropertyName("tool_configs"u8); + writer.WriteStartObject(); + foreach (var item in ToolConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } } /// The JSON reader. @@ -178,6 +189,7 @@ internal static InternalImageGenTool DeserializeInternalImageGenTool(JsonElement ImageGenActionEnum? action = default; string name = default; string description = default; + IDictionary toolConfigs = default; foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("type"u8)) @@ -295,6 +307,20 @@ internal static InternalImageGenTool DeserializeInternalImageGenTool(JsonElement description = prop.Value.GetString(); continue; } + if (prop.NameEquals("tool_configs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, ToolConfig.DeserializeToolConfig(prop0.Value, options)); + } + toolConfigs = dictionary; + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); @@ -315,7 +341,8 @@ internal static InternalImageGenTool DeserializeInternalImageGenTool(JsonElement partialImages, action, name, - description); + description, + toolConfigs ?? new ChangeTrackingDictionary()); } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalImageGenTool.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalImageGenTool.cs index f6273bdc0c8f..43942a015312 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalImageGenTool.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalImageGenTool.cs @@ -13,6 +13,7 @@ internal partial class InternalImageGenTool : InternalTool /// Initializes a new instance of . public InternalImageGenTool() : base(ToolType.ImageGeneration) { + ToolConfigs = new ChangeTrackingDictionary(); } /// Initializes a new instance of . @@ -46,7 +47,12 @@ public InternalImageGenTool() : base(ToolType.ImageGeneration) /// Whether to generate a new image or edit an existing image. Default: `auto`. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. - internal InternalImageGenTool(ToolType @type, IDictionary additionalBinaryDataProperties, ImageGenToolModel? model, ImageGenToolQuality? quality, ImageGenToolSize? size, ImageGenToolOutputFormat? outputFormat, long? outputCompression, ImageGenToolModeration? moderation, ImageGenToolBackground? background, InputFidelity? inputFidelity, InternalImageGenToolInputImageMask inputImageMask, long? partialImages, ImageGenActionEnum? action, string name, string description) : base(@type, additionalBinaryDataProperties) + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + internal InternalImageGenTool(ToolType @type, IDictionary additionalBinaryDataProperties, ImageGenToolModel? model, ImageGenToolQuality? quality, ImageGenToolSize? size, ImageGenToolOutputFormat? outputFormat, long? outputCompression, ImageGenToolModeration? moderation, ImageGenToolBackground? background, InputFidelity? inputFidelity, InternalImageGenToolInputImageMask inputImageMask, long? partialImages, ImageGenActionEnum? action, string name, string description, IDictionary toolConfigs) : base(@type, additionalBinaryDataProperties) { Model = model; Quality = quality; @@ -61,6 +67,7 @@ internal InternalImageGenTool(ToolType @type, IDictionary ad Action = action; Name = name; Description = description; + ToolConfigs = toolConfigs; } /// Gets or sets the Model. @@ -116,5 +123,12 @@ internal InternalImageGenTool(ToolType @type, IDictionary ad /// Optional user-defined description for this tool or configuration. public string Description { get; set; } + + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + public IDictionary ToolConfigs { get; } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalMCPTool.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalMCPTool.Serialization.cs index 4998040ad7d7..a96d6a09dc6a 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalMCPTool.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalMCPTool.Serialization.cs @@ -148,6 +148,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("project_connection_id"u8); writer.WriteStringValue(ProjectConnectionId); } + if (Optional.IsCollectionDefined(ToolConfigs)) + { + writer.WritePropertyName("tool_configs"u8); + writer.WriteStartObject(); + foreach (var item in ToolConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } } /// The JSON reader. @@ -187,6 +198,7 @@ internal static InternalMCPTool DeserializeInternalMCPTool(JsonElement element, BinaryData requireApproval = default; bool? deferLoading = default; string projectConnectionId = default; + IDictionary toolConfigs = default; foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("type"u8)) @@ -282,6 +294,20 @@ internal static InternalMCPTool DeserializeInternalMCPTool(JsonElement element, projectConnectionId = prop.Value.GetString(); continue; } + if (prop.NameEquals("tool_configs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, ToolConfig.DeserializeToolConfig(prop0.Value, options)); + } + toolConfigs = dictionary; + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); @@ -299,7 +325,8 @@ internal static InternalMCPTool DeserializeInternalMCPTool(JsonElement element, allowedTools, requireApproval, deferLoading, - projectConnectionId); + projectConnectionId, + toolConfigs ?? new ChangeTrackingDictionary()); } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalMCPTool.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalMCPTool.cs index 6aec2eb95046..38a9a232c87f 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalMCPTool.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/InternalMCPTool.cs @@ -17,6 +17,7 @@ public InternalMCPTool(string serverLabel) : base(ToolType.Mcp) { ServerLabel = serverLabel; Headers = new ChangeTrackingDictionary(); + ToolConfigs = new ChangeTrackingDictionary(); } /// Initializes a new instance of . @@ -45,7 +46,12 @@ public InternalMCPTool(string serverLabel) : base(ToolType.Mcp) /// /// Whether this MCP tool is deferred and discovered via tool search. /// The connection ID in the project for the MCP server. The connection stores authentication and other connection details needed to connect to the MCP server. - internal InternalMCPTool(ToolType @type, IDictionary additionalBinaryDataProperties, string serverLabel, Uri serverUrl, MCPToolConnectorId? connectorId, string authorization, string serverDescription, IDictionary headers, BinaryData allowedTools, BinaryData requireApproval, bool? deferLoading, string projectConnectionId) : base(@type, additionalBinaryDataProperties) + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + internal InternalMCPTool(ToolType @type, IDictionary additionalBinaryDataProperties, string serverLabel, Uri serverUrl, MCPToolConnectorId? connectorId, string authorization, string serverDescription, IDictionary headers, BinaryData allowedTools, BinaryData requireApproval, bool? deferLoading, string projectConnectionId, IDictionary toolConfigs) : base(@type, additionalBinaryDataProperties) { ServerLabel = serverLabel; ServerUrl = serverUrl; @@ -57,10 +63,11 @@ internal InternalMCPTool(ToolType @type, IDictionary additio RequireApproval = requireApproval; DeferLoading = deferLoading; ProjectConnectionId = projectConnectionId; + ToolConfigs = toolConfigs; } /// A label for this MCP server, used to identify it in tool calls. - public string ServerLabel { get; } + public string ServerLabel { get; set; } /// /// The URL for the MCP server. One of `server_url` or `connector_id` must be @@ -180,5 +187,12 @@ internal InternalMCPTool(ToolType @type, IDictionary additio /// The connection ID in the project for the MCP server. The connection stores authentication and other connection details needed to connect to the MCP server. public string ProjectConnectionId { get; set; } + + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + public IDictionary ToolConfigs { get; } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/InvokeAgentInvocationsApiDispatchPayload.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/InvokeAgentInvocationsApiDispatchPayload.Serialization.cs new file mode 100644 index 000000000000..e39301b76631 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/InvokeAgentInvocationsApiDispatchPayload.Serialization.cs @@ -0,0 +1,129 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.AI.Projects +{ + /// A manual payload used to test an invocations API routine dispatch. + public partial class InvokeAgentInvocationsApiDispatchPayload : RoutineDispatchPayload, IJsonModel + { + /// The data to parse. + /// The client options for reading and writing models. + protected override RoutineDispatchPayload PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeInvokeAgentInvocationsApiDispatchPayload(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InvokeAgentInvocationsApiDispatchPayload)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(InvokeAgentInvocationsApiDispatchPayload)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + InvokeAgentInvocationsApiDispatchPayload IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InvokeAgentInvocationsApiDispatchPayload)PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InvokeAgentInvocationsApiDispatchPayload)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Input)) + { + writer.WritePropertyName("input"u8); + writer.WriteStringValue(Input); + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + InvokeAgentInvocationsApiDispatchPayload IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InvokeAgentInvocationsApiDispatchPayload)JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected override RoutineDispatchPayload JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InvokeAgentInvocationsApiDispatchPayload)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInvokeAgentInvocationsApiDispatchPayload(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static InvokeAgentInvocationsApiDispatchPayload DeserializeInvokeAgentInvocationsApiDispatchPayload(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + RoutineDispatchPayloadType @type = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + string input = default; + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("type"u8)) + { + @type = new RoutineDispatchPayloadType(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("input"u8)) + { + input = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new InvokeAgentInvocationsApiDispatchPayload(@type, additionalBinaryDataProperties, input); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/InvokeAgentInvocationsApiDispatchPayload.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/InvokeAgentInvocationsApiDispatchPayload.cs new file mode 100644 index 000000000000..a307cb783b2c --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/InvokeAgentInvocationsApiDispatchPayload.cs @@ -0,0 +1,30 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + /// A manual payload used to test an invocations API routine dispatch. + public partial class InvokeAgentInvocationsApiDispatchPayload : RoutineDispatchPayload + { + /// Initializes a new instance of . + public InvokeAgentInvocationsApiDispatchPayload() : base(RoutineDispatchPayloadType.InvokeAgentInvocationsApi) + { + } + + /// Initializes a new instance of . + /// The manual dispatch payload type. + /// Keeps track of any properties unknown to the library. + /// The raw input sent to the downstream invocations target. + internal InvokeAgentInvocationsApiDispatchPayload(RoutineDispatchPayloadType @type, IDictionary additionalBinaryDataProperties, string input) : base(@type, additionalBinaryDataProperties) + { + Input = input; + } + + /// The raw input sent to the downstream invocations target. + public string Input { get; set; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/InvokeAgentInvocationsApiRoutineAction.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/InvokeAgentInvocationsApiRoutineAction.Serialization.cs new file mode 100644 index 000000000000..4cd6d48098a5 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/InvokeAgentInvocationsApiRoutineAction.Serialization.cs @@ -0,0 +1,142 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.AI.Projects +{ + /// Dispatches a routine through the raw invocations API. + public partial class InvokeAgentInvocationsApiRoutineAction : RoutineAction, IJsonModel + { + /// Initializes a new instance of for deserialization. + internal InvokeAgentInvocationsApiRoutineAction() + { + } + + /// The data to parse. + /// The client options for reading and writing models. + protected override RoutineAction PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeInvokeAgentInvocationsApiRoutineAction(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InvokeAgentInvocationsApiRoutineAction)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(InvokeAgentInvocationsApiRoutineAction)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + InvokeAgentInvocationsApiRoutineAction IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InvokeAgentInvocationsApiRoutineAction)PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InvokeAgentInvocationsApiRoutineAction)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("agent_endpoint_id"u8); + writer.WriteStringValue(AgentEndpointId); + if (Optional.IsDefined(SessionId)) + { + writer.WritePropertyName("session_id"u8); + writer.WriteStringValue(SessionId); + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + InvokeAgentInvocationsApiRoutineAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InvokeAgentInvocationsApiRoutineAction)JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected override RoutineAction JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InvokeAgentInvocationsApiRoutineAction)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInvokeAgentInvocationsApiRoutineAction(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static InvokeAgentInvocationsApiRoutineAction DeserializeInvokeAgentInvocationsApiRoutineAction(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + RoutineActionType @type = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + string agentEndpointId = default; + string sessionId = default; + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("type"u8)) + { + @type = new RoutineActionType(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("agent_endpoint_id"u8)) + { + agentEndpointId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("session_id"u8)) + { + sessionId = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new InvokeAgentInvocationsApiRoutineAction(@type, additionalBinaryDataProperties, agentEndpointId, sessionId); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/InvokeAgentInvocationsApiRoutineAction.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/InvokeAgentInvocationsApiRoutineAction.cs new file mode 100644 index 000000000000..ced911e8462e --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/InvokeAgentInvocationsApiRoutineAction.cs @@ -0,0 +1,40 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + /// Dispatches a routine through the raw invocations API. + public partial class InvokeAgentInvocationsApiRoutineAction : RoutineAction + { + /// Initializes a new instance of . + /// The endpoint-scoped agent identifier for invocations API dispatch. + /// is null. + public InvokeAgentInvocationsApiRoutineAction(string agentEndpointId) : base(RoutineActionType.InvokeAgentInvocationsApi) + { + Argument.AssertNotNull(agentEndpointId, nameof(agentEndpointId)); + + AgentEndpointId = agentEndpointId; + } + + /// Initializes a new instance of . + /// The action type. + /// Keeps track of any properties unknown to the library. + /// The endpoint-scoped agent identifier for invocations API dispatch. + /// An optional existing hosted-agent session identifier to continue during the downstream dispatch. + internal InvokeAgentInvocationsApiRoutineAction(RoutineActionType @type, IDictionary additionalBinaryDataProperties, string agentEndpointId, string sessionId) : base(@type, additionalBinaryDataProperties) + { + AgentEndpointId = agentEndpointId; + SessionId = sessionId; + } + + /// The endpoint-scoped agent identifier for invocations API dispatch. + public string AgentEndpointId { get; set; } + + /// An optional existing hosted-agent session identifier to continue during the downstream dispatch. + public string SessionId { get; set; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/InvokeAgentResponsesApiDispatchPayload.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/InvokeAgentResponsesApiDispatchPayload.Serialization.cs new file mode 100644 index 000000000000..418d9b2f7782 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/InvokeAgentResponsesApiDispatchPayload.Serialization.cs @@ -0,0 +1,129 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.AI.Projects +{ + /// A manual payload used to test a responses API routine dispatch. + public partial class InvokeAgentResponsesApiDispatchPayload : RoutineDispatchPayload, IJsonModel + { + /// The data to parse. + /// The client options for reading and writing models. + protected override RoutineDispatchPayload PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeInvokeAgentResponsesApiDispatchPayload(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InvokeAgentResponsesApiDispatchPayload)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(InvokeAgentResponsesApiDispatchPayload)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + InvokeAgentResponsesApiDispatchPayload IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InvokeAgentResponsesApiDispatchPayload)PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InvokeAgentResponsesApiDispatchPayload)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Input)) + { + writer.WritePropertyName("input"u8); + writer.WriteStringValue(Input); + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + InvokeAgentResponsesApiDispatchPayload IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InvokeAgentResponsesApiDispatchPayload)JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected override RoutineDispatchPayload JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InvokeAgentResponsesApiDispatchPayload)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInvokeAgentResponsesApiDispatchPayload(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static InvokeAgentResponsesApiDispatchPayload DeserializeInvokeAgentResponsesApiDispatchPayload(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + RoutineDispatchPayloadType @type = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + string input = default; + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("type"u8)) + { + @type = new RoutineDispatchPayloadType(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("input"u8)) + { + input = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new InvokeAgentResponsesApiDispatchPayload(@type, additionalBinaryDataProperties, input); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/InvokeAgentResponsesApiDispatchPayload.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/InvokeAgentResponsesApiDispatchPayload.cs new file mode 100644 index 000000000000..0c862fe4f7d0 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/InvokeAgentResponsesApiDispatchPayload.cs @@ -0,0 +1,30 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + /// A manual payload used to test a responses API routine dispatch. + public partial class InvokeAgentResponsesApiDispatchPayload : RoutineDispatchPayload + { + /// Initializes a new instance of . + public InvokeAgentResponsesApiDispatchPayload() : base(RoutineDispatchPayloadType.InvokeAgentResponsesApi) + { + } + + /// Initializes a new instance of . + /// The manual dispatch payload type. + /// Keeps track of any properties unknown to the library. + /// The user input sent to the downstream responses target. + internal InvokeAgentResponsesApiDispatchPayload(RoutineDispatchPayloadType @type, IDictionary additionalBinaryDataProperties, string input) : base(@type, additionalBinaryDataProperties) + { + Input = input; + } + + /// The user input sent to the downstream responses target. + public string Input { get; set; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/InvokeAgentResponsesApiRoutineAction.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/InvokeAgentResponsesApiRoutineAction.Serialization.cs new file mode 100644 index 000000000000..53a91beb4264 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/InvokeAgentResponsesApiRoutineAction.Serialization.cs @@ -0,0 +1,151 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.AI.Projects +{ + /// Dispatches a routine through the responses API. Exactly one of agent_name or agent_endpoint_id must be provided. + public partial class InvokeAgentResponsesApiRoutineAction : RoutineAction, IJsonModel + { + /// The data to parse. + /// The client options for reading and writing models. + protected override RoutineAction PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeInvokeAgentResponsesApiRoutineAction(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(InvokeAgentResponsesApiRoutineAction)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(InvokeAgentResponsesApiRoutineAction)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + InvokeAgentResponsesApiRoutineAction IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (InvokeAgentResponsesApiRoutineAction)PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InvokeAgentResponsesApiRoutineAction)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(AgentName)) + { + writer.WritePropertyName("agent_name"u8); + writer.WriteStringValue(AgentName); + } + if (Optional.IsDefined(AgentEndpointId)) + { + writer.WritePropertyName("agent_endpoint_id"u8); + writer.WriteStringValue(AgentEndpointId); + } + if (Optional.IsDefined(ConversationId)) + { + writer.WritePropertyName("conversation_id"u8); + writer.WriteStringValue(ConversationId); + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + InvokeAgentResponsesApiRoutineAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (InvokeAgentResponsesApiRoutineAction)JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected override RoutineAction JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(InvokeAgentResponsesApiRoutineAction)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeInvokeAgentResponsesApiRoutineAction(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static InvokeAgentResponsesApiRoutineAction DeserializeInvokeAgentResponsesApiRoutineAction(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + RoutineActionType @type = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + string agentName = default; + string agentEndpointId = default; + string conversationId = default; + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("type"u8)) + { + @type = new RoutineActionType(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("agent_name"u8)) + { + agentName = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("agent_endpoint_id"u8)) + { + agentEndpointId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("conversation_id"u8)) + { + conversationId = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new InvokeAgentResponsesApiRoutineAction(@type, additionalBinaryDataProperties, agentName, agentEndpointId, conversationId); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/InvokeAgentResponsesApiRoutineAction.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/InvokeAgentResponsesApiRoutineAction.cs new file mode 100644 index 000000000000..7e0c5f6caef3 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/InvokeAgentResponsesApiRoutineAction.cs @@ -0,0 +1,40 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + /// Dispatches a routine through the responses API. Exactly one of agent_name or agent_endpoint_id must be provided. + public partial class InvokeAgentResponsesApiRoutineAction : RoutineAction + { + /// Initializes a new instance of . + public InvokeAgentResponsesApiRoutineAction() : base(RoutineActionType.InvokeAgentResponsesApi) + { + } + + /// Initializes a new instance of . + /// The action type. + /// Keeps track of any properties unknown to the library. + /// The project-scoped agent name for responses API dispatch. + /// The endpoint-scoped agent identifier for responses API dispatch. + /// An optional existing conversation identifier to continue during the downstream dispatch. + internal InvokeAgentResponsesApiRoutineAction(RoutineActionType @type, IDictionary additionalBinaryDataProperties, string agentName, string agentEndpointId, string conversationId) : base(@type, additionalBinaryDataProperties) + { + AgentName = agentName; + AgentEndpointId = agentEndpointId; + ConversationId = conversationId; + } + + /// The project-scoped agent name for responses API dispatch. + public string AgentName { get; set; } + + /// The endpoint-scoped agent identifier for responses API dispatch. + public string AgentEndpointId { get; set; } + + /// An optional existing conversation identifier to continue during the downstream dispatch. + public string ConversationId { get; set; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/JobStatus.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/JobStatus.cs new file mode 100644 index 000000000000..784da6f83f14 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/JobStatus.cs @@ -0,0 +1,82 @@ +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.AI.Projects +{ + /// Extensible status values shared by Foundry jobs. + public readonly partial struct JobStatus : IEquatable + { + private readonly string _value; + /// Job is waiting to start. + private const string QueuedValue = "queued"; + /// Job is actively processing. + private const string InProgressValue = "in_progress"; + /// Job completed successfully. + private const string SucceededValue = "succeeded"; + /// Job failed. + private const string FailedValue = "failed"; + /// Job was cancelled by the caller. + private const string CancelledValue = "cancelled"; + + /// Initializes a new instance of . + /// The value. + /// is null. + public JobStatus(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + + /// Job is waiting to start. + public static JobStatus Queued { get; } = new JobStatus(QueuedValue); + + /// Job is actively processing. + public static JobStatus InProgress { get; } = new JobStatus(InProgressValue); + + /// Job completed successfully. + public static JobStatus Succeeded { get; } = new JobStatus(SucceededValue); + + /// Job failed. + public static JobStatus Failed { get; } = new JobStatus(FailedValue); + + /// Job was cancelled by the caller. + public static JobStatus Cancelled { get; } = new JobStatus(CancelledValue); + + /// Determines if two values are the same. + /// The left value to compare. + /// The right value to compare. + public static bool operator ==(JobStatus left, JobStatus right) => left.Equals(right); + + /// Determines if two values are not the same. + /// The left value to compare. + /// The right value to compare. + public static bool operator !=(JobStatus left, JobStatus right) => !left.Equals(right); + + /// Converts a string to a . + /// The value. + public static implicit operator JobStatus(string value) => new JobStatus(value); + + /// Converts a string to a . + /// The value. + public static implicit operator JobStatus?(string value) => value == null ? null : new JobStatus(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is JobStatus other && Equals(other); + + /// + public bool Equals(JobStatus 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/Models/ListMemoriesRequest.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/ListMemoriesRequest.Serialization.cs new file mode 100644 index 000000000000..edc95e63313d --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/ListMemoriesRequest.Serialization.cs @@ -0,0 +1,150 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.AI.Projects +{ + /// The ListMemoriesRequest. + internal partial class ListMemoriesRequest : IJsonModel + { + /// Initializes a new instance of for deserialization. + internal ListMemoriesRequest() + { + } + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual ListMemoriesRequest PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeListMemoriesRequest(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ListMemoriesRequest)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(ListMemoriesRequest)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + ListMemoriesRequest IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The to serialize into . + public static implicit operator BinaryContent(ListMemoriesRequest listMemoriesRequest) + { + if (listMemoriesRequest == null) + { + return null; + } + return BinaryContent.Create(listMemoriesRequest, ModelSerializationExtensions.WireOptions); + } + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ListMemoriesRequest)} does not support writing '{format}' format."); + } + writer.WritePropertyName("scope"u8); + writer.WriteStringValue(Scope); + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + ListMemoriesRequest IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual ListMemoriesRequest JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ListMemoriesRequest)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeListMemoriesRequest(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static ListMemoriesRequest DeserializeListMemoriesRequest(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string scope = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("scope"u8)) + { + scope = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new ListMemoriesRequest(scope, additionalBinaryDataProperties); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/ListMemoriesRequest.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/ListMemoriesRequest.cs new file mode 100644 index 000000000000..1b5f0ab3a988 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/ListMemoriesRequest.cs @@ -0,0 +1,35 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + /// The ListMemoriesRequest. + internal partial class ListMemoriesRequest + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + /// The namespace that logically groups and isolates memories, such as a user ID. + internal ListMemoriesRequest(string scope) + { + Scope = scope; + } + + /// Initializes a new instance of . + /// The namespace that logically groups and isolates memories, such as a user ID. + /// Keeps track of any properties unknown to the library. + internal ListMemoriesRequest(string scope, IDictionary additionalBinaryDataProperties) + { + Scope = scope; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// The namespace that logically groups and isolates memories, such as a user ID. + public string Scope { get; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/LocalShellToolParam.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/LocalShellToolParam.Serialization.cs index 5e8572ae8385..22c4f5517cc2 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/LocalShellToolParam.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/LocalShellToolParam.Serialization.cs @@ -81,6 +81,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsCollectionDefined(ToolConfigs)) + { + writer.WritePropertyName("tool_configs"u8); + writer.WriteStartObject(); + foreach (var item in ToolConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } } /// The JSON reader. @@ -112,6 +123,7 @@ internal static LocalShellToolParam DeserializeLocalShellToolParam(JsonElement e IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); string name = default; string description = default; + IDictionary toolConfigs = default; foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("type"u8)) @@ -129,12 +141,26 @@ internal static LocalShellToolParam DeserializeLocalShellToolParam(JsonElement e description = prop.Value.GetString(); continue; } + if (prop.NameEquals("tool_configs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, ToolConfig.DeserializeToolConfig(prop0.Value, options)); + } + toolConfigs = dictionary; + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new LocalShellToolParam(@type, additionalBinaryDataProperties, name, description); + return new LocalShellToolParam(@type, additionalBinaryDataProperties, name, description, toolConfigs ?? new ChangeTrackingDictionary()); } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/LocalShellToolParam.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/LocalShellToolParam.cs index 604ea8a115d4..b0600caabb49 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/LocalShellToolParam.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/LocalShellToolParam.cs @@ -13,6 +13,7 @@ internal partial class LocalShellToolParam : InternalTool /// Initializes a new instance of . public LocalShellToolParam() : base(ToolType.LocalShell) { + ToolConfigs = new ChangeTrackingDictionary(); } /// Initializes a new instance of . @@ -20,10 +21,16 @@ public LocalShellToolParam() : base(ToolType.LocalShell) /// Keeps track of any properties unknown to the library. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. - internal LocalShellToolParam(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description) : base(@type, additionalBinaryDataProperties) + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + internal LocalShellToolParam(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, IDictionary toolConfigs) : base(@type, additionalBinaryDataProperties) { Name = name; Description = description; + ToolConfigs = toolConfigs; } /// Optional user-defined name for this tool or configuration. @@ -31,5 +38,12 @@ internal LocalShellToolParam(ToolType @type, IDictionary add /// Optional user-defined description for this tool or configuration. public string Description { get; set; } + + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + public IDictionary ToolConfigs { get; } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/LocalSkillParam.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/LocalSkillParam.cs index f7de4f0697ba..6078f555bb3f 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/LocalSkillParam.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/LocalSkillParam.cs @@ -43,12 +43,12 @@ internal LocalSkillParam(string name, string description, string path, IDictiona } /// The name of the skill. - public string Name { get; } + public string Name { get; set; } /// The description of the skill. - public string Description { get; } + public string Description { get; set; } /// The path to the directory containing the skill. - public string Path { get; } + public string Path { get; set; } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/MemoryItem.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/MemoryItem.Serialization.cs index 57109020ac6a..c207bb62c96e 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/MemoryItem.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/MemoryItem.Serialization.cs @@ -12,7 +12,7 @@ namespace Azure.AI.Projects.Memory { /// /// A single memory item stored in the memory store, containing content and metadata. - /// Please note this is the abstract base class. The derived classes available for instantiation are: and . + /// Please note this is the abstract base class. The derived classes available for instantiation are: , , and . /// [PersistableModelProxy(typeof(UnknownMemoryItem))] public abstract partial class MemoryItem : IJsonModel @@ -148,6 +148,8 @@ internal static MemoryItem DeserializeMemoryItem(JsonElement element, ModelReade return UserProfileMemoryItem.DeserializeUserProfileMemoryItem(element, options); case "chat_summary": return ChatSummaryMemoryItem.DeserializeChatSummaryMemoryItem(element, options); + case "procedural": + return ProceduralMemoryItem.DeserializeProceduralMemoryItem(element, options); } } return UnknownMemoryItem.DeserializeUnknownMemoryItem(element, options); diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/MemoryItem.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/MemoryItem.cs index 5fc0062d0fac..a62910d7fc49 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/MemoryItem.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/MemoryItem.cs @@ -9,7 +9,7 @@ namespace Azure.AI.Projects.Memory { /// /// A single memory item stored in the memory store, containing content and metadata. - /// Please note this is the abstract base class. The derived classes available for instantiation are: and . + /// Please note this is the abstract base class. The derived classes available for instantiation are: , , and . /// public abstract partial class MemoryItem { diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/MemoryItemKind.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/MemoryItemKind.cs index 37df85a5c926..5ee33c18c340 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/MemoryItemKind.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/MemoryItemKind.cs @@ -16,6 +16,8 @@ namespace Azure.AI.Projects.Memory private const string UserProfileValue = "user_profile"; /// Summary of chat conversations. private const string ChatSummaryValue = "chat_summary"; + /// Routine procedures extracted from conversations. + private const string ProceduralValue = "procedural"; /// Initializes a new instance of . /// The value. @@ -33,6 +35,9 @@ public MemoryItemKind(string value) /// Summary of chat conversations. public static MemoryItemKind ChatSummary { get; } = new MemoryItemKind(ChatSummaryValue); + /// Routine procedures extracted from conversations. + public static MemoryItemKind Procedural { get; } = new MemoryItemKind(ProceduralValue); + /// Determines if two values are the same. /// The left value to compare. /// The right value to compare. diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/MemorySearchPreviewTool.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/MemorySearchPreviewTool.Serialization.cs index 42283cb38012..3e4dbc5fba49 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/MemorySearchPreviewTool.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/MemorySearchPreviewTool.Serialization.cs @@ -87,6 +87,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsCollectionDefined(ToolConfigs)) + { + writer.WritePropertyName("tool_configs"u8); + writer.WriteStartObject(); + foreach (var item in ToolConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } writer.WritePropertyName("memory_store_name"u8); writer.WriteStringValue(MemoryStoreName); writer.WritePropertyName("scope"u8); @@ -132,6 +143,7 @@ internal static MemorySearchPreviewTool DeserializeMemorySearchPreviewTool(JsonE IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); string name = default; string description = default; + IDictionary toolConfigs = default; string memoryStoreName = default; string scope = default; MemorySearchResultOptions searchOptions = default; @@ -153,6 +165,20 @@ internal static MemorySearchPreviewTool DeserializeMemorySearchPreviewTool(JsonE description = prop.Value.GetString(); continue; } + if (prop.NameEquals("tool_configs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, ToolConfig.DeserializeToolConfig(prop0.Value, options)); + } + toolConfigs = dictionary; + continue; + } if (prop.NameEquals("memory_store_name"u8)) { memoryStoreName = prop.Value.GetString(); @@ -191,6 +217,7 @@ internal static MemorySearchPreviewTool DeserializeMemorySearchPreviewTool(JsonE additionalBinaryDataProperties, name, description, + toolConfigs ?? new ChangeTrackingDictionary(), memoryStoreName, scope, searchOptions, diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/MemorySearchPreviewTool.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/MemorySearchPreviewTool.cs index fcc6ecae3e7e..9c5357ff64ab 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/MemorySearchPreviewTool.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/MemorySearchPreviewTool.cs @@ -24,6 +24,7 @@ public MemorySearchPreviewTool(string memoryStoreName, string scope) : base(Tool Argument.AssertNotNull(memoryStoreName, nameof(memoryStoreName)); Argument.AssertNotNull(scope, nameof(scope)); + ToolConfigs = new ChangeTrackingDictionary(); MemoryStoreName = memoryStoreName; Scope = scope; } @@ -33,6 +34,11 @@ public MemorySearchPreviewTool(string memoryStoreName, string scope) : base(Tool /// Keeps track of any properties unknown to the library. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// /// The name of the memory store to use. /// /// The namespace used to group and isolate memories, such as a user ID. @@ -41,10 +47,11 @@ public MemorySearchPreviewTool(string memoryStoreName, string scope) : base(Tool /// /// Options for searching the memory store. /// Time to wait before updating memories after inactivity (seconds). Default 300. - internal MemorySearchPreviewTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, string memoryStoreName, string scope, MemorySearchResultOptions searchOptions, int? updateDelay) : base(@type, additionalBinaryDataProperties) + internal MemorySearchPreviewTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, IDictionary toolConfigs, string memoryStoreName, string scope, MemorySearchResultOptions searchOptions, int? updateDelay) : base(@type, additionalBinaryDataProperties) { Name = name; Description = description; + ToolConfigs = toolConfigs; MemoryStoreName = memoryStoreName; Scope = scope; SearchOptions = searchOptions; @@ -57,15 +64,22 @@ internal MemorySearchPreviewTool(ToolType @type, IDictionary /// Optional user-defined description for this tool or configuration. public string Description { get; set; } + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + public IDictionary ToolConfigs { get; } + /// The name of the memory store to use. - public string MemoryStoreName { get; } + public string MemoryStoreName { get; set; } /// /// The namespace used to group and isolate memories, such as a user ID. /// Limits which memories can be retrieved or updated. /// Use special variable `{{$userId}}` to scope memories to the current signed-in user. /// - public string Scope { get; } + public string Scope { get; set; } /// Options for searching the memory store. public MemorySearchResultOptions SearchOptions { get; set; } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/MemoryStoreDefaultOptions.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/MemoryStoreDefaultOptions.Serialization.cs index 4c2ce264de18..9b44b819bef7 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/MemoryStoreDefaultOptions.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/MemoryStoreDefaultOptions.Serialization.cs @@ -85,6 +85,16 @@ protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWrit } writer.WritePropertyName("chat_summary_enabled"u8); writer.WriteBooleanValue(IsChatSummaryEnabled); + if (Optional.IsDefined(ProceduralMemoryEnabled)) + { + writer.WritePropertyName("procedural_memory_enabled"u8); + writer.WriteBooleanValue(ProceduralMemoryEnabled.Value); + } + if (Optional.IsDefined(DefaultTtlSeconds)) + { + writer.WritePropertyName("default_ttl_seconds"u8); + writer.WriteNumberValue(Convert.ToInt32(DefaultTtlSeconds.Value.TotalSeconds)); + } if (options.Format != "W" && _additionalBinaryDataProperties != null) { foreach (var item in _additionalBinaryDataProperties) @@ -130,6 +140,8 @@ internal static MemoryStoreDefaultOptions DeserializeMemoryStoreDefaultOptions(J bool isUserProfileEnabled = default; string userProfileDetails = default; bool isChatSummaryEnabled = default; + bool? proceduralMemoryEnabled = default; + TimeSpan? defaultTtlSeconds = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); foreach (var prop in element.EnumerateObject()) { @@ -148,12 +160,36 @@ internal static MemoryStoreDefaultOptions DeserializeMemoryStoreDefaultOptions(J isChatSummaryEnabled = prop.Value.GetBoolean(); continue; } + if (prop.NameEquals("procedural_memory_enabled"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + proceduralMemoryEnabled = prop.Value.GetBoolean(); + continue; + } + if (prop.NameEquals("default_ttl_seconds"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + defaultTtlSeconds = TimeSpan.FromSeconds(prop.Value.GetInt32()); + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new MemoryStoreDefaultOptions(isUserProfileEnabled, userProfileDetails, isChatSummaryEnabled, additionalBinaryDataProperties); + return new MemoryStoreDefaultOptions( + isUserProfileEnabled, + userProfileDetails, + isChatSummaryEnabled, + proceduralMemoryEnabled, + defaultTtlSeconds, + additionalBinaryDataProperties); } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/MemoryStoreDefaultOptions.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/MemoryStoreDefaultOptions.cs index 2b03d9d5177b..e4f4c6bb0c50 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/MemoryStoreDefaultOptions.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/MemoryStoreDefaultOptions.cs @@ -26,12 +26,16 @@ public MemoryStoreDefaultOptions(bool isUserProfileEnabled, bool isChatSummaryEn /// Whether to enable user profile extraction and storage. Default is true. /// Specific categories or types of user profile information to extract and store. /// Whether to enable chat summary extraction and storage. Default is true. + /// Whether to enable procedural memory extraction and storage. Default is true. + /// The default time-to-live for memories in seconds. A value of 0 indicates that memories do not expire. /// Keeps track of any properties unknown to the library. - internal MemoryStoreDefaultOptions(bool isUserProfileEnabled, string userProfileDetails, bool isChatSummaryEnabled, IDictionary additionalBinaryDataProperties) + internal MemoryStoreDefaultOptions(bool isUserProfileEnabled, string userProfileDetails, bool isChatSummaryEnabled, bool? proceduralMemoryEnabled, TimeSpan? defaultTtlSeconds, IDictionary additionalBinaryDataProperties) { IsUserProfileEnabled = isUserProfileEnabled; UserProfileDetails = userProfileDetails; IsChatSummaryEnabled = isChatSummaryEnabled; + ProceduralMemoryEnabled = proceduralMemoryEnabled; + DefaultTtlSeconds = defaultTtlSeconds; _additionalBinaryDataProperties = additionalBinaryDataProperties; } @@ -43,5 +47,11 @@ internal MemoryStoreDefaultOptions(bool isUserProfileEnabled, string userProfile /// Whether to enable chat summary extraction and storage. Default is true. public bool IsChatSummaryEnabled { get; set; } + + /// Whether to enable procedural memory extraction and storage. Default is true. + public bool? ProceduralMemoryEnabled { get; set; } + + /// The default time-to-live for memories in seconds. A value of 0 indicates that memories do not expire. + public TimeSpan? DefaultTtlSeconds { get; set; } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/MemoryStoreObjectType.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/MemoryStoreObjectType.cs index 37d79d1ec9cd..3056549ad75b 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/MemoryStoreObjectType.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/MemoryStoreObjectType.cs @@ -15,7 +15,7 @@ namespace Azure.AI.Projects.Memory private const string MemoryStoreValue = "memory_store"; private const string MemoryStoreDeletedValue = "memory_store.deleted"; private const string MemoryStoreScopeDeletedValue = "memory_store.scope.deleted"; - private const string MemoryDeletedValue = "memory.deleted"; + private const string MemoryDeletedValue = "memory_store.item.deleted"; /// Initializes a new instance of . /// The value. diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/MicrosoftFabricPreviewTool.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/MicrosoftFabricPreviewTool.Serialization.cs index b783d86060b4..2ea2745bf0d8 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/MicrosoftFabricPreviewTool.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/MicrosoftFabricPreviewTool.Serialization.cs @@ -86,6 +86,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsCollectionDefined(ToolConfigs)) + { + writer.WritePropertyName("tool_configs"u8); + writer.WriteStartObject(); + foreach (var item in ToolConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } writer.WritePropertyName("fabric_dataagent_preview"u8); writer.WriteObjectValue(FabricDataagentPreview, options); } @@ -119,6 +130,7 @@ internal static MicrosoftFabricPreviewTool DeserializeMicrosoftFabricPreviewTool IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); string name = default; string description = default; + IDictionary toolConfigs = default; FabricDataAgentToolParameters fabricDataagentPreview = default; foreach (var prop in element.EnumerateObject()) { @@ -137,6 +149,20 @@ internal static MicrosoftFabricPreviewTool DeserializeMicrosoftFabricPreviewTool description = prop.Value.GetString(); continue; } + if (prop.NameEquals("tool_configs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, ToolConfig.DeserializeToolConfig(prop0.Value, options)); + } + toolConfigs = dictionary; + continue; + } if (prop.NameEquals("fabric_dataagent_preview"u8)) { fabricDataagentPreview = FabricDataAgentToolParameters.DeserializeFabricDataAgentToolParameters(prop.Value, options); @@ -147,7 +173,13 @@ internal static MicrosoftFabricPreviewTool DeserializeMicrosoftFabricPreviewTool additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new MicrosoftFabricPreviewTool(@type, additionalBinaryDataProperties, name, description, fabricDataagentPreview); + return new MicrosoftFabricPreviewTool( + @type, + additionalBinaryDataProperties, + name, + description, + toolConfigs ?? new ChangeTrackingDictionary(), + fabricDataagentPreview); } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/MicrosoftFabricPreviewTool.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/MicrosoftFabricPreviewTool.cs index 57c45e74a28e..3117c9f7ef94 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/MicrosoftFabricPreviewTool.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/MicrosoftFabricPreviewTool.cs @@ -17,6 +17,7 @@ public MicrosoftFabricPreviewTool(FabricDataAgentToolParameters fabricDataagentP { Argument.AssertNotNull(fabricDataagentPreview, nameof(fabricDataagentPreview)); + ToolConfigs = new ChangeTrackingDictionary(); FabricDataagentPreview = fabricDataagentPreview; } @@ -25,11 +26,17 @@ public MicrosoftFabricPreviewTool(FabricDataAgentToolParameters fabricDataagentP /// Keeps track of any properties unknown to the library. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// /// The fabric data agent tool parameters. - internal MicrosoftFabricPreviewTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, FabricDataAgentToolParameters fabricDataagentPreview) : base(@type, additionalBinaryDataProperties) + internal MicrosoftFabricPreviewTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, IDictionary toolConfigs, FabricDataAgentToolParameters fabricDataagentPreview) : base(@type, additionalBinaryDataProperties) { Name = name; Description = description; + ToolConfigs = toolConfigs; FabricDataagentPreview = fabricDataagentPreview; } @@ -39,7 +46,14 @@ internal MicrosoftFabricPreviewTool(ToolType @type, IDictionary Optional user-defined description for this tool or configuration. public string Description { get; set; } + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + public IDictionary ToolConfigs { get; } + /// The fabric data agent tool parameters. - public FabricDataAgentToolParameters FabricDataagentPreview { get; } + public FabricDataAgentToolParameters FabricDataagentPreview { get; set; } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/NamespaceToolParam.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/NamespaceToolParam.cs index cbc8b8e995d5..2c1012094a1c 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/NamespaceToolParam.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/NamespaceToolParam.cs @@ -42,10 +42,10 @@ internal NamespaceToolParam(ToolType @type, IDictionary addi } /// The namespace name used in tool calls (for example, `crm`). - public string Name { get; } + public string Name { get; set; } /// A description of the namespace shown to the model. - public string Description { get; } + public string Description { get; set; } /// /// The function/custom tools available inside this namespace. diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/OpenApiFunctionDefinition.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/OpenApiFunctionDefinition.cs index 906eba5d4635..d62648c0007c 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/OpenApiFunctionDefinition.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/OpenApiFunctionDefinition.cs @@ -52,7 +52,7 @@ internal OpenApiFunctionDefinition(string name, string description, IDictionary< } /// The name of the function to be called. - public string Name { get; } + public string Name { get; set; } /// A description of what the function does, used by the model to choose when and how to call the function. public string Description { get; set; } @@ -86,7 +86,7 @@ internal OpenApiFunctionDefinition(string name, string description, IDictionary< public IDictionary Spec { get; } /// Open API authentication details. - public OpenApiAuthDetails Auth { get; } + public OpenApiAuthDetails Auth { get; set; } /// List of OpenAPI spec parameters that will use user-provided defaults. public IList DefaultParams { get; } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/OpenApiManagedAuthDetails.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/OpenApiManagedAuthDetails.cs index 9fbe4b6aebec..bf20fbc1774d 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/OpenApiManagedAuthDetails.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/OpenApiManagedAuthDetails.cs @@ -30,6 +30,6 @@ internal OpenApiManagedAuthDetails(OpenApiAuthType @type, IDictionary Connection auth security details. - public OpenApiManagedSecurityScheme SecurityScheme { get; } + public OpenApiManagedSecurityScheme SecurityScheme { get; set; } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/OpenApiManagedSecurityScheme.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/OpenApiManagedSecurityScheme.cs index 9b3a2f659dc3..7a2316217d44 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/OpenApiManagedSecurityScheme.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/OpenApiManagedSecurityScheme.cs @@ -33,6 +33,6 @@ internal OpenApiManagedSecurityScheme(string audience, IDictionary Authentication scope for managed_identity auth type. - public string Audience { get; } + public string Audience { get; set; } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/OpenApiProjectConnectionAuthDetails.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/OpenApiProjectConnectionAuthDetails.cs index 412af2627afc..c36cea6d4eb0 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/OpenApiProjectConnectionAuthDetails.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/OpenApiProjectConnectionAuthDetails.cs @@ -30,6 +30,6 @@ internal OpenApiProjectConnectionAuthDetails(OpenApiAuthType @type, IDictionary< } /// Project connection auth security details. - public OpenApiProjectConnectionSecurityScheme SecurityScheme { get; } + public OpenApiProjectConnectionSecurityScheme SecurityScheme { get; set; } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/OpenApiProjectConnectionSecurityScheme.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/OpenApiProjectConnectionSecurityScheme.cs index d6856cd7e03f..d0b549b4029b 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/OpenApiProjectConnectionSecurityScheme.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/OpenApiProjectConnectionSecurityScheme.cs @@ -33,6 +33,6 @@ internal OpenApiProjectConnectionSecurityScheme(string projectConnectionId, IDic } /// Project connection id for Project Connection auth type. - public string ProjectConnectionId { get; } + public string ProjectConnectionId { get; set; } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/OpenApiTool.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/OpenApiTool.Serialization.cs index 1643398cd744..02621663910b 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/OpenApiTool.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/OpenApiTool.Serialization.cs @@ -78,6 +78,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri base.JsonModelWriteCore(writer, options); writer.WritePropertyName("openapi"u8); writer.WriteObjectValue(Openapi, options); + if (Optional.IsCollectionDefined(ToolConfigs)) + { + writer.WritePropertyName("tool_configs"u8); + writer.WriteStartObject(); + foreach (var item in ToolConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } } /// The JSON reader. @@ -108,6 +119,7 @@ internal static OpenApiTool DeserializeOpenApiTool(JsonElement element, ModelRea ToolType @type = default; IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); OpenApiFunctionDefinition openapi = default; + IDictionary toolConfigs = default; foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("type"u8)) @@ -120,12 +132,26 @@ internal static OpenApiTool DeserializeOpenApiTool(JsonElement element, ModelRea openapi = OpenApiFunctionDefinition.DeserializeOpenApiFunctionDefinition(prop.Value, options); continue; } + if (prop.NameEquals("tool_configs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, ToolConfig.DeserializeToolConfig(prop0.Value, options)); + } + toolConfigs = dictionary; + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new OpenApiTool(@type, additionalBinaryDataProperties, openapi); + return new OpenApiTool(@type, additionalBinaryDataProperties, openapi, toolConfigs ?? new ChangeTrackingDictionary()); } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/OpenApiTool.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/OpenApiTool.cs index 22c07300cfc2..29ee3ae3a4b6 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/OpenApiTool.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/OpenApiTool.cs @@ -18,18 +18,32 @@ public OpenApiTool(OpenApiFunctionDefinition openapi) : base(ToolType.Openapi) Argument.AssertNotNull(openapi, nameof(openapi)); Openapi = openapi; + ToolConfigs = new ChangeTrackingDictionary(); } /// Initializes a new instance of . /// /// Keeps track of any properties unknown to the library. /// The openapi function definition. - internal OpenApiTool(ToolType @type, IDictionary additionalBinaryDataProperties, OpenApiFunctionDefinition openapi) : base(@type, additionalBinaryDataProperties) + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + internal OpenApiTool(ToolType @type, IDictionary additionalBinaryDataProperties, OpenApiFunctionDefinition openapi, IDictionary toolConfigs) : base(@type, additionalBinaryDataProperties) { Openapi = openapi; + ToolConfigs = toolConfigs; } /// The openapi function definition. - public OpenApiFunctionDefinition Openapi { get; } + public OpenApiFunctionDefinition Openapi { get; set; } + + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + public IDictionary ToolConfigs { get; } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/ProceduralMemoryItem.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/ProceduralMemoryItem.Serialization.cs new file mode 100644 index 000000000000..ea5c1d037113 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/ProceduralMemoryItem.Serialization.cs @@ -0,0 +1,154 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.AI.Projects.Memory; + +namespace Azure.AI.Projects +{ + /// A memory item containing a procedure extracted from conversations. + public partial class ProceduralMemoryItem : MemoryItem, IJsonModel + { + /// Initializes a new instance of for deserialization. + internal ProceduralMemoryItem() + { + } + + /// The data to parse. + /// The client options for reading and writing models. + protected override MemoryItem PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeProceduralMemoryItem(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProceduralMemoryItem)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(ProceduralMemoryItem)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + ProceduralMemoryItem IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (ProceduralMemoryItem)PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProceduralMemoryItem)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + } + + /// The JSON reader. + /// The client options for reading and writing models. + ProceduralMemoryItem IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ProceduralMemoryItem)JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected override MemoryItem JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProceduralMemoryItem)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProceduralMemoryItem(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static ProceduralMemoryItem DeserializeProceduralMemoryItem(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string memoryId = default; + DateTimeOffset updatedAt = default; + string scope = default; + string content = default; + MemoryItemKind kind = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("memory_id"u8)) + { + memoryId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("updated_at"u8)) + { + updatedAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); + continue; + } + if (prop.NameEquals("scope"u8)) + { + scope = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("content"u8)) + { + content = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("kind"u8)) + { + kind = new MemoryItemKind(prop.Value.GetString()); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new ProceduralMemoryItem( + memoryId, + updatedAt, + scope, + content, + kind, + additionalBinaryDataProperties); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/ProceduralMemoryItem.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/ProceduralMemoryItem.cs new file mode 100644 index 000000000000..7d06f8d5c16a --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/ProceduralMemoryItem.cs @@ -0,0 +1,34 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; +using Azure.AI.Projects.Memory; + +namespace Azure.AI.Projects +{ + /// A memory item containing a procedure extracted from conversations. + public partial class ProceduralMemoryItem : MemoryItem + { + /// Initializes a new instance of . + /// The unique ID of the memory item. + /// The last update time of the memory item. + /// The namespace that logically groups and isolates memories, such as a user ID. + /// The content of the memory. + internal ProceduralMemoryItem(string memoryId, DateTimeOffset updatedAt, string scope, string content) : base(memoryId, updatedAt, scope, content, MemoryItemKind.Procedural) + { + } + + /// Initializes a new instance of . + /// The unique ID of the memory item. + /// The last update time of the memory item. + /// The namespace that logically groups and isolates memories, such as a user ID. + /// The content of the memory. + /// The kind of the memory item. + /// Keeps track of any properties unknown to the library. + internal ProceduralMemoryItem(string memoryId, DateTimeOffset updatedAt, string scope, string content, MemoryItemKind kind, IDictionary additionalBinaryDataProperties) : base(memoryId, updatedAt, scope, content, kind, additionalBinaryDataProperties) + { + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/ProjectsRoutine.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/ProjectsRoutine.Serialization.cs new file mode 100644 index 000000000000..3fd3a706031c --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/ProjectsRoutine.Serialization.cs @@ -0,0 +1,232 @@ +// + +#nullable disable + +using System; +using System.ClientModel; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.AI.Projects +{ + /// A routine definition returned by the service. + public partial class ProjectsRoutine : IJsonModel + { + /// Initializes a new instance of for deserialization. + internal ProjectsRoutine() + { + } + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual ProjectsRoutine PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeProjectsRoutine(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ProjectsRoutine)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(ProjectsRoutine)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + ProjectsRoutine IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The to deserialize the from. + public static explicit operator ProjectsRoutine(ClientResult result) + { + PipelineResponse response = result.GetRawResponse(); + using JsonDocument document = JsonDocument.Parse(response.Content, ModelSerializationExtensions.JsonDocumentOptions); + return DeserializeProjectsRoutine(document.RootElement, ModelSerializationExtensions.WireOptions); + } + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectsRoutine)} does not support writing '{format}' format."); + } + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + writer.WritePropertyName("enabled"u8); + writer.WriteBooleanValue(Enabled); + writer.WritePropertyName("triggers"u8); + writer.WriteStartObject(); + foreach (var item in Triggers) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + writer.WritePropertyName("action"u8); + writer.WriteObjectValue(Action, options); + if (Optional.IsDefined(CreatedAt)) + { + writer.WritePropertyName("created_at"u8); + writer.WriteNumberValue(CreatedAt.Value, "U"); + } + if (Optional.IsDefined(UpdatedAt)) + { + writer.WritePropertyName("updated_at"u8); + writer.WriteNumberValue(UpdatedAt.Value, "U"); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + ProjectsRoutine IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual ProjectsRoutine JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ProjectsRoutine)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeProjectsRoutine(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static ProjectsRoutine DeserializeProjectsRoutine(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string name = default; + string description = default; + bool enabled = default; + IDictionary triggers = default; + RoutineAction action = default; + DateTimeOffset? createdAt = default; + DateTimeOffset? updatedAt = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("name"u8)) + { + name = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("description"u8)) + { + description = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("enabled"u8)) + { + enabled = prop.Value.GetBoolean(); + continue; + } + if (prop.NameEquals("triggers"u8)) + { + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, RoutineTrigger.DeserializeRoutineTrigger(prop0.Value, options)); + } + triggers = dictionary; + continue; + } + if (prop.NameEquals("action"u8)) + { + action = RoutineAction.DeserializeRoutineAction(prop.Value, options); + continue; + } + if (prop.NameEquals("created_at"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + createdAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); + continue; + } + if (prop.NameEquals("updated_at"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + updatedAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new ProjectsRoutine( + name, + description, + enabled, + triggers, + action, + createdAt, + updatedAt, + additionalBinaryDataProperties); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/ProjectsRoutine.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/ProjectsRoutine.cs new file mode 100644 index 000000000000..ee6c388b3138 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/ProjectsRoutine.cs @@ -0,0 +1,71 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + /// A routine definition returned by the service. + public partial class ProjectsRoutine + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + /// The routine name. + /// Whether the routine is enabled. + /// The triggers configured for the routine. + /// The action executed when the routine fires. + internal ProjectsRoutine(string name, bool enabled, IDictionary triggers, RoutineAction action) + { + Name = name; + Enabled = enabled; + Triggers = triggers; + Action = action; + } + + /// Initializes a new instance of . + /// The routine name. + /// A human-readable description of the routine. + /// Whether the routine is enabled. + /// The triggers configured for the routine. + /// The action executed when the routine fires. + /// The time when the routine was created. + /// The time when the routine was last updated. + /// Keeps track of any properties unknown to the library. + internal ProjectsRoutine(string name, string description, bool enabled, IDictionary triggers, RoutineAction action, DateTimeOffset? createdAt, DateTimeOffset? updatedAt, IDictionary additionalBinaryDataProperties) + { + Name = name; + Description = description; + Enabled = enabled; + Triggers = triggers; + Action = action; + CreatedAt = createdAt; + UpdatedAt = updatedAt; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// The routine name. + public string Name { get; } + + /// A human-readable description of the routine. + public string Description { get; } + + /// Whether the routine is enabled. + public bool Enabled { get; } + + /// The triggers configured for the routine. + public IDictionary Triggers { get; } + + /// The action executed when the routine fires. + public RoutineAction Action { get; } + + /// The time when the routine was created. + public DateTimeOffset? CreatedAt { get; } + + /// The time when the routine was last updated. + public DateTimeOffset? UpdatedAt { get; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/PromptDataGenerationJobSource.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/PromptDataGenerationJobSource.Serialization.cs new file mode 100644 index 000000000000..97e7e03e78ed --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/PromptDataGenerationJobSource.Serialization.cs @@ -0,0 +1,142 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.AI.Projects +{ + /// Prompt source for data generation jobs — inline text provided by the user. + public partial class PromptDataGenerationJobSource : DataGenerationJobSource, IJsonModel + { + /// Initializes a new instance of for deserialization. + internal PromptDataGenerationJobSource() + { + } + + /// The data to parse. + /// The client options for reading and writing models. + protected override DataGenerationJobSource PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializePromptDataGenerationJobSource(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PromptDataGenerationJobSource)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(PromptDataGenerationJobSource)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + PromptDataGenerationJobSource IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (PromptDataGenerationJobSource)PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PromptDataGenerationJobSource)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + writer.WritePropertyName("prompt"u8); + writer.WriteStringValue(Prompt); + } + + /// The JSON reader. + /// The client options for reading and writing models. + PromptDataGenerationJobSource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (PromptDataGenerationJobSource)JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected override DataGenerationJobSource JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PromptDataGenerationJobSource)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePromptDataGenerationJobSource(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static PromptDataGenerationJobSource DeserializePromptDataGenerationJobSource(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DataGenerationJobSourceType @type = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + string description = default; + string prompt = default; + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("type"u8)) + { + @type = new DataGenerationJobSourceType(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("description"u8)) + { + description = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("prompt"u8)) + { + prompt = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new PromptDataGenerationJobSource(@type, additionalBinaryDataProperties, description, prompt); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/PromptDataGenerationJobSource.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/PromptDataGenerationJobSource.cs new file mode 100644 index 000000000000..f481e1fd404b --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/PromptDataGenerationJobSource.cs @@ -0,0 +1,39 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + /// Prompt source for data generation jobs — inline text provided by the user. + public partial class PromptDataGenerationJobSource : DataGenerationJobSource + { + /// Initializes a new instance of . + /// Inline prompt text (e.g., agent description, policy text, supplementary context). + /// is null. + public PromptDataGenerationJobSource(string prompt) : base(DataGenerationJobSourceType.Prompt) + { + Argument.AssertNotNull(prompt, nameof(prompt)); + + Prompt = prompt; + } + + /// Initializes a new instance of . + /// The type of source. + /// Keeps track of any properties unknown to the library. + /// Optional description of what this source represents — helps the pipeline interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities'). + /// Inline prompt text (e.g., agent description, policy text, supplementary context). + internal PromptDataGenerationJobSource(DataGenerationJobSourceType @type, IDictionary additionalBinaryDataProperties, string description, string prompt) : base(@type, description, additionalBinaryDataProperties) + { + Prompt = prompt; + } + + /// Optional description of what this source represents — helps the pipeline interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities'). + public override string Description { get; set; } + + /// Inline prompt text (e.g., agent description, policy text, supplementary context). + public string Prompt { get; set; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/PromptEvaluatorGenerationJobSource.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/PromptEvaluatorGenerationJobSource.Serialization.cs new file mode 100644 index 000000000000..9b11cf6ff187 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/PromptEvaluatorGenerationJobSource.Serialization.cs @@ -0,0 +1,142 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.AI.Projects +{ + /// Prompt source for evaluator generation jobs — inline text provided by the user. + public partial class PromptEvaluatorGenerationJobSource : EvaluatorGenerationJobSource, IJsonModel + { + /// Initializes a new instance of for deserialization. + internal PromptEvaluatorGenerationJobSource() + { + } + + /// The data to parse. + /// The client options for reading and writing models. + protected override EvaluatorGenerationJobSource PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializePromptEvaluatorGenerationJobSource(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(PromptEvaluatorGenerationJobSource)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(PromptEvaluatorGenerationJobSource)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + PromptEvaluatorGenerationJobSource IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (PromptEvaluatorGenerationJobSource)PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PromptEvaluatorGenerationJobSource)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + writer.WritePropertyName("prompt"u8); + writer.WriteStringValue(Prompt); + } + + /// The JSON reader. + /// The client options for reading and writing models. + PromptEvaluatorGenerationJobSource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (PromptEvaluatorGenerationJobSource)JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected override EvaluatorGenerationJobSource JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(PromptEvaluatorGenerationJobSource)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializePromptEvaluatorGenerationJobSource(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static PromptEvaluatorGenerationJobSource DeserializePromptEvaluatorGenerationJobSource(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EvaluatorGenerationJobSourceType @type = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + string description = default; + string prompt = default; + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("type"u8)) + { + @type = new EvaluatorGenerationJobSourceType(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("description"u8)) + { + description = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("prompt"u8)) + { + prompt = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new PromptEvaluatorGenerationJobSource(@type, additionalBinaryDataProperties, description, prompt); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/PromptEvaluatorGenerationJobSource.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/PromptEvaluatorGenerationJobSource.cs new file mode 100644 index 000000000000..04ba70f0602d --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/PromptEvaluatorGenerationJobSource.cs @@ -0,0 +1,40 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + /// Prompt source for evaluator generation jobs — inline text provided by the user. + public partial class PromptEvaluatorGenerationJobSource : EvaluatorGenerationJobSource + { + /// Initializes a new instance of . + /// Inline prompt text (e.g., agent description, policy text, supplementary context). + /// is null. + public PromptEvaluatorGenerationJobSource(string prompt) : base(EvaluatorGenerationJobSourceType.Prompt) + { + Argument.AssertNotNull(prompt, nameof(prompt)); + + Prompt = prompt; + } + + /// Initializes a new instance of . + /// The type of source. + /// Keeps track of any properties unknown to the library. + /// Optional description of what this source represents — helps the pipeline interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities'). + /// Inline prompt text (e.g., agent description, policy text, supplementary context). + internal PromptEvaluatorGenerationJobSource(EvaluatorGenerationJobSourceType @type, IDictionary additionalBinaryDataProperties, string description, string prompt) : base(@type, additionalBinaryDataProperties) + { + Description = description; + Prompt = prompt; + } + + /// Optional description of what this source represents — helps the pipeline interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities'). + public string Description { get; set; } + + /// Inline prompt text (e.g., agent description, policy text, supplementary context). + public string Prompt { get; set; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/RoutineAction.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/RoutineAction.Serialization.cs new file mode 100644 index 000000000000..06c02ff3a121 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/RoutineAction.Serialization.cs @@ -0,0 +1,138 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.AI.Projects +{ + /// + /// Base model for a routine action. + /// Please note this is the abstract base class. The derived classes available for instantiation are: and . + /// + [PersistableModelProxy(typeof(UnknownRoutineAction))] + public abstract partial class RoutineAction : IJsonModel + { + /// Initializes a new instance of for deserialization. + internal RoutineAction() + { + } + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual RoutineAction PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeRoutineAction(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RoutineAction)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(RoutineAction)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + RoutineAction IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RoutineAction)} does not support writing '{format}' format."); + } + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + RoutineAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual RoutineAction JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RoutineAction)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRoutineAction(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static RoutineAction DeserializeRoutineAction(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("type"u8, out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "invoke_agent_responses_api": + return InvokeAgentResponsesApiRoutineAction.DeserializeInvokeAgentResponsesApiRoutineAction(element, options); + case "invoke_agent_invocations_api": + return InvokeAgentInvocationsApiRoutineAction.DeserializeInvokeAgentInvocationsApiRoutineAction(element, options); + } + } + return UnknownRoutineAction.DeserializeUnknownRoutineAction(element, options); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/RoutineAction.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/RoutineAction.cs new file mode 100644 index 000000000000..daaa6b241463 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/RoutineAction.cs @@ -0,0 +1,38 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + /// + /// Base model for a routine action. + /// Please note this is the abstract base class. The derived classes available for instantiation are: and . + /// + public abstract partial class RoutineAction + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + /// The action type. + private protected RoutineAction(RoutineActionType @type) + { + Type = @type; + } + + /// Initializes a new instance of . + /// The action type. + /// Keeps track of any properties unknown to the library. + internal RoutineAction(RoutineActionType @type, IDictionary additionalBinaryDataProperties) + { + Type = @type; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// The action type. + internal RoutineActionType Type { get; set; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/RoutineActionType.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/RoutineActionType.cs new file mode 100644 index 000000000000..f182bfe30b60 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/RoutineActionType.cs @@ -0,0 +1,67 @@ +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.AI.Projects +{ + /// The discriminator values supported for routine actions. + public readonly partial struct RoutineActionType : IEquatable + { + private readonly string _value; + /// Dispatches through the responses API. + private const string InvokeAgentResponsesApiValue = "invoke_agent_responses_api"; + /// Dispatches through the raw invocations API. + private const string InvokeAgentInvocationsApiValue = "invoke_agent_invocations_api"; + + /// Initializes a new instance of . + /// The value. + /// is null. + public RoutineActionType(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + + /// Dispatches through the responses API. + public static RoutineActionType InvokeAgentResponsesApi { get; } = new RoutineActionType(InvokeAgentResponsesApiValue); + + /// Dispatches through the raw invocations API. + public static RoutineActionType InvokeAgentInvocationsApi { get; } = new RoutineActionType(InvokeAgentInvocationsApiValue); + + /// Determines if two values are the same. + /// The left value to compare. + /// The right value to compare. + public static bool operator ==(RoutineActionType left, RoutineActionType right) => left.Equals(right); + + /// Determines if two values are not the same. + /// The left value to compare. + /// The right value to compare. + public static bool operator !=(RoutineActionType left, RoutineActionType right) => !left.Equals(right); + + /// Converts a string to a . + /// The value. + public static implicit operator RoutineActionType(string value) => new RoutineActionType(value); + + /// Converts a string to a . + /// The value. + public static implicit operator RoutineActionType?(string value) => value == null ? null : new RoutineActionType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is RoutineActionType other && Equals(other); + + /// + public bool Equals(RoutineActionType 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/Models/RoutineAttemptSource.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/RoutineAttemptSource.cs new file mode 100644 index 000000000000..b886722f6afe --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/RoutineAttemptSource.cs @@ -0,0 +1,82 @@ +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.AI.Projects +{ + /// Known source paths that can produce a routine run. + public readonly partial struct RoutineAttemptSource : IEquatable + { + private readonly string _value; + /// A dispatch fired from an event delivery. + private const string EventFireValue = "event_fire"; + /// A dispatch executed synchronously by a direct request. + private const string ManualDispatchValue = "manual_dispatch"; + /// A dispatch executed asynchronously from the dispatch queue. + private const string QueuedDispatchValue = "queued_dispatch"; + /// A dispatch fired from a schedule delivery. + private const string ScheduleDeliveryValue = "schedule_delivery"; + /// A dispatch fired from a timer delivery. + private const string TimerDeliveryValue = "timer_delivery"; + + /// Initializes a new instance of . + /// The value. + /// is null. + public RoutineAttemptSource(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + + /// A dispatch fired from an event delivery. + public static RoutineAttemptSource EventFire { get; } = new RoutineAttemptSource(EventFireValue); + + /// A dispatch executed synchronously by a direct request. + public static RoutineAttemptSource ManualDispatch { get; } = new RoutineAttemptSource(ManualDispatchValue); + + /// A dispatch executed asynchronously from the dispatch queue. + public static RoutineAttemptSource QueuedDispatch { get; } = new RoutineAttemptSource(QueuedDispatchValue); + + /// A dispatch fired from a schedule delivery. + public static RoutineAttemptSource ScheduleDelivery { get; } = new RoutineAttemptSource(ScheduleDeliveryValue); + + /// A dispatch fired from a timer delivery. + public static RoutineAttemptSource TimerDelivery { get; } = new RoutineAttemptSource(TimerDeliveryValue); + + /// Determines if two values are the same. + /// The left value to compare. + /// The right value to compare. + public static bool operator ==(RoutineAttemptSource left, RoutineAttemptSource right) => left.Equals(right); + + /// Determines if two values are not the same. + /// The left value to compare. + /// The right value to compare. + public static bool operator !=(RoutineAttemptSource left, RoutineAttemptSource right) => !left.Equals(right); + + /// Converts a string to a . + /// The value. + public static implicit operator RoutineAttemptSource(string value) => new RoutineAttemptSource(value); + + /// Converts a string to a . + /// The value. + public static implicit operator RoutineAttemptSource?(string value) => value == null ? null : new RoutineAttemptSource(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is RoutineAttemptSource other && Equals(other); + + /// + public bool Equals(RoutineAttemptSource 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/Models/RoutineDispatchPayload.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/RoutineDispatchPayload.Serialization.cs new file mode 100644 index 000000000000..d3cf651a39cc --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/RoutineDispatchPayload.Serialization.cs @@ -0,0 +1,138 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.AI.Projects +{ + /// + /// Base model for a manual dispatch payload. + /// Please note this is the abstract base class. The derived classes available for instantiation are: and . + /// + [PersistableModelProxy(typeof(UnknownRoutineDispatchPayload))] + public abstract partial class RoutineDispatchPayload : IJsonModel + { + /// Initializes a new instance of for deserialization. + internal RoutineDispatchPayload() + { + } + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual RoutineDispatchPayload PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeRoutineDispatchPayload(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RoutineDispatchPayload)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(RoutineDispatchPayload)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + RoutineDispatchPayload IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RoutineDispatchPayload)} does not support writing '{format}' format."); + } + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + RoutineDispatchPayload IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual RoutineDispatchPayload JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RoutineDispatchPayload)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRoutineDispatchPayload(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static RoutineDispatchPayload DeserializeRoutineDispatchPayload(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("type"u8, out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "invoke_agent_responses_api": + return InvokeAgentResponsesApiDispatchPayload.DeserializeInvokeAgentResponsesApiDispatchPayload(element, options); + case "invoke_agent_invocations_api": + return InvokeAgentInvocationsApiDispatchPayload.DeserializeInvokeAgentInvocationsApiDispatchPayload(element, options); + } + } + return UnknownRoutineDispatchPayload.DeserializeUnknownRoutineDispatchPayload(element, options); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/RoutineDispatchPayload.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/RoutineDispatchPayload.cs new file mode 100644 index 000000000000..5346c355b355 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/RoutineDispatchPayload.cs @@ -0,0 +1,38 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + /// + /// Base model for a manual dispatch payload. + /// Please note this is the abstract base class. The derived classes available for instantiation are: and . + /// + public abstract partial class RoutineDispatchPayload + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + /// The manual dispatch payload type. + private protected RoutineDispatchPayload(RoutineDispatchPayloadType @type) + { + Type = @type; + } + + /// Initializes a new instance of . + /// The manual dispatch payload type. + /// Keeps track of any properties unknown to the library. + internal RoutineDispatchPayload(RoutineDispatchPayloadType @type, IDictionary additionalBinaryDataProperties) + { + Type = @type; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// The manual dispatch payload type. + internal RoutineDispatchPayloadType Type { get; set; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/RoutineDispatchPayloadType.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/RoutineDispatchPayloadType.cs new file mode 100644 index 000000000000..43082f18e4f7 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/RoutineDispatchPayloadType.cs @@ -0,0 +1,67 @@ +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.AI.Projects +{ + /// The discriminator values supported for manual routine dispatch payloads. + internal readonly partial struct RoutineDispatchPayloadType : IEquatable + { + private readonly string _value; + /// A manual payload for a responses API routine dispatch. + private const string InvokeAgentResponsesApiValue = "invoke_agent_responses_api"; + /// A manual payload for an invocations API routine dispatch. + private const string InvokeAgentInvocationsApiValue = "invoke_agent_invocations_api"; + + /// Initializes a new instance of . + /// The value. + /// is null. + public RoutineDispatchPayloadType(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + + /// A manual payload for a responses API routine dispatch. + public static RoutineDispatchPayloadType InvokeAgentResponsesApi { get; } = new RoutineDispatchPayloadType(InvokeAgentResponsesApiValue); + + /// A manual payload for an invocations API routine dispatch. + public static RoutineDispatchPayloadType InvokeAgentInvocationsApi { get; } = new RoutineDispatchPayloadType(InvokeAgentInvocationsApiValue); + + /// Determines if two values are the same. + /// The left value to compare. + /// The right value to compare. + public static bool operator ==(RoutineDispatchPayloadType left, RoutineDispatchPayloadType right) => left.Equals(right); + + /// Determines if two values are not the same. + /// The left value to compare. + /// The right value to compare. + public static bool operator !=(RoutineDispatchPayloadType left, RoutineDispatchPayloadType right) => !left.Equals(right); + + /// Converts a string to a . + /// The value. + public static implicit operator RoutineDispatchPayloadType(string value) => new RoutineDispatchPayloadType(value); + + /// Converts a string to a . + /// The value. + public static implicit operator RoutineDispatchPayloadType?(string value) => value == null ? null : new RoutineDispatchPayloadType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is RoutineDispatchPayloadType other && Equals(other); + + /// + public bool Equals(RoutineDispatchPayloadType 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/Models/RoutineRun.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/RoutineRun.Serialization.cs new file mode 100644 index 000000000000..4b8cae57b866 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/RoutineRun.Serialization.cs @@ -0,0 +1,336 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.AI.Projects +{ + /// A single routine run returned from the run history API. + public partial class RoutineRun : IJsonModel + { + /// Initializes a new instance of for deserialization. + internal RoutineRun() + { + } + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual RoutineRun PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeRoutineRun(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RoutineRun)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(RoutineRun)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + RoutineRun IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RoutineRun)} does not support writing '{format}' format."); + } + writer.WritePropertyName("id"u8); + writer.WriteStringValue(Id); + writer.WritePropertyName("status"u8); + writer.WriteStringValue(Status); + if (Optional.IsDefined(Phase)) + { + writer.WritePropertyName("phase"u8); + writer.WriteStringValue(Phase.Value.ToString()); + } + writer.WritePropertyName("trigger_type"u8); + writer.WriteStringValue(TriggerType.ToString()); + if (Optional.IsDefined(AttemptSource)) + { + writer.WritePropertyName("attempt_source"u8); + writer.WriteStringValue(AttemptSource.Value.ToString()); + } + if (Optional.IsDefined(ActionType)) + { + writer.WritePropertyName("action_type"u8); + writer.WriteStringValue(ActionType.Value.ToString()); + } + if (Optional.IsDefined(TriggeredAt)) + { + writer.WritePropertyName("triggered_at"u8); + writer.WriteNumberValue(TriggeredAt.Value, "U"); + } + writer.WritePropertyName("started_at"u8); + writer.WriteNumberValue(StartedAt, "U"); + if (Optional.IsDefined(EndedAt)) + { + writer.WritePropertyName("ended_at"u8); + writer.WriteNumberValue(EndedAt.Value, "U"); + } + if (Optional.IsDefined(DispatchId)) + { + writer.WritePropertyName("dispatch_id"u8); + writer.WriteStringValue(DispatchId); + } + if (Optional.IsDefined(ActionCorrelationId)) + { + writer.WritePropertyName("action_correlation_id"u8); + writer.WriteStringValue(ActionCorrelationId); + } + if (Optional.IsDefined(ResponseId)) + { + writer.WritePropertyName("response_id"u8); + writer.WriteStringValue(ResponseId); + } + if (Optional.IsDefined(TaskId)) + { + writer.WritePropertyName("task_id"u8); + writer.WriteStringValue(TaskId); + } + if (Optional.IsDefined(ErrorType)) + { + writer.WritePropertyName("error_type"u8); + writer.WriteStringValue(ErrorType); + } + if (Optional.IsDefined(ErrorMessage)) + { + writer.WritePropertyName("error_message"u8); + writer.WriteStringValue(ErrorMessage); + } + if (Optional.IsDefined(Diagnostics)) + { + writer.WritePropertyName("diagnostics"u8); + writer.WriteObjectValue(Diagnostics, options); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + RoutineRun IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual RoutineRun JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RoutineRun)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRoutineRun(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static RoutineRun DeserializeRoutineRun(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string id = default; + string status = default; + RoutineRunPhase? phase = default; + RoutineTriggerType triggerType = default; + RoutineAttemptSource? attemptSource = default; + RoutineActionType? actionType = default; + DateTimeOffset? triggeredAt = default; + DateTimeOffset startedAt = default; + DateTimeOffset? endedAt = default; + string dispatchId = default; + string actionCorrelationId = default; + string responseId = default; + string taskId = default; + string errorType = default; + string errorMessage = default; + RoutineRunDiagnostics diagnostics = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("id"u8)) + { + id = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("status"u8)) + { + status = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("phase"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + phase = new RoutineRunPhase(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("trigger_type"u8)) + { + triggerType = new RoutineTriggerType(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("attempt_source"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + attemptSource = new RoutineAttemptSource(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("action_type"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + actionType = new RoutineActionType(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("triggered_at"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + triggeredAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); + continue; + } + if (prop.NameEquals("started_at"u8)) + { + startedAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); + continue; + } + if (prop.NameEquals("ended_at"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endedAt = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); + continue; + } + if (prop.NameEquals("dispatch_id"u8)) + { + dispatchId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("action_correlation_id"u8)) + { + actionCorrelationId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("response_id"u8)) + { + responseId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("task_id"u8)) + { + taskId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("error_type"u8)) + { + errorType = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("error_message"u8)) + { + errorMessage = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("diagnostics"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + diagnostics = RoutineRunDiagnostics.DeserializeRoutineRunDiagnostics(prop.Value, options); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new RoutineRun( + id, + status, + phase, + triggerType, + attemptSource, + actionType, + triggeredAt, + startedAt, + endedAt, + dispatchId, + actionCorrelationId, + responseId, + taskId, + errorType, + errorMessage, + diagnostics, + additionalBinaryDataProperties); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/RoutineRun.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/RoutineRun.cs new file mode 100644 index 000000000000..6e1fa8f826f3 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/RoutineRun.cs @@ -0,0 +1,116 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + /// A single routine run returned from the run history API. + public partial class RoutineRun + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + /// The MLflow run identifier for the routine attempt. + /// The underlying MLflow run status. + /// The trigger type that produced the routine attempt. + /// The time when the underlying run started. + internal RoutineRun(string id, string status, RoutineTriggerType triggerType, DateTimeOffset startedAt) + { + Id = id; + Status = status; + TriggerType = triggerType; + StartedAt = startedAt; + } + + /// Initializes a new instance of . + /// The MLflow run identifier for the routine attempt. + /// The underlying MLflow run status. + /// The AgentExtensions lifecycle phase for the routine attempt. + /// The trigger type that produced the routine attempt. + /// The source path that created the routine attempt. + /// The action type dispatched for the routine attempt. + /// The logical trigger time recorded for the routine attempt. + /// The time when the underlying run started. + /// The time when the underlying run reached a terminal state. + /// The dispatch identifier associated with the routine attempt. + /// The downstream action correlation identifier, when available. + /// The downstream response or invocation identifier, when available. + /// The workspace task identifier linked to the routine attempt, when available. + /// The fully qualified error type captured for a failed attempt, when available. + /// The truncated failure message captured for a failed attempt, when available. + /// Diagnostic data captured for the routine attempt. + /// Keeps track of any properties unknown to the library. + internal RoutineRun(string id, string status, RoutineRunPhase? phase, RoutineTriggerType triggerType, RoutineAttemptSource? attemptSource, RoutineActionType? actionType, DateTimeOffset? triggeredAt, DateTimeOffset startedAt, DateTimeOffset? endedAt, string dispatchId, string actionCorrelationId, string responseId, string taskId, string errorType, string errorMessage, RoutineRunDiagnostics diagnostics, IDictionary additionalBinaryDataProperties) + { + Id = id; + Status = status; + Phase = phase; + TriggerType = triggerType; + AttemptSource = attemptSource; + ActionType = actionType; + TriggeredAt = triggeredAt; + StartedAt = startedAt; + EndedAt = endedAt; + DispatchId = dispatchId; + ActionCorrelationId = actionCorrelationId; + ResponseId = responseId; + TaskId = taskId; + ErrorType = errorType; + ErrorMessage = errorMessage; + Diagnostics = diagnostics; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// The MLflow run identifier for the routine attempt. + public string Id { get; } + + /// The underlying MLflow run status. + public string Status { get; } + + /// The AgentExtensions lifecycle phase for the routine attempt. + public RoutineRunPhase? Phase { get; } + + /// The trigger type that produced the routine attempt. + public RoutineTriggerType TriggerType { get; } + + /// The source path that created the routine attempt. + public RoutineAttemptSource? AttemptSource { get; } + + /// The action type dispatched for the routine attempt. + public RoutineActionType? ActionType { get; } + + /// The logical trigger time recorded for the routine attempt. + public DateTimeOffset? TriggeredAt { get; } + + /// The time when the underlying run started. + public DateTimeOffset StartedAt { get; } + + /// The time when the underlying run reached a terminal state. + public DateTimeOffset? EndedAt { get; } + + /// The dispatch identifier associated with the routine attempt. + public string DispatchId { get; } + + /// The downstream action correlation identifier, when available. + public string ActionCorrelationId { get; } + + /// The downstream response or invocation identifier, when available. + public string ResponseId { get; } + + /// The workspace task identifier linked to the routine attempt, when available. + public string TaskId { get; } + + /// The fully qualified error type captured for a failed attempt, when available. + public string ErrorType { get; } + + /// The truncated failure message captured for a failed attempt, when available. + public string ErrorMessage { get; } + + /// Diagnostic data captured for the routine attempt. + public RoutineRunDiagnostics Diagnostics { get; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/RoutineRunDiagnostics.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/RoutineRunDiagnostics.Serialization.cs new file mode 100644 index 000000000000..409faf7558ea --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/RoutineRunDiagnostics.Serialization.cs @@ -0,0 +1,212 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.AI.Projects +{ + /// Generic diagnostics captured on a routine run. + public partial class RoutineRunDiagnostics : IJsonModel + { + /// Initializes a new instance of for deserialization. + internal RoutineRunDiagnostics() + { + } + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual RoutineRunDiagnostics PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeRoutineRunDiagnostics(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RoutineRunDiagnostics)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(RoutineRunDiagnostics)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + RoutineRunDiagnostics IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RoutineRunDiagnostics)} does not support writing '{format}' format."); + } + writer.WritePropertyName("parameters"u8); + writer.WriteStartObject(); + foreach (var item in Parameters) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + writer.WritePropertyName("tags"u8); + writer.WriteStartObject(); + foreach (var item in Tags) + { + writer.WritePropertyName(item.Key); + if (item.Value == null) + { + writer.WriteNullValue(); + continue; + } + writer.WriteStringValue(item.Value); + } + writer.WriteEndObject(); + writer.WritePropertyName("metrics"u8); + writer.WriteStartObject(); + foreach (var item in Metrics) + { + writer.WritePropertyName(item.Key); + writer.WriteNumberValue(item.Value); + } + writer.WriteEndObject(); + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + RoutineRunDiagnostics IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual RoutineRunDiagnostics JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RoutineRunDiagnostics)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRoutineRunDiagnostics(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static RoutineRunDiagnostics DeserializeRoutineRunDiagnostics(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + IDictionary parameters = default; + IDictionary tags = default; + IDictionary metrics = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("parameters"u8)) + { + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + if (prop0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(prop0.Name, null); + } + else + { + dictionary.Add(prop0.Name, prop0.Value.GetString()); + } + } + parameters = dictionary; + continue; + } + if (prop.NameEquals("tags"u8)) + { + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + if (prop0.Value.ValueKind == JsonValueKind.Null) + { + dictionary.Add(prop0.Name, null); + } + else + { + dictionary.Add(prop0.Name, prop0.Value.GetString()); + } + } + tags = dictionary; + continue; + } + if (prop.NameEquals("metrics"u8)) + { + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, prop0.Value.GetDouble()); + } + metrics = dictionary; + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new RoutineRunDiagnostics(parameters, tags, metrics, additionalBinaryDataProperties); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/RoutineRunDiagnostics.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/RoutineRunDiagnostics.cs new file mode 100644 index 000000000000..5a77986cd342 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/RoutineRunDiagnostics.cs @@ -0,0 +1,49 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + /// Generic diagnostics captured on a routine run. + public partial class RoutineRunDiagnostics + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + /// MLflow parameters recorded on the run, keyed by parameter name. + /// MLflow tags recorded on the run, keyed by tag name. + /// Latest MLflow metric values recorded on the run, keyed by metric name. + internal RoutineRunDiagnostics(IDictionary parameters, IDictionary tags, IDictionary metrics) + { + Parameters = parameters; + Tags = tags; + Metrics = metrics; + } + + /// Initializes a new instance of . + /// MLflow parameters recorded on the run, keyed by parameter name. + /// MLflow tags recorded on the run, keyed by tag name. + /// Latest MLflow metric values recorded on the run, keyed by metric name. + /// Keeps track of any properties unknown to the library. + internal RoutineRunDiagnostics(IDictionary parameters, IDictionary tags, IDictionary metrics, IDictionary additionalBinaryDataProperties) + { + Parameters = parameters; + Tags = tags; + Metrics = metrics; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// MLflow parameters recorded on the run, keyed by parameter name. + public IDictionary Parameters { get; } + + /// MLflow tags recorded on the run, keyed by tag name. + public IDictionary Tags { get; } + + /// Latest MLflow metric values recorded on the run, keyed by metric name. + public IDictionary Metrics { get; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/RoutineRunPhase.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/RoutineRunPhase.cs new file mode 100644 index 000000000000..7bd25df6088a --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/RoutineRunPhase.cs @@ -0,0 +1,77 @@ +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.AI.Projects +{ + /// Known lifecycle phases recorded for a routine run. + public readonly partial struct RoutineRunPhase : IEquatable + { + private readonly string _value; + /// The run is queued for dispatch. + private const string QueuedValue = "queued"; + /// The run is currently being dispatched. + private const string DispatchingValue = "dispatching"; + /// The run finished successfully. + private const string CompletedValue = "completed"; + /// The run finished with an error. + private const string FailedValue = "failed"; + + /// Initializes a new instance of . + /// The value. + /// is null. + public RoutineRunPhase(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + + /// The run is queued for dispatch. + public static RoutineRunPhase Queued { get; } = new RoutineRunPhase(QueuedValue); + + /// The run is currently being dispatched. + public static RoutineRunPhase Dispatching { get; } = new RoutineRunPhase(DispatchingValue); + + /// The run finished successfully. + public static RoutineRunPhase Completed { get; } = new RoutineRunPhase(CompletedValue); + + /// The run finished with an error. + public static RoutineRunPhase Failed { get; } = new RoutineRunPhase(FailedValue); + + /// Determines if two values are the same. + /// The left value to compare. + /// The right value to compare. + public static bool operator ==(RoutineRunPhase left, RoutineRunPhase right) => left.Equals(right); + + /// Determines if two values are not the same. + /// The left value to compare. + /// The right value to compare. + public static bool operator !=(RoutineRunPhase left, RoutineRunPhase right) => !left.Equals(right); + + /// Converts a string to a . + /// The value. + public static implicit operator RoutineRunPhase(string value) => new RoutineRunPhase(value); + + /// Converts a string to a . + /// The value. + public static implicit operator RoutineRunPhase?(string value) => value == null ? null : new RoutineRunPhase(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is RoutineRunPhase other && Equals(other); + + /// + public bool Equals(RoutineRunPhase 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/Models/RoutineTrigger.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/RoutineTrigger.Serialization.cs new file mode 100644 index 000000000000..adfb11c4d9eb --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/RoutineTrigger.Serialization.cs @@ -0,0 +1,140 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Text.Json; + +namespace Azure.AI.Projects +{ + /// + /// Base model for a routine trigger. + /// Please note this is the abstract base class. The derived classes available for instantiation are: , , and . + /// + [PersistableModelProxy(typeof(UnknownRoutineTrigger))] + public abstract partial class RoutineTrigger : IJsonModel + { + /// Initializes a new instance of for deserialization. + internal RoutineTrigger() + { + } + + /// The data to parse. + /// The client options for reading and writing models. + protected virtual RoutineTrigger PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeRoutineTrigger(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RoutineTrigger)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(RoutineTrigger)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + RoutineTrigger IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RoutineTrigger)} does not support writing '{format}' format."); + } + writer.WritePropertyName("type"u8); + writer.WriteStringValue(Type.ToString()); + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + RoutineTrigger IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual RoutineTrigger JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RoutineTrigger)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRoutineTrigger(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static RoutineTrigger DeserializeRoutineTrigger(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + if (element.TryGetProperty("type"u8, out JsonElement discriminator)) + { + switch (discriminator.GetString()) + { + case "schedule": + return ScheduleRoutineTrigger.DeserializeScheduleRoutineTrigger(element, options); + case "timer": + return TimerRoutineTrigger.DeserializeTimerRoutineTrigger(element, options); + case "github_issue_opened": + return GitHubIssueOpenedRoutineTrigger.DeserializeGitHubIssueOpenedRoutineTrigger(element, options); + } + } + return UnknownRoutineTrigger.DeserializeUnknownRoutineTrigger(element, options); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/RoutineTrigger.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/RoutineTrigger.cs new file mode 100644 index 000000000000..73a994e70b43 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/RoutineTrigger.cs @@ -0,0 +1,38 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + /// + /// Base model for a routine trigger. + /// Please note this is the abstract base class. The derived classes available for instantiation are: , , and . + /// + public abstract partial class RoutineTrigger + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + /// The trigger type. + private protected RoutineTrigger(RoutineTriggerType @type) + { + Type = @type; + } + + /// Initializes a new instance of . + /// The trigger type. + /// Keeps track of any properties unknown to the library. + internal RoutineTrigger(RoutineTriggerType @type, IDictionary additionalBinaryDataProperties) + { + Type = @type; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// The trigger type. + internal RoutineTriggerType Type { get; set; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/RoutineTriggerType.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/RoutineTriggerType.cs new file mode 100644 index 000000000000..466151d4c0d0 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/RoutineTriggerType.cs @@ -0,0 +1,72 @@ +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.AI.Projects +{ + /// The discriminator values supported for routine triggers. + public readonly partial struct RoutineTriggerType : IEquatable + { + private readonly string _value; + /// A GitHub issue-opened trigger. + private const string GithubIssueOpenedValue = "github_issue_opened"; + /// A recurring cron-based trigger. + private const string ScheduleValue = "schedule"; + /// A one-shot timer trigger. + private const string TimerValue = "timer"; + + /// Initializes a new instance of . + /// The value. + /// is null. + public RoutineTriggerType(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + + /// A GitHub issue-opened trigger. + public static RoutineTriggerType GithubIssueOpened { get; } = new RoutineTriggerType(GithubIssueOpenedValue); + + /// A recurring cron-based trigger. + public static RoutineTriggerType Schedule { get; } = new RoutineTriggerType(ScheduleValue); + + /// A one-shot timer trigger. + public static RoutineTriggerType Timer { get; } = new RoutineTriggerType(TimerValue); + + /// Determines if two values are the same. + /// The left value to compare. + /// The right value to compare. + public static bool operator ==(RoutineTriggerType left, RoutineTriggerType right) => left.Equals(right); + + /// Determines if two values are not the same. + /// The left value to compare. + /// The right value to compare. + public static bool operator !=(RoutineTriggerType left, RoutineTriggerType right) => !left.Equals(right); + + /// Converts a string to a . + /// The value. + public static implicit operator RoutineTriggerType(string value) => new RoutineTriggerType(value); + + /// Converts a string to a . + /// The value. + public static implicit operator RoutineTriggerType?(string value) => value == null ? null : new RoutineTriggerType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is RoutineTriggerType other && Equals(other); + + /// + public bool Equals(RoutineTriggerType 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/Models/RubricBasedEvaluatorDefinition.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/RubricBasedEvaluatorDefinition.Serialization.cs new file mode 100644 index 000000000000..9fc71168a2c6 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/RubricBasedEvaluatorDefinition.Serialization.cs @@ -0,0 +1,199 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.AI.Projects.Evaluation; + +namespace Azure.AI.Projects +{ + /// Rubric-based evaluator definition — stores dimensions produced by the generate API. Used for both quality and safety evaluators. + public partial class RubricBasedEvaluatorDefinition : EvaluatorDefinition, IJsonModel + { + /// Initializes a new instance of for deserialization. + internal RubricBasedEvaluatorDefinition() + { + } + + /// The data to parse. + /// The client options for reading and writing models. + protected override EvaluatorDefinition PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeRubricBasedEvaluatorDefinition(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RubricBasedEvaluatorDefinition)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(RubricBasedEvaluatorDefinition)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + RubricBasedEvaluatorDefinition IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (RubricBasedEvaluatorDefinition)PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RubricBasedEvaluatorDefinition)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("dimensions"u8); + writer.WriteStartArray(); + foreach (EvaluationsDimension item in Dimensions) + { + writer.WriteObjectValue(item, options); + } + writer.WriteEndArray(); + if (Optional.IsDefined(PassThreshold)) + { + writer.WritePropertyName("pass_threshold"u8); + writer.WriteNumberValue(PassThreshold.Value); + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + RubricBasedEvaluatorDefinition IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (RubricBasedEvaluatorDefinition)JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected override EvaluatorDefinition JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RubricBasedEvaluatorDefinition)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRubricBasedEvaluatorDefinition(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static RubricBasedEvaluatorDefinition DeserializeRubricBasedEvaluatorDefinition(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EvaluatorDefinitionType @type = default; + BinaryData initParameters = default; + BinaryData dataSchema = default; + IDictionary metrics = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + IList dimensions = default; + float? passThreshold = default; + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("type"u8)) + { + @type = new EvaluatorDefinitionType(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("init_parameters"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + initParameters = BinaryData.FromString(prop.Value.GetRawText()); + continue; + } + if (prop.NameEquals("data_schema"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + dataSchema = BinaryData.FromString(prop.Value.GetRawText()); + continue; + } + if (prop.NameEquals("metrics"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, EvaluatorMetric.DeserializeEvaluatorMetric(prop0.Value, options)); + } + metrics = dictionary; + continue; + } + if (prop.NameEquals("dimensions"u8)) + { + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(EvaluationsDimension.DeserializeEvaluationsDimension(item, options)); + } + dimensions = array; + continue; + } + if (prop.NameEquals("pass_threshold"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + passThreshold = prop.Value.GetSingle(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new RubricBasedEvaluatorDefinition( + @type, + initParameters, + dataSchema, + metrics ?? new ChangeTrackingDictionary(), + additionalBinaryDataProperties, + dimensions, + passThreshold); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/RubricBasedEvaluatorDefinition.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/RubricBasedEvaluatorDefinition.cs new file mode 100644 index 000000000000..da135be4b3ee --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/RubricBasedEvaluatorDefinition.cs @@ -0,0 +1,45 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; +using System.Linq; +using Azure.AI.Projects.Evaluation; + +namespace Azure.AI.Projects +{ + /// Rubric-based evaluator definition — stores dimensions produced by the generate API. Used for both quality and safety evaluators. + public partial class RubricBasedEvaluatorDefinition : EvaluatorDefinition + { + /// Initializes a new instance of . + /// The set of dimensions — the scoring blueprint used by the LLM judge. Quality evaluators include a non-editable residual dimension with id 'general_quality' (always_applicable: true); safety evaluators include 'general_policy_compliance'. Both use the same Dimension structure. + /// is null. + public RubricBasedEvaluatorDefinition(IEnumerable dimensions) : base(EvaluatorDefinitionType.Rubric) + { + Argument.AssertNotNull(dimensions, nameof(dimensions)); + + Dimensions = dimensions.ToList(); + } + + /// Initializes a new instance of . + /// The type of evaluator definition. + /// The JSON schema (Draft 2020-12) for the evaluator's input parameters. This includes parameters like type, properties, required. + /// The JSON schema (Draft 2020-12) for the evaluator's input data. This includes parameters like type, properties, required. + /// List of output metrics produced by this evaluator. + /// Keeps track of any properties unknown to the library. + /// The set of dimensions — the scoring blueprint used by the LLM judge. Quality evaluators include a non-editable residual dimension with id 'general_quality' (always_applicable: true); safety evaluators include 'general_policy_compliance'. Both use the same Dimension structure. + /// Pass/fail threshold for the aggregate rubric score, on the same normalized 0.0-1.0 scale as the emitted `score`. When the runtime weighted average meets or exceeds this value, the result is `pass`. Defaults to 0.5 (equivalent to a raw 1-5 weighted average of 3.0). The 'any dimension scored 1 → fail' rule still applies regardless of this threshold. + internal RubricBasedEvaluatorDefinition(EvaluatorDefinitionType @type, BinaryData initParameters, BinaryData dataSchema, IDictionary metrics, IDictionary additionalBinaryDataProperties, IList dimensions, float? passThreshold) : base(@type, initParameters, dataSchema, metrics, additionalBinaryDataProperties) + { + Dimensions = dimensions; + PassThreshold = passThreshold; + } + + /// The set of dimensions — the scoring blueprint used by the LLM judge. Quality evaluators include a non-editable residual dimension with id 'general_quality' (always_applicable: true); safety evaluators include 'general_policy_compliance'. Both use the same Dimension structure. + public IList Dimensions { get; } + + /// Pass/fail threshold for the aggregate rubric score, on the same normalized 0.0-1.0 scale as the emitted `score`. When the runtime weighted average meets or exceeds this value, the result is `pass`. Defaults to 0.5 (equivalent to a raw 1-5 weighted average of 3.0). The 'any dimension scored 1 → fail' rule still applies regardless of this threshold. + public float? PassThreshold { get; set; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/ScheduleRoutineTrigger.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/ScheduleRoutineTrigger.Serialization.cs new file mode 100644 index 000000000000..0ff4fda97362 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/ScheduleRoutineTrigger.Serialization.cs @@ -0,0 +1,139 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.AI.Projects +{ + /// A recurring cron-based routine trigger. + public partial class ScheduleRoutineTrigger : RoutineTrigger, IJsonModel + { + /// Initializes a new instance of for deserialization. + internal ScheduleRoutineTrigger() + { + } + + /// The data to parse. + /// The client options for reading and writing models. + protected override RoutineTrigger PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeScheduleRoutineTrigger(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ScheduleRoutineTrigger)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(ScheduleRoutineTrigger)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + ScheduleRoutineTrigger IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (ScheduleRoutineTrigger)PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ScheduleRoutineTrigger)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("cron_expression"u8); + writer.WriteStringValue(CronExpression); + writer.WritePropertyName("time_zone"u8); + writer.WriteStringValue(TimeZone); + } + + /// The JSON reader. + /// The client options for reading and writing models. + ScheduleRoutineTrigger IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ScheduleRoutineTrigger)JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected override RoutineTrigger JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ScheduleRoutineTrigger)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeScheduleRoutineTrigger(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static ScheduleRoutineTrigger DeserializeScheduleRoutineTrigger(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + RoutineTriggerType @type = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + string cronExpression = default; + string timeZone = default; + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("type"u8)) + { + @type = new RoutineTriggerType(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("cron_expression"u8)) + { + cronExpression = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("time_zone"u8)) + { + timeZone = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new ScheduleRoutineTrigger(@type, additionalBinaryDataProperties, cronExpression, timeZone); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/ScheduleRoutineTrigger.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/ScheduleRoutineTrigger.cs new file mode 100644 index 000000000000..c5347793cc1b --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/ScheduleRoutineTrigger.cs @@ -0,0 +1,43 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + /// A recurring cron-based routine trigger. + public partial class ScheduleRoutineTrigger : RoutineTrigger + { + /// Initializes a new instance of . + /// A 5-field cron expression. The service enforces a minimum interval of five minutes by default. + /// An IANA or Windows time zone identifier for the schedule. + /// or is null. + public ScheduleRoutineTrigger(string cronExpression, string timeZone) : base(RoutineTriggerType.Schedule) + { + Argument.AssertNotNull(cronExpression, nameof(cronExpression)); + Argument.AssertNotNull(timeZone, nameof(timeZone)); + + CronExpression = cronExpression; + TimeZone = timeZone; + } + + /// Initializes a new instance of . + /// The trigger type. + /// Keeps track of any properties unknown to the library. + /// A 5-field cron expression. The service enforces a minimum interval of five minutes by default. + /// An IANA or Windows time zone identifier for the schedule. + internal ScheduleRoutineTrigger(RoutineTriggerType @type, IDictionary additionalBinaryDataProperties, string cronExpression, string timeZone) : base(@type, additionalBinaryDataProperties) + { + CronExpression = cronExpression; + TimeZone = timeZone; + } + + /// A 5-field cron expression. The service enforces a minimum interval of five minutes by default. + public string CronExpression { get; set; } + + /// An IANA or Windows time zone identifier for the schedule. + public string TimeZone { get; set; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/SharepointPreviewTool.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/SharepointPreviewTool.Serialization.cs index 97c4563bb2ef..6c6a55a3f0ce 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/SharepointPreviewTool.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/SharepointPreviewTool.Serialization.cs @@ -86,6 +86,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsCollectionDefined(ToolConfigs)) + { + writer.WritePropertyName("tool_configs"u8); + writer.WriteStartObject(); + foreach (var item in ToolConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } writer.WritePropertyName("sharepoint_grounding_preview"u8); writer.WriteObjectValue(SharepointGroundingPreview, options); } @@ -119,6 +130,7 @@ internal static SharepointPreviewTool DeserializeSharepointPreviewTool(JsonEleme IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); string name = default; string description = default; + IDictionary toolConfigs = default; SharepointGroundingToolParameters sharepointGroundingPreview = default; foreach (var prop in element.EnumerateObject()) { @@ -137,6 +149,20 @@ internal static SharepointPreviewTool DeserializeSharepointPreviewTool(JsonEleme description = prop.Value.GetString(); continue; } + if (prop.NameEquals("tool_configs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, ToolConfig.DeserializeToolConfig(prop0.Value, options)); + } + toolConfigs = dictionary; + continue; + } if (prop.NameEquals("sharepoint_grounding_preview"u8)) { sharepointGroundingPreview = SharepointGroundingToolParameters.DeserializeSharepointGroundingToolParameters(prop.Value, options); @@ -147,7 +173,13 @@ internal static SharepointPreviewTool DeserializeSharepointPreviewTool(JsonEleme additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new SharepointPreviewTool(@type, additionalBinaryDataProperties, name, description, sharepointGroundingPreview); + return new SharepointPreviewTool( + @type, + additionalBinaryDataProperties, + name, + description, + toolConfigs ?? new ChangeTrackingDictionary(), + sharepointGroundingPreview); } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/SharepointPreviewTool.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/SharepointPreviewTool.cs index 07c5f94eb093..0f644a1e694a 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/SharepointPreviewTool.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/SharepointPreviewTool.cs @@ -17,6 +17,7 @@ public SharepointPreviewTool(SharepointGroundingToolParameters sharepointGroundi { Argument.AssertNotNull(sharepointGroundingPreview, nameof(sharepointGroundingPreview)); + ToolConfigs = new ChangeTrackingDictionary(); SharepointGroundingPreview = sharepointGroundingPreview; } @@ -25,11 +26,17 @@ public SharepointPreviewTool(SharepointGroundingToolParameters sharepointGroundi /// Keeps track of any properties unknown to the library. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// /// The sharepoint grounding tool parameters. - internal SharepointPreviewTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, SharepointGroundingToolParameters sharepointGroundingPreview) : base(@type, additionalBinaryDataProperties) + internal SharepointPreviewTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, IDictionary toolConfigs, SharepointGroundingToolParameters sharepointGroundingPreview) : base(@type, additionalBinaryDataProperties) { Name = name; Description = description; + ToolConfigs = toolConfigs; SharepointGroundingPreview = sharepointGroundingPreview; } @@ -39,7 +46,14 @@ internal SharepointPreviewTool(ToolType @type, IDictionary a /// Optional user-defined description for this tool or configuration. public string Description { get; set; } + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + public IDictionary ToolConfigs { get; } + /// The sharepoint grounding tool parameters. - public SharepointGroundingToolParameters SharepointGroundingPreview { get; } + public SharepointGroundingToolParameters SharepointGroundingPreview { get; set; } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/SimpleQnADataGenerationJobOptions.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/SimpleQnADataGenerationJobOptions.Serialization.cs new file mode 100644 index 000000000000..f6c5b05e7401 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/SimpleQnADataGenerationJobOptions.Serialization.cs @@ -0,0 +1,180 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.AI.Projects +{ + /// The options for a data generation job with SimpleQnA type. + public partial class SimpleQnADataGenerationJobOptions : DataGenerationJobOptions, IJsonModel + { + /// Initializes a new instance of for deserialization. + internal SimpleQnADataGenerationJobOptions() + { + } + + /// The data to parse. + /// The client options for reading and writing models. + protected override DataGenerationJobOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeSimpleQnADataGenerationJobOptions(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(SimpleQnADataGenerationJobOptions)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(SimpleQnADataGenerationJobOptions)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + SimpleQnADataGenerationJobOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (SimpleQnADataGenerationJobOptions)PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SimpleQnADataGenerationJobOptions)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + if (Optional.IsCollectionDefined(QuestionTypes)) + { + writer.WritePropertyName("question_types"u8); + writer.WriteStartArray(); + foreach (SimpleQnAFineTuningQuestionType item in QuestionTypes) + { + writer.WriteStringValue(item.ToString()); + } + writer.WriteEndArray(); + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + SimpleQnADataGenerationJobOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (SimpleQnADataGenerationJobOptions)JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected override DataGenerationJobOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(SimpleQnADataGenerationJobOptions)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeSimpleQnADataGenerationJobOptions(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static SimpleQnADataGenerationJobOptions DeserializeSimpleQnADataGenerationJobOptions(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DataGenerationJobKind @type = default; + int maxSamples = default; + float? trainSplit = default; + DataGenerationModelOptions modelOptions = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + IList questionTypes = default; + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("type"u8)) + { + @type = new DataGenerationJobKind(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("max_samples"u8)) + { + maxSamples = prop.Value.GetInt32(); + continue; + } + if (prop.NameEquals("train_split"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + trainSplit = prop.Value.GetSingle(); + continue; + } + if (prop.NameEquals("model_options"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + modelOptions = DataGenerationModelOptions.DeserializeDataGenerationModelOptions(prop.Value, options); + continue; + } + if (prop.NameEquals("question_types"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + List array = new List(); + foreach (var item in prop.Value.EnumerateArray()) + { + array.Add(new SimpleQnAFineTuningQuestionType(item.GetString())); + } + questionTypes = array; + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new SimpleQnADataGenerationJobOptions( + @type, + maxSamples, + trainSplit, + modelOptions, + additionalBinaryDataProperties, + questionTypes ?? new ChangeTrackingList()); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/SimpleQnADataGenerationJobOptions.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/SimpleQnADataGenerationJobOptions.cs new file mode 100644 index 000000000000..12892ca5df89 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/SimpleQnADataGenerationJobOptions.cs @@ -0,0 +1,35 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + /// The options for a data generation job with SimpleQnA type. + public partial class SimpleQnADataGenerationJobOptions : DataGenerationJobOptions + { + /// Initializes a new instance of . + /// Maximum number of samples to generate. + public SimpleQnADataGenerationJobOptions(int maxSamples) : base(DataGenerationJobKind.SimpleQna, maxSamples) + { + QuestionTypes = new ChangeTrackingList(); + } + + /// Initializes a new instance of . + /// The data generation job type. + /// Maximum number of samples to generate. + /// The proportion of the generated data to be used for training when the data is used for fine-tuning. The rest will be used for validation. Value should be between 0 and 1. + /// The LLM model options. + /// Keeps track of any properties unknown to the library. + /// The question types to generate. Used only for fine-tuning scenarios. + internal SimpleQnADataGenerationJobOptions(DataGenerationJobKind @type, int maxSamples, float? trainSplit, DataGenerationModelOptions modelOptions, IDictionary additionalBinaryDataProperties, IList questionTypes) : base(@type, maxSamples, trainSplit, modelOptions, additionalBinaryDataProperties) + { + QuestionTypes = questionTypes; + } + + /// The question types to generate. Used only for fine-tuning scenarios. + public IList QuestionTypes { get; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/SimpleQnAFineTuningQuestionType.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/SimpleQnAFineTuningQuestionType.cs new file mode 100644 index 000000000000..830466fa8643 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/SimpleQnAFineTuningQuestionType.cs @@ -0,0 +1,67 @@ +// + +#nullable disable + +using System; +using System.ComponentModel; + +namespace Azure.AI.Projects +{ + /// The supported question types for SimpleQnA data generation jobs used for fine-tuning scenarios. + public readonly partial struct SimpleQnAFineTuningQuestionType : IEquatable + { + private readonly string _value; + /// Short answer question type. + private const string ShortAnswerValue = "short_answer"; + /// Long answer question type. + private const string LongAnswerValue = "long_answer"; + + /// Initializes a new instance of . + /// The value. + /// is null. + public SimpleQnAFineTuningQuestionType(string value) + { + Argument.AssertNotNull(value, nameof(value)); + + _value = value; + } + + /// Short answer question type. + public static SimpleQnAFineTuningQuestionType ShortAnswer { get; } = new SimpleQnAFineTuningQuestionType(ShortAnswerValue); + + /// Long answer question type. + public static SimpleQnAFineTuningQuestionType LongAnswer { get; } = new SimpleQnAFineTuningQuestionType(LongAnswerValue); + + /// Determines if two values are the same. + /// The left value to compare. + /// The right value to compare. + public static bool operator ==(SimpleQnAFineTuningQuestionType left, SimpleQnAFineTuningQuestionType right) => left.Equals(right); + + /// Determines if two values are not the same. + /// The left value to compare. + /// The right value to compare. + public static bool operator !=(SimpleQnAFineTuningQuestionType left, SimpleQnAFineTuningQuestionType right) => !left.Equals(right); + + /// Converts a string to a . + /// The value. + public static implicit operator SimpleQnAFineTuningQuestionType(string value) => new SimpleQnAFineTuningQuestionType(value); + + /// Converts a string to a . + /// The value. + public static implicit operator SimpleQnAFineTuningQuestionType?(string value) => value == null ? null : new SimpleQnAFineTuningQuestionType(value); + + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public override bool Equals(object obj) => obj is SimpleQnAFineTuningQuestionType other && Equals(other); + + /// + public bool Equals(SimpleQnAFineTuningQuestionType 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/Models/SkillReferenceParam.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/SkillReferenceParam.cs index 4b4c25b34a04..ede4df25017f 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/SkillReferenceParam.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/SkillReferenceParam.cs @@ -32,7 +32,7 @@ internal SkillReferenceParam(ContainerSkillType @type, IDictionary The ID of the referenced skill. - public string SkillId { get; } + public string SkillId { get; set; } /// Optional skill version. Use a positive integer or 'latest'. Omit for default. public string Version { get; set; } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/StructuredOutputDefinition.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/StructuredOutputDefinition.cs index 9a5b219ac51f..60ef1753557e 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/StructuredOutputDefinition.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/StructuredOutputDefinition.cs @@ -48,10 +48,10 @@ internal StructuredOutputDefinition(string name, string description, IDictionary } /// The name of the structured output. - public string Name { get; } + public string Name { get; set; } /// A description of the output to emit. Used by the model to determine when to emit the output. - public string Description { get; } + public string Description { get; set; } /// /// The JSON schema for the structured output. @@ -82,6 +82,6 @@ internal StructuredOutputDefinition(string name, string description, IDictionary public IDictionary Schema { get; } /// Whether to enforce strict validation. Default `true`. - public bool? Strict { get; } + public bool? Strict { get; set; } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/TimerRoutineTrigger.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/TimerRoutineTrigger.Serialization.cs new file mode 100644 index 000000000000..a142a0695765 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/TimerRoutineTrigger.Serialization.cs @@ -0,0 +1,142 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.AI.Projects +{ + /// A one-shot timer routine trigger. + public partial class TimerRoutineTrigger : RoutineTrigger, IJsonModel + { + /// Initializes a new instance of for deserialization. + internal TimerRoutineTrigger() + { + } + + /// The data to parse. + /// The client options for reading and writing models. + protected override RoutineTrigger PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeTimerRoutineTrigger(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TimerRoutineTrigger)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(TimerRoutineTrigger)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + TimerRoutineTrigger IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (TimerRoutineTrigger)PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TimerRoutineTrigger)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + writer.WritePropertyName("at"u8); + writer.WriteStringValue(At); + if (Optional.IsDefined(TimeZone)) + { + writer.WritePropertyName("time_zone"u8); + writer.WriteStringValue(TimeZone); + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + TimerRoutineTrigger IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (TimerRoutineTrigger)JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected override RoutineTrigger JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TimerRoutineTrigger)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTimerRoutineTrigger(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static TimerRoutineTrigger DeserializeTimerRoutineTrigger(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + RoutineTriggerType @type = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + string at = default; + string timeZone = default; + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("type"u8)) + { + @type = new RoutineTriggerType(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("at"u8)) + { + at = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("time_zone"u8)) + { + timeZone = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new TimerRoutineTrigger(@type, additionalBinaryDataProperties, at, timeZone); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/TimerRoutineTrigger.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/TimerRoutineTrigger.cs new file mode 100644 index 000000000000..21b7b9517bc1 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/TimerRoutineTrigger.cs @@ -0,0 +1,40 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + /// A one-shot timer routine trigger. + public partial class TimerRoutineTrigger : RoutineTrigger + { + /// Initializes a new instance of . + /// A future timer expression. Supported values include an ISO-8601 timestamp with an explicit offset, a local timestamp paired with time_zone, or a positive duration from now. + /// is null. + public TimerRoutineTrigger(string at) : base(RoutineTriggerType.Timer) + { + Argument.AssertNotNull(at, nameof(at)); + + At = at; + } + + /// Initializes a new instance of . + /// The trigger type. + /// Keeps track of any properties unknown to the library. + /// A future timer expression. Supported values include an ISO-8601 timestamp with an explicit offset, a local timestamp paired with time_zone, or a positive duration from now. + /// An optional IANA or Windows time zone identifier when the timer uses a local timestamp. + internal TimerRoutineTrigger(RoutineTriggerType @type, IDictionary additionalBinaryDataProperties, string at, string timeZone) : base(@type, additionalBinaryDataProperties) + { + At = at; + TimeZone = timeZone; + } + + /// A future timer expression. Supported values include an ISO-8601 timestamp with an explicit offset, a local timestamp paired with time_zone, or a positive duration from now. + public string At { get; set; } + + /// An optional IANA or Windows time zone identifier when the timer uses a local timestamp. + public string TimeZone { get; set; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/ToolConfig.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/ToolConfig.Serialization.cs new file mode 100644 index 000000000000..fef74102d841 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/ToolConfig.Serialization.cs @@ -0,0 +1,152 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.AI.Projects +{ + /// Per-tool configuration that controls tool visibility and search behavior. + internal partial class ToolConfig : IJsonModel + { + /// The data to parse. + /// The client options for reading and writing models. + protected virtual ToolConfig PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeToolConfig(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ToolConfig)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected virtual BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(ToolConfig)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + ToolConfig IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected virtual void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ToolConfig)} does not support writing '{format}' format."); + } + if (Optional.IsDefined(Pin)) + { + writer.WritePropertyName("pin"u8); + writer.WriteBooleanValue(Pin.Value); + } + if (Optional.IsDefined(AdditionalSearchText)) + { + writer.WritePropertyName("additional_search_text"u8); + writer.WriteStringValue(AdditionalSearchText); + } + if (options.Format != "W" && _additionalBinaryDataProperties != null) + { + foreach (var item in _additionalBinaryDataProperties) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + ToolConfig IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected virtual ToolConfig JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ToolConfig)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeToolConfig(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static ToolConfig DeserializeToolConfig(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + bool? pin = default; + string additionalSearchText = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("pin"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + pin = prop.Value.GetBoolean(); + continue; + } + if (prop.NameEquals("additional_search_text"u8)) + { + additionalSearchText = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new ToolConfig(pin, additionalSearchText, additionalBinaryDataProperties); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/ToolConfig.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/ToolConfig.cs new file mode 100644 index 000000000000..fb78e3555a31 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/ToolConfig.cs @@ -0,0 +1,50 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + /// Per-tool configuration that controls tool visibility and search behavior. + internal partial class ToolConfig + { + /// Keeps track of any properties unknown to the library. + private protected readonly IDictionary _additionalBinaryDataProperties; + + /// Initializes a new instance of . + public ToolConfig() + { + } + + /// Initializes a new instance of . + /// + /// When true, the tool is always included in agent context and visible in `tools/list`. + /// When false (default), the tool is hidden from `tools/list` and only discoverable via `tool_search`. + /// + /// + /// Additional text indexed for tool_search. Supplements the native tool description + /// to improve discoverability. Does not alter `tools/list` output. + /// + /// Keeps track of any properties unknown to the library. + internal ToolConfig(bool? pin, string additionalSearchText, IDictionary additionalBinaryDataProperties) + { + Pin = pin; + AdditionalSearchText = additionalSearchText; + _additionalBinaryDataProperties = additionalBinaryDataProperties; + } + + /// + /// When true, the tool is always included in agent context and visible in `tools/list`. + /// When false (default), the tool is hidden from `tools/list` and only discoverable via `tool_search`. + /// + public bool? Pin { get; set; } + + /// + /// Additional text indexed for tool_search. Supplements the native tool description + /// to improve discoverability. Does not alter `tools/list` output. + /// + public string AdditionalSearchText { get; set; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/ToolProjectConnection.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/ToolProjectConnection.cs index b17f66487f9d..18fc5e5f43ae 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/ToolProjectConnection.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/ToolProjectConnection.cs @@ -33,6 +33,6 @@ internal ToolProjectConnection(string projectConnectionId, IDictionary A project connection in a ToolProjectConnectionList attached to this tool. - public string ProjectConnectionId { get; } + public string ProjectConnectionId { get; set; } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/ToolUseFineTuningDataGenerationJobOptions.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/ToolUseFineTuningDataGenerationJobOptions.Serialization.cs new file mode 100644 index 000000000000..350ae77c314f --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/ToolUseFineTuningDataGenerationJobOptions.Serialization.cs @@ -0,0 +1,149 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.AI.Projects +{ + /// The options for a data generation job with ToolUse type. Used only for fine-tuning scenarios. + public partial class ToolUseFineTuningDataGenerationJobOptions : DataGenerationJobOptions, IJsonModel + { + /// Initializes a new instance of for deserialization. + internal ToolUseFineTuningDataGenerationJobOptions() + { + } + + /// The data to parse. + /// The client options for reading and writing models. + protected override DataGenerationJobOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeToolUseFineTuningDataGenerationJobOptions(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ToolUseFineTuningDataGenerationJobOptions)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(ToolUseFineTuningDataGenerationJobOptions)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + ToolUseFineTuningDataGenerationJobOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (ToolUseFineTuningDataGenerationJobOptions)PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ToolUseFineTuningDataGenerationJobOptions)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + } + + /// The JSON reader. + /// The client options for reading and writing models. + ToolUseFineTuningDataGenerationJobOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (ToolUseFineTuningDataGenerationJobOptions)JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected override DataGenerationJobOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ToolUseFineTuningDataGenerationJobOptions)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeToolUseFineTuningDataGenerationJobOptions(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static ToolUseFineTuningDataGenerationJobOptions DeserializeToolUseFineTuningDataGenerationJobOptions(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DataGenerationJobKind @type = default; + int maxSamples = default; + float? trainSplit = default; + DataGenerationModelOptions modelOptions = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("type"u8)) + { + @type = new DataGenerationJobKind(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("max_samples"u8)) + { + maxSamples = prop.Value.GetInt32(); + continue; + } + if (prop.NameEquals("train_split"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + trainSplit = prop.Value.GetSingle(); + continue; + } + if (prop.NameEquals("model_options"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + modelOptions = DataGenerationModelOptions.DeserializeDataGenerationModelOptions(prop.Value, options); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new ToolUseFineTuningDataGenerationJobOptions(@type, maxSamples, trainSplit, modelOptions, additionalBinaryDataProperties); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/ToolUseFineTuningDataGenerationJobOptions.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/ToolUseFineTuningDataGenerationJobOptions.cs new file mode 100644 index 000000000000..408d9405c0f2 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/ToolUseFineTuningDataGenerationJobOptions.cs @@ -0,0 +1,29 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + /// The options for a data generation job with ToolUse type. Used only for fine-tuning scenarios. + public partial class ToolUseFineTuningDataGenerationJobOptions : DataGenerationJobOptions + { + /// Initializes a new instance of . + /// Maximum number of samples to generate. + public ToolUseFineTuningDataGenerationJobOptions(int maxSamples) : base(DataGenerationJobKind.ToolUse, maxSamples) + { + } + + /// Initializes a new instance of . + /// The data generation job type. + /// Maximum number of samples to generate. + /// The proportion of the generated data to be used for training when the data is used for fine-tuning. The rest will be used for validation. Value should be between 0 and 1. + /// The LLM model options. + /// Keeps track of any properties unknown to the library. + internal ToolUseFineTuningDataGenerationJobOptions(DataGenerationJobKind @type, int maxSamples, float? trainSplit, DataGenerationModelOptions modelOptions, IDictionary additionalBinaryDataProperties) : base(@type, maxSamples, trainSplit, modelOptions, additionalBinaryDataProperties) + { + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/ToolboxSearchPreviewTool.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/ToolboxSearchPreviewTool.Serialization.cs index ec489c0c0cb5..6107ce308a35 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/ToolboxSearchPreviewTool.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/ToolboxSearchPreviewTool.Serialization.cs @@ -85,6 +85,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsCollectionDefined(ToolConfigs)) + { + writer.WritePropertyName("tool_configs"u8); + writer.WriteStartObject(); + foreach (var item in ToolConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } } /// The JSON reader. @@ -116,6 +127,7 @@ internal static ToolboxSearchPreviewTool DeserializeToolboxSearchPreviewTool(Jso IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); string name = default; string description = default; + IDictionary toolConfigs = default; foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("type"u8)) @@ -133,12 +145,26 @@ internal static ToolboxSearchPreviewTool DeserializeToolboxSearchPreviewTool(Jso description = prop.Value.GetString(); continue; } + if (prop.NameEquals("tool_configs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, ToolConfig.DeserializeToolConfig(prop0.Value, options)); + } + toolConfigs = dictionary; + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new ToolboxSearchPreviewTool(@type, additionalBinaryDataProperties, name, description); + return new ToolboxSearchPreviewTool(@type, additionalBinaryDataProperties, name, description, toolConfigs ?? new ChangeTrackingDictionary()); } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/ToolboxSearchPreviewTool.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/ToolboxSearchPreviewTool.cs index 7944b3a9e6bc..ced8c62e765b 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/ToolboxSearchPreviewTool.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/ToolboxSearchPreviewTool.cs @@ -17,6 +17,7 @@ internal partial class ToolboxSearchPreviewTool : InternalTool /// Initializes a new instance of . public ToolboxSearchPreviewTool() : base(ToolType.ToolboxSearchPreview) { + ToolConfigs = new ChangeTrackingDictionary(); } /// Initializes a new instance of . @@ -24,10 +25,16 @@ public ToolboxSearchPreviewTool() : base(ToolType.ToolboxSearchPreview) /// Keeps track of any properties unknown to the library. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. - internal ToolboxSearchPreviewTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description) : base(@type, additionalBinaryDataProperties) + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + internal ToolboxSearchPreviewTool(ToolType @type, IDictionary additionalBinaryDataProperties, string name, string description, IDictionary toolConfigs) : base(@type, additionalBinaryDataProperties) { Name = name; Description = description; + ToolConfigs = toolConfigs; } /// Optional user-defined name for this tool or configuration. @@ -35,5 +42,12 @@ internal ToolboxSearchPreviewTool(ToolType @type, IDictionary Optional user-defined description for this tool or configuration. public string Description { get; set; } + + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + public IDictionary ToolConfigs { get; } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/TracesDataGenerationJobOptions.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/TracesDataGenerationJobOptions.Serialization.cs new file mode 100644 index 000000000000..d23ce31ef686 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/TracesDataGenerationJobOptions.Serialization.cs @@ -0,0 +1,149 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.AI.Projects +{ + /// The options for a data generation job with Traces type. + public partial class TracesDataGenerationJobOptions : DataGenerationJobOptions, IJsonModel + { + /// Initializes a new instance of for deserialization. + internal TracesDataGenerationJobOptions() + { + } + + /// The data to parse. + /// The client options for reading and writing models. + protected override DataGenerationJobOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeTracesDataGenerationJobOptions(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TracesDataGenerationJobOptions)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(TracesDataGenerationJobOptions)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + TracesDataGenerationJobOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (TracesDataGenerationJobOptions)PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TracesDataGenerationJobOptions)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + } + + /// The JSON reader. + /// The client options for reading and writing models. + TracesDataGenerationJobOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (TracesDataGenerationJobOptions)JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected override DataGenerationJobOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TracesDataGenerationJobOptions)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTracesDataGenerationJobOptions(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static TracesDataGenerationJobOptions DeserializeTracesDataGenerationJobOptions(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DataGenerationJobKind @type = default; + int maxSamples = default; + float? trainSplit = default; + DataGenerationModelOptions modelOptions = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("type"u8)) + { + @type = new DataGenerationJobKind(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("max_samples"u8)) + { + maxSamples = prop.Value.GetInt32(); + continue; + } + if (prop.NameEquals("train_split"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + trainSplit = prop.Value.GetSingle(); + continue; + } + if (prop.NameEquals("model_options"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + modelOptions = DataGenerationModelOptions.DeserializeDataGenerationModelOptions(prop.Value, options); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new TracesDataGenerationJobOptions(@type, maxSamples, trainSplit, modelOptions, additionalBinaryDataProperties); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/TracesDataGenerationJobOptions.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/TracesDataGenerationJobOptions.cs new file mode 100644 index 000000000000..330ddd2bd046 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/TracesDataGenerationJobOptions.cs @@ -0,0 +1,29 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + /// The options for a data generation job with Traces type. + public partial class TracesDataGenerationJobOptions : DataGenerationJobOptions + { + /// Initializes a new instance of . + /// Maximum number of samples to generate. + public TracesDataGenerationJobOptions(int maxSamples) : base(DataGenerationJobKind.Traces, maxSamples) + { + } + + /// Initializes a new instance of . + /// The data generation job type. + /// Maximum number of samples to generate. + /// The proportion of the generated data to be used for training when the data is used for fine-tuning. The rest will be used for validation. Value should be between 0 and 1. + /// The LLM model options. + /// Keeps track of any properties unknown to the library. + internal TracesDataGenerationJobOptions(DataGenerationJobKind @type, int maxSamples, float? trainSplit, DataGenerationModelOptions modelOptions, IDictionary additionalBinaryDataProperties) : base(@type, maxSamples, trainSplit, modelOptions, additionalBinaryDataProperties) + { + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/TracesDataGenerationJobSource.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/TracesDataGenerationJobSource.Serialization.cs new file mode 100644 index 000000000000..e24d045f070d --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/TracesDataGenerationJobSource.Serialization.cs @@ -0,0 +1,198 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.AI.Projects +{ + /// Traces source for data generation jobs — conversation traces from Application Insights. + public partial class TracesDataGenerationJobSource : DataGenerationJobSource, IJsonModel + { + /// Initializes a new instance of for deserialization. + internal TracesDataGenerationJobSource() + { + } + + /// The data to parse. + /// The client options for reading and writing models. + protected override DataGenerationJobSource PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeTracesDataGenerationJobSource(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TracesDataGenerationJobSource)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(TracesDataGenerationJobSource)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + TracesDataGenerationJobSource IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (TracesDataGenerationJobSource)PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TracesDataGenerationJobSource)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (Optional.IsDefined(AgentId)) + { + writer.WritePropertyName("agent_id"u8); + writer.WriteStringValue(AgentId); + } + if (Optional.IsDefined(AgentName)) + { + writer.WritePropertyName("agent_name"u8); + writer.WriteStringValue(AgentName); + } + if (Optional.IsDefined(AgentVersion)) + { + writer.WritePropertyName("agent_version"u8); + writer.WriteStringValue(AgentVersion); + } + writer.WritePropertyName("start_time"u8); + writer.WriteNumberValue(StartTime, "U"); + if (Optional.IsDefined(EndTime)) + { + writer.WritePropertyName("end_time"u8); + writer.WriteNumberValue(EndTime.Value, "U"); + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + TracesDataGenerationJobSource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (TracesDataGenerationJobSource)JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected override DataGenerationJobSource JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TracesDataGenerationJobSource)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTracesDataGenerationJobSource(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static TracesDataGenerationJobSource DeserializeTracesDataGenerationJobSource(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DataGenerationJobSourceType @type = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + string description = default; + string agentId = default; + string agentName = default; + string agentVersion = default; + DateTimeOffset startTime = default; + DateTimeOffset? endTime = default; + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("type"u8)) + { + @type = new DataGenerationJobSourceType(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("description"u8)) + { + description = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("agent_id"u8)) + { + agentId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("agent_name"u8)) + { + agentName = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("agent_version"u8)) + { + agentVersion = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("start_time"u8)) + { + startTime = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); + continue; + } + if (prop.NameEquals("end_time"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endTime = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new TracesDataGenerationJobSource( + @type, + additionalBinaryDataProperties, + description, + agentId, + agentName, + agentVersion, + startTime, + endTime); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/TracesDataGenerationJobSource.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/TracesDataGenerationJobSource.cs new file mode 100644 index 000000000000..72ad32bab0d4 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/TracesDataGenerationJobSource.cs @@ -0,0 +1,56 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + /// Traces source for data generation jobs — conversation traces from Application Insights. + public partial class TracesDataGenerationJobSource : DataGenerationJobSource + { + /// Initializes a new instance of . + /// Start of the time window (Unix timestamp in seconds) for fetching traces. + public TracesDataGenerationJobSource(DateTimeOffset startTime) : base(DataGenerationJobSourceType.Traces) + { + StartTime = startTime; + } + + /// Initializes a new instance of . + /// The type of source. + /// Keeps track of any properties unknown to the library. + /// Optional description of what this source represents — helps the pipeline interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities'). + /// The unique agent ID used to filter traces. Provide either `agent_id` or `agent_name` — at least one is required. + /// The agent name to fetch traces for. Provide either `agent_id` or `agent_name` — at least one is required. + /// The agent version. If not specified, traces for ALL versions of the agent are included within the time window. + /// Start of the time window (Unix timestamp in seconds) for fetching traces. + /// End of the time window (Unix timestamp in seconds). Defaults to current time. + internal TracesDataGenerationJobSource(DataGenerationJobSourceType @type, IDictionary additionalBinaryDataProperties, string description, string agentId, string agentName, string agentVersion, DateTimeOffset startTime, DateTimeOffset? endTime) : base(@type, description, additionalBinaryDataProperties) + { + AgentId = agentId; + AgentName = agentName; + AgentVersion = agentVersion; + StartTime = startTime; + EndTime = endTime; + } + + /// Optional description of what this source represents — helps the pipeline interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities'). + public override string Description { get; set; } + + /// The unique agent ID used to filter traces. Provide either `agent_id` or `agent_name` — at least one is required. + public string AgentId { get; set; } + + /// The agent name to fetch traces for. Provide either `agent_id` or `agent_name` — at least one is required. + public string AgentName { get; set; } + + /// The agent version. If not specified, traces for ALL versions of the agent are included within the time window. + public string AgentVersion { get; set; } + + /// Start of the time window (Unix timestamp in seconds) for fetching traces. + public DateTimeOffset StartTime { get; set; } + + /// End of the time window (Unix timestamp in seconds). Defaults to current time. + public DateTimeOffset? EndTime { get; set; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/TracesEvaluatorGenerationJobSource.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/TracesEvaluatorGenerationJobSource.Serialization.cs new file mode 100644 index 000000000000..88ddecf3391e --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/TracesEvaluatorGenerationJobSource.Serialization.cs @@ -0,0 +1,198 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.AI.Projects +{ + /// Traces source for evaluator generation jobs — conversation traces from Application Insights. + public partial class TracesEvaluatorGenerationJobSource : EvaluatorGenerationJobSource, IJsonModel + { + /// Initializes a new instance of for deserialization. + internal TracesEvaluatorGenerationJobSource() + { + } + + /// The data to parse. + /// The client options for reading and writing models. + protected override EvaluatorGenerationJobSource PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeTracesEvaluatorGenerationJobSource(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(TracesEvaluatorGenerationJobSource)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(TracesEvaluatorGenerationJobSource)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + TracesEvaluatorGenerationJobSource IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => (TracesEvaluatorGenerationJobSource)PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TracesEvaluatorGenerationJobSource)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + if (Optional.IsDefined(Description)) + { + writer.WritePropertyName("description"u8); + writer.WriteStringValue(Description); + } + if (Optional.IsDefined(AgentId)) + { + writer.WritePropertyName("agent_id"u8); + writer.WriteStringValue(AgentId); + } + if (Optional.IsDefined(AgentName)) + { + writer.WritePropertyName("agent_name"u8); + writer.WriteStringValue(AgentName); + } + if (Optional.IsDefined(AgentVersion)) + { + writer.WritePropertyName("agent_version"u8); + writer.WriteStringValue(AgentVersion); + } + writer.WritePropertyName("start_time"u8); + writer.WriteNumberValue(StartTime, "U"); + if (Optional.IsDefined(EndTime)) + { + writer.WritePropertyName("end_time"u8); + writer.WriteNumberValue(EndTime.Value, "U"); + } + } + + /// The JSON reader. + /// The client options for reading and writing models. + TracesEvaluatorGenerationJobSource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => (TracesEvaluatorGenerationJobSource)JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected override EvaluatorGenerationJobSource JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(TracesEvaluatorGenerationJobSource)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeTracesEvaluatorGenerationJobSource(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static TracesEvaluatorGenerationJobSource DeserializeTracesEvaluatorGenerationJobSource(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EvaluatorGenerationJobSourceType @type = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + string description = default; + string agentId = default; + string agentName = default; + string agentVersion = default; + DateTimeOffset startTime = default; + DateTimeOffset? endTime = default; + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("type"u8)) + { + @type = new EvaluatorGenerationJobSourceType(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("description"u8)) + { + description = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("agent_id"u8)) + { + agentId = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("agent_name"u8)) + { + agentName = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("agent_version"u8)) + { + agentVersion = prop.Value.GetString(); + continue; + } + if (prop.NameEquals("start_time"u8)) + { + startTime = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); + continue; + } + if (prop.NameEquals("end_time"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + endTime = DateTimeOffset.FromUnixTimeSeconds(prop.Value.GetInt64()); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new TracesEvaluatorGenerationJobSource( + @type, + additionalBinaryDataProperties, + description, + agentId, + agentName, + agentVersion, + startTime, + endTime); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/TracesEvaluatorGenerationJobSource.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/TracesEvaluatorGenerationJobSource.cs new file mode 100644 index 000000000000..0a3493f726de --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/TracesEvaluatorGenerationJobSource.cs @@ -0,0 +1,57 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + /// Traces source for evaluator generation jobs — conversation traces from Application Insights. + public partial class TracesEvaluatorGenerationJobSource : EvaluatorGenerationJobSource + { + /// Initializes a new instance of . + /// Start of the time window (Unix timestamp in seconds) for fetching traces. + public TracesEvaluatorGenerationJobSource(DateTimeOffset startTime) : base(EvaluatorGenerationJobSourceType.Traces) + { + StartTime = startTime; + } + + /// Initializes a new instance of . + /// The type of source. + /// Keeps track of any properties unknown to the library. + /// Optional description of what this source represents — helps the pipeline interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities'). + /// The unique agent ID used to filter traces. Provide either `agent_id` or `agent_name` — at least one is required. + /// The agent name to fetch traces for. Provide either `agent_id` or `agent_name` — at least one is required. + /// The agent version. If not specified, traces for ALL versions of the agent are included within the time window. + /// Start of the time window (Unix timestamp in seconds) for fetching traces. + /// End of the time window (Unix timestamp in seconds). Defaults to current time. + internal TracesEvaluatorGenerationJobSource(EvaluatorGenerationJobSourceType @type, IDictionary additionalBinaryDataProperties, string description, string agentId, string agentName, string agentVersion, DateTimeOffset startTime, DateTimeOffset? endTime) : base(@type, additionalBinaryDataProperties) + { + Description = description; + AgentId = agentId; + AgentName = agentName; + AgentVersion = agentVersion; + StartTime = startTime; + EndTime = endTime; + } + + /// Optional description of what this source represents — helps the pipeline interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities'). + public string Description { get; set; } + + /// The unique agent ID used to filter traces. Provide either `agent_id` or `agent_name` — at least one is required. + public string AgentId { get; set; } + + /// The agent name to fetch traces for. Provide either `agent_id` or `agent_name` — at least one is required. + public string AgentName { get; set; } + + /// The agent version. If not specified, traces for ALL versions of the agent are included within the time window. + public string AgentVersion { get; set; } + + /// Start of the time window (Unix timestamp in seconds) for fetching traces. + public DateTimeOffset StartTime { get; set; } + + /// End of the time window (Unix timestamp in seconds). Defaults to current time. + public DateTimeOffset? EndTime { get; set; } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/UnknownDataGenerationJobOptions.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/UnknownDataGenerationJobOptions.Serialization.cs new file mode 100644 index 000000000000..ec457ce55712 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/UnknownDataGenerationJobOptions.Serialization.cs @@ -0,0 +1,148 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.AI.Projects +{ + internal partial class UnknownDataGenerationJobOptions : DataGenerationJobOptions, IJsonModel + { + /// Initializes a new instance of for deserialization. + internal UnknownDataGenerationJobOptions() + { + } + + /// The data to parse. + /// The client options for reading and writing models. + protected override DataGenerationJobOptions PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeDataGenerationJobOptions(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataGenerationJobOptions)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(DataGenerationJobOptions)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + DataGenerationJobOptions IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataGenerationJobOptions)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + } + + /// The JSON reader. + /// The client options for reading and writing models. + DataGenerationJobOptions IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected override DataGenerationJobOptions JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataGenerationJobOptions)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataGenerationJobOptions(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static UnknownDataGenerationJobOptions DeserializeUnknownDataGenerationJobOptions(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DataGenerationJobKind @type = default; + int maxSamples = default; + float? trainSplit = default; + DataGenerationModelOptions modelOptions = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("type"u8)) + { + @type = new DataGenerationJobKind(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("max_samples"u8)) + { + maxSamples = prop.Value.GetInt32(); + continue; + } + if (prop.NameEquals("train_split"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + trainSplit = prop.Value.GetSingle(); + continue; + } + if (prop.NameEquals("model_options"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + modelOptions = DataGenerationModelOptions.DeserializeDataGenerationModelOptions(prop.Value, options); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new UnknownDataGenerationJobOptions(@type, maxSamples, trainSplit, modelOptions, additionalBinaryDataProperties); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/UnknownDataGenerationJobOptions.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/UnknownDataGenerationJobOptions.cs new file mode 100644 index 000000000000..ba85bc111c0b --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/UnknownDataGenerationJobOptions.cs @@ -0,0 +1,22 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + internal partial class UnknownDataGenerationJobOptions : DataGenerationJobOptions + { + /// Initializes a new instance of . + /// The data generation job type. + /// Maximum number of samples to generate. + /// The proportion of the generated data to be used for training when the data is used for fine-tuning. The rest will be used for validation. Value should be between 0 and 1. + /// The LLM model options. + /// Keeps track of any properties unknown to the library. + internal UnknownDataGenerationJobOptions(DataGenerationJobKind @type, int maxSamples, float? trainSplit, DataGenerationModelOptions modelOptions, IDictionary additionalBinaryDataProperties) : base(@type != default ? @type : "unknown", maxSamples, trainSplit, modelOptions, additionalBinaryDataProperties) + { + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/UnknownDataGenerationJobOutput.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/UnknownDataGenerationJobOutput.Serialization.cs new file mode 100644 index 000000000000..f541a2bcc055 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/UnknownDataGenerationJobOutput.Serialization.cs @@ -0,0 +1,122 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.AI.Projects +{ + internal partial class UnknownDataGenerationJobOutput : DataGenerationJobOutput, IJsonModel + { + /// Initializes a new instance of for deserialization. + internal UnknownDataGenerationJobOutput() + { + } + + /// The data to parse. + /// The client options for reading and writing models. + protected override DataGenerationJobOutput PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeDataGenerationJobOutput(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataGenerationJobOutput)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(DataGenerationJobOutput)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + DataGenerationJobOutput IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataGenerationJobOutput)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + } + + /// The JSON reader. + /// The client options for reading and writing models. + DataGenerationJobOutput IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected override DataGenerationJobOutput JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataGenerationJobOutput)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataGenerationJobOutput(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static UnknownDataGenerationJobOutput DeserializeUnknownDataGenerationJobOutput(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DataGenerationJobOutputType @type = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("type"u8)) + { + @type = new DataGenerationJobOutputType(prop.Value.GetString()); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new UnknownDataGenerationJobOutput(@type, additionalBinaryDataProperties); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/UnknownDataGenerationJobOutput.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/UnknownDataGenerationJobOutput.cs new file mode 100644 index 000000000000..9ac55a6e240c --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/UnknownDataGenerationJobOutput.cs @@ -0,0 +1,19 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + internal partial class UnknownDataGenerationJobOutput : DataGenerationJobOutput + { + /// Initializes a new instance of . + /// The type of the output. + /// Keeps track of any properties unknown to the library. + internal UnknownDataGenerationJobOutput(DataGenerationJobOutputType @type, IDictionary additionalBinaryDataProperties) : base(@type != default ? @type : "unknown", additionalBinaryDataProperties) + { + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/UnknownDataGenerationJobSource.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/UnknownDataGenerationJobSource.Serialization.cs new file mode 100644 index 000000000000..9b8ae7479006 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/UnknownDataGenerationJobSource.Serialization.cs @@ -0,0 +1,128 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.AI.Projects +{ + internal partial class UnknownDataGenerationJobSource : DataGenerationJobSource, IJsonModel + { + /// Initializes a new instance of for deserialization. + internal UnknownDataGenerationJobSource() + { + } + + /// The data to parse. + /// The client options for reading and writing models. + protected override DataGenerationJobSource PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeDataGenerationJobSource(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(DataGenerationJobSource)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(DataGenerationJobSource)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + DataGenerationJobSource IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataGenerationJobSource)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + } + + /// The JSON reader. + /// The client options for reading and writing models. + DataGenerationJobSource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected override DataGenerationJobSource JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(DataGenerationJobSource)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeDataGenerationJobSource(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static UnknownDataGenerationJobSource DeserializeUnknownDataGenerationJobSource(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + DataGenerationJobSourceType @type = default; + string description = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("type"u8)) + { + @type = new DataGenerationJobSourceType(prop.Value.GetString()); + continue; + } + if (prop.NameEquals("description"u8)) + { + description = prop.Value.GetString(); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new UnknownDataGenerationJobSource(@type, description, additionalBinaryDataProperties); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/UnknownDataGenerationJobSource.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/UnknownDataGenerationJobSource.cs new file mode 100644 index 000000000000..278424490eb1 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/UnknownDataGenerationJobSource.cs @@ -0,0 +1,20 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + internal partial class UnknownDataGenerationJobSource : DataGenerationJobSource + { + /// Initializes a new instance of . + /// The type of source. + /// Optional description of what this source represents — helps the pipeline interpret its content (e.g., 'Company refund policy document' or 'Describes the agent's core capabilities'). + /// Keeps track of any properties unknown to the library. + internal UnknownDataGenerationJobSource(DataGenerationJobSourceType @type, string description, IDictionary additionalBinaryDataProperties) : base(@type != default ? @type : "unknown", description, additionalBinaryDataProperties) + { + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/UnknownEvaluatorGenerationJobSource.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/UnknownEvaluatorGenerationJobSource.Serialization.cs new file mode 100644 index 000000000000..319c6342bc89 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/UnknownEvaluatorGenerationJobSource.Serialization.cs @@ -0,0 +1,122 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.AI.Projects +{ + internal partial class UnknownEvaluatorGenerationJobSource : EvaluatorGenerationJobSource, IJsonModel + { + /// Initializes a new instance of for deserialization. + internal UnknownEvaluatorGenerationJobSource() + { + } + + /// The data to parse. + /// The client options for reading and writing models. + protected override EvaluatorGenerationJobSource PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeEvaluatorGenerationJobSource(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(EvaluatorGenerationJobSource)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(EvaluatorGenerationJobSource)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + EvaluatorGenerationJobSource IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EvaluatorGenerationJobSource)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + } + + /// The JSON reader. + /// The client options for reading and writing models. + EvaluatorGenerationJobSource IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected override EvaluatorGenerationJobSource JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(EvaluatorGenerationJobSource)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeEvaluatorGenerationJobSource(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static UnknownEvaluatorGenerationJobSource DeserializeUnknownEvaluatorGenerationJobSource(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + EvaluatorGenerationJobSourceType @type = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("type"u8)) + { + @type = new EvaluatorGenerationJobSourceType(prop.Value.GetString()); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new UnknownEvaluatorGenerationJobSource(@type, additionalBinaryDataProperties); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/UnknownEvaluatorGenerationJobSource.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/UnknownEvaluatorGenerationJobSource.cs new file mode 100644 index 000000000000..7586931c90cf --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/UnknownEvaluatorGenerationJobSource.cs @@ -0,0 +1,19 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + internal partial class UnknownEvaluatorGenerationJobSource : EvaluatorGenerationJobSource + { + /// Initializes a new instance of . + /// The type of source. + /// Keeps track of any properties unknown to the library. + internal UnknownEvaluatorGenerationJobSource(EvaluatorGenerationJobSourceType @type, IDictionary additionalBinaryDataProperties) : base(@type != default ? @type : "unknown", additionalBinaryDataProperties) + { + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/UnknownRoutineAction.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/UnknownRoutineAction.Serialization.cs new file mode 100644 index 000000000000..adc4fd3f24a0 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/UnknownRoutineAction.Serialization.cs @@ -0,0 +1,122 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.AI.Projects +{ + internal partial class UnknownRoutineAction : RoutineAction, IJsonModel + { + /// Initializes a new instance of for deserialization. + internal UnknownRoutineAction() + { + } + + /// The data to parse. + /// The client options for reading and writing models. + protected override RoutineAction PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeRoutineAction(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RoutineAction)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(RoutineAction)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + RoutineAction IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RoutineAction)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + } + + /// The JSON reader. + /// The client options for reading and writing models. + RoutineAction IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected override RoutineAction JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RoutineAction)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRoutineAction(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static UnknownRoutineAction DeserializeUnknownRoutineAction(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + RoutineActionType @type = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("type"u8)) + { + @type = new RoutineActionType(prop.Value.GetString()); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new UnknownRoutineAction(@type, additionalBinaryDataProperties); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/UnknownRoutineAction.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/UnknownRoutineAction.cs new file mode 100644 index 000000000000..0baca57d7e6b --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/UnknownRoutineAction.cs @@ -0,0 +1,19 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + internal partial class UnknownRoutineAction : RoutineAction + { + /// Initializes a new instance of . + /// The action type. + /// Keeps track of any properties unknown to the library. + internal UnknownRoutineAction(RoutineActionType @type, IDictionary additionalBinaryDataProperties) : base(@type != default ? @type : "unknown", additionalBinaryDataProperties) + { + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/UnknownRoutineDispatchPayload.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/UnknownRoutineDispatchPayload.Serialization.cs new file mode 100644 index 000000000000..6e9de9501c79 --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/UnknownRoutineDispatchPayload.Serialization.cs @@ -0,0 +1,122 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.AI.Projects +{ + internal partial class UnknownRoutineDispatchPayload : RoutineDispatchPayload, IJsonModel + { + /// Initializes a new instance of for deserialization. + internal UnknownRoutineDispatchPayload() + { + } + + /// The data to parse. + /// The client options for reading and writing models. + protected override RoutineDispatchPayload PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeRoutineDispatchPayload(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RoutineDispatchPayload)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(RoutineDispatchPayload)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + RoutineDispatchPayload IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RoutineDispatchPayload)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + } + + /// The JSON reader. + /// The client options for reading and writing models. + RoutineDispatchPayload IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected override RoutineDispatchPayload JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RoutineDispatchPayload)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRoutineDispatchPayload(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static UnknownRoutineDispatchPayload DeserializeUnknownRoutineDispatchPayload(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + RoutineDispatchPayloadType @type = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("type"u8)) + { + @type = new RoutineDispatchPayloadType(prop.Value.GetString()); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new UnknownRoutineDispatchPayload(@type, additionalBinaryDataProperties); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/UnknownRoutineDispatchPayload.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/UnknownRoutineDispatchPayload.cs new file mode 100644 index 000000000000..2c2a981b3c6b --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/UnknownRoutineDispatchPayload.cs @@ -0,0 +1,19 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + internal partial class UnknownRoutineDispatchPayload : RoutineDispatchPayload + { + /// Initializes a new instance of . + /// The manual dispatch payload type. + /// Keeps track of any properties unknown to the library. + internal UnknownRoutineDispatchPayload(RoutineDispatchPayloadType @type, IDictionary additionalBinaryDataProperties) : base(@type != default ? @type : "unknown", additionalBinaryDataProperties) + { + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/UnknownRoutineTrigger.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/UnknownRoutineTrigger.Serialization.cs new file mode 100644 index 000000000000..91ca06bf388e --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/UnknownRoutineTrigger.Serialization.cs @@ -0,0 +1,122 @@ +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; + +namespace Azure.AI.Projects +{ + internal partial class UnknownRoutineTrigger : RoutineTrigger, IJsonModel + { + /// Initializes a new instance of for deserialization. + internal UnknownRoutineTrigger() + { + } + + /// The data to parse. + /// The client options for reading and writing models. + protected override RoutineTrigger PersistableModelCreateCore(BinaryData data, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + using (JsonDocument document = JsonDocument.Parse(data, ModelSerializationExtensions.JsonDocumentOptions)) + { + return DeserializeRoutineTrigger(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(RoutineTrigger)} does not support reading '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + protected override BinaryData PersistableModelWriteCore(ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options, AzureAIProjectsContext.Default); + default: + throw new FormatException($"The model {nameof(RoutineTrigger)} does not support writing '{options.Format}' format."); + } + } + + /// The client options for reading and writing models. + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) => PersistableModelWriteCore(options); + + /// The data to parse. + /// The client options for reading and writing models. + RoutineTrigger IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) => PersistableModelCreateCore(data, options); + + /// The client options for reading and writing models. + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// The JSON writer. + /// The client options for reading and writing models. + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + writer.WriteStartObject(); + JsonModelWriteCore(writer, options); + writer.WriteEndObject(); + } + + /// The JSON writer. + /// The client options for reading and writing models. + protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RoutineTrigger)} does not support writing '{format}' format."); + } + base.JsonModelWriteCore(writer, options); + } + + /// The JSON reader. + /// The client options for reading and writing models. + RoutineTrigger IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) => JsonModelCreateCore(ref reader, options); + + /// The JSON reader. + /// The client options for reading and writing models. + protected override RoutineTrigger JsonModelCreateCore(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + string format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(RoutineTrigger)} does not support reading '{format}' format."); + } + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeRoutineTrigger(document.RootElement, options); + } + + /// The JSON element to deserialize. + /// The client options for reading and writing models. + internal static UnknownRoutineTrigger DeserializeUnknownRoutineTrigger(JsonElement element, ModelReaderWriterOptions options) + { + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + RoutineTriggerType @type = default; + IDictionary additionalBinaryDataProperties = new ChangeTrackingDictionary(); + foreach (var prop in element.EnumerateObject()) + { + if (prop.NameEquals("type"u8)) + { + @type = new RoutineTriggerType(prop.Value.GetString()); + continue; + } + if (options.Format != "W") + { + additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); + } + } + return new UnknownRoutineTrigger(@type, additionalBinaryDataProperties); + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/UnknownRoutineTrigger.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/UnknownRoutineTrigger.cs new file mode 100644 index 000000000000..579e1528de8c --- /dev/null +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/UnknownRoutineTrigger.cs @@ -0,0 +1,19 @@ +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.AI.Projects +{ + internal partial class UnknownRoutineTrigger : RoutineTrigger + { + /// Initializes a new instance of . + /// The trigger type. + /// Keeps track of any properties unknown to the library. + internal UnknownRoutineTrigger(RoutineTriggerType @type, IDictionary additionalBinaryDataProperties) : base(@type != default ? @type : "unknown", additionalBinaryDataProperties) + { + } + } +} diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/WebSearchApproximateLocation.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/WebSearchApproximateLocation.cs index 9aaa85299538..6c14f036bd81 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/WebSearchApproximateLocation.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/WebSearchApproximateLocation.cs @@ -36,7 +36,7 @@ internal WebSearchApproximateLocation(string @type, string country, string regio } /// The type of location approximation. Always `approximate`. - internal string Type { get; } = "approximate"; + public string Type { get; } = "approximate"; /// Gets or sets the Country. public string Country { get; set; } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/WebSearchConfiguration.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/WebSearchConfiguration.cs index 6e2c2f9cdb2c..831bbbf55a5f 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/WebSearchConfiguration.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/WebSearchConfiguration.cs @@ -38,9 +38,9 @@ internal WebSearchConfiguration(string projectConnectionId, string instanceName, } /// Project connection id for grounding with bing custom search. - public string ProjectConnectionId { get; } + public string ProjectConnectionId { get; set; } /// Name of the custom configuration instance given to config. - public string InstanceName { get; } + public string InstanceName { get; set; } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/WebSearchTool.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/WebSearchTool.Serialization.cs index a32a007a4575..ae87d1d95781 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/WebSearchTool.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/WebSearchTool.Serialization.cs @@ -96,6 +96,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsCollectionDefined(ToolConfigs)) + { + writer.WritePropertyName("tool_configs"u8); + writer.WriteStartObject(); + foreach (var item in ToolConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } if (Optional.IsDefined(CustomSearchConfiguration)) { writer.WritePropertyName("custom_search_configuration"u8); @@ -135,6 +146,7 @@ internal static WebSearchTool DeserializeWebSearchTool(JsonElement element, Mode WebSearchToolSearchContextSize? searchContextSize = default; string name = default; string description = default; + IDictionary toolConfigs = default; WebSearchConfiguration customSearchConfiguration = default; foreach (var prop in element.EnumerateObject()) { @@ -182,6 +194,20 @@ internal static WebSearchTool DeserializeWebSearchTool(JsonElement element, Mode description = prop.Value.GetString(); continue; } + if (prop.NameEquals("tool_configs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, ToolConfig.DeserializeToolConfig(prop0.Value, options)); + } + toolConfigs = dictionary; + continue; + } if (prop.NameEquals("custom_search_configuration"u8)) { if (prop.Value.ValueKind == JsonValueKind.Null) @@ -204,6 +230,7 @@ internal static WebSearchTool DeserializeWebSearchTool(JsonElement element, Mode searchContextSize, name, description, + toolConfigs ?? new ChangeTrackingDictionary(), customSearchConfiguration); } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/WebSearchTool.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/WebSearchTool.cs index dea8399132c4..872716ed7cb6 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/WebSearchTool.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/WebSearchTool.cs @@ -13,6 +13,7 @@ internal partial class WebSearchTool : InternalTool /// Initializes a new instance of . public WebSearchTool() : base(ToolType.WebSearch) { + ToolConfigs = new ChangeTrackingDictionary(); } /// Initializes a new instance of . @@ -23,17 +24,23 @@ public WebSearchTool() : base(ToolType.WebSearch) /// High level guidance for the amount of context window space to use for the search. One of `low`, `medium`, or `high`. `medium` is the default. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// /// /// The project connections attached to this tool. There can be a maximum of 1 connection /// resource attached to the tool. /// - internal WebSearchTool(ToolType @type, IDictionary additionalBinaryDataProperties, WebSearchToolFilters filters, WebSearchApproximateLocation userLocation, WebSearchToolSearchContextSize? searchContextSize, string name, string description, WebSearchConfiguration customSearchConfiguration) : base(@type, additionalBinaryDataProperties) + internal WebSearchTool(ToolType @type, IDictionary additionalBinaryDataProperties, WebSearchToolFilters filters, WebSearchApproximateLocation userLocation, WebSearchToolSearchContextSize? searchContextSize, string name, string description, IDictionary toolConfigs, WebSearchConfiguration customSearchConfiguration) : base(@type, additionalBinaryDataProperties) { Filters = filters; UserLocation = userLocation; SearchContextSize = searchContextSize; Name = name; Description = description; + ToolConfigs = toolConfigs; CustomSearchConfiguration = customSearchConfiguration; } @@ -52,6 +59,13 @@ internal WebSearchTool(ToolType @type, IDictionary additiona /// Optional user-defined description for this tool or configuration. public string Description { get; set; } + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + public IDictionary ToolConfigs { get; } + /// /// The project connections attached to this tool. There can be a maximum of 1 connection /// resource attached to the tool. diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/WorkIQPreviewTool.Serialization.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/WorkIQPreviewTool.Serialization.cs index 48caccb47b22..c2c513e4f771 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/WorkIQPreviewTool.Serialization.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/WorkIQPreviewTool.Serialization.cs @@ -88,6 +88,17 @@ protected override void JsonModelWriteCore(Utf8JsonWriter writer, ModelReaderWri writer.WritePropertyName("description"u8); writer.WriteStringValue(Description); } + if (Optional.IsCollectionDefined(ToolConfigs)) + { + writer.WritePropertyName("tool_configs"u8); + writer.WriteStartObject(); + foreach (var item in ToolConfigs) + { + writer.WritePropertyName(item.Key); + writer.WriteObjectValue(item.Value, options); + } + writer.WriteEndObject(); + } } /// The JSON reader. @@ -120,6 +131,7 @@ internal static WorkIQPreviewTool DeserializeWorkIQPreviewTool(JsonElement eleme string projectConnectionId = default; string name = default; string description = default; + IDictionary toolConfigs = default; foreach (var prop in element.EnumerateObject()) { if (prop.NameEquals("type"u8)) @@ -142,12 +154,32 @@ internal static WorkIQPreviewTool DeserializeWorkIQPreviewTool(JsonElement eleme description = prop.Value.GetString(); continue; } + if (prop.NameEquals("tool_configs"u8)) + { + if (prop.Value.ValueKind == JsonValueKind.Null) + { + continue; + } + Dictionary dictionary = new Dictionary(); + foreach (var prop0 in prop.Value.EnumerateObject()) + { + dictionary.Add(prop0.Name, ToolConfig.DeserializeToolConfig(prop0.Value, options)); + } + toolConfigs = dictionary; + continue; + } if (options.Format != "W") { additionalBinaryDataProperties.Add(prop.Name, BinaryData.FromString(prop.Value.GetRawText())); } } - return new WorkIQPreviewTool(@type, additionalBinaryDataProperties, projectConnectionId, name, description); + return new WorkIQPreviewTool( + @type, + additionalBinaryDataProperties, + projectConnectionId, + name, + description, + toolConfigs ?? new ChangeTrackingDictionary()); } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/Models/WorkIQPreviewTool.cs b/sdk/ai/Azure.AI.Projects/src/Generated/Models/WorkIQPreviewTool.cs index 31e2c94472a3..1bdf684cc186 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/Models/WorkIQPreviewTool.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/Models/WorkIQPreviewTool.cs @@ -18,6 +18,7 @@ public WorkIQPreviewTool(string projectConnectionId) : base(ToolType.WorkIqPrevi Argument.AssertNotNull(projectConnectionId, nameof(projectConnectionId)); ProjectConnectionId = projectConnectionId; + ToolConfigs = new ChangeTrackingDictionary(); } /// Initializes a new instance of . @@ -26,20 +27,33 @@ public WorkIQPreviewTool(string projectConnectionId) : base(ToolType.WorkIqPrevi /// The ID of the WorkIQ project connection. /// Optional user-defined name for this tool or configuration. /// Optional user-defined description for this tool or configuration. - internal WorkIQPreviewTool(ToolType @type, IDictionary additionalBinaryDataProperties, string projectConnectionId, string name, string description) : base(@type, additionalBinaryDataProperties) + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + internal WorkIQPreviewTool(ToolType @type, IDictionary additionalBinaryDataProperties, string projectConnectionId, string name, string description, IDictionary toolConfigs) : base(@type, additionalBinaryDataProperties) { ProjectConnectionId = projectConnectionId; Name = name; Description = description; + ToolConfigs = toolConfigs; } /// The ID of the WorkIQ project connection. - public string ProjectConnectionId { get; } + public string ProjectConnectionId { get; set; } /// Optional user-defined name for this tool or configuration. public string Name { get; set; } /// Optional user-defined description for this tool or configuration. public string Description { get; set; } + + /// + /// Per-tool configuration map. Keys are tool names or `*` (catch-all default). + /// Resolution order: exact tool name match takes priority over `*`. + /// Unknown tool names are silently ignored at runtime. + /// + public IDictionary ToolConfigs { get; } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ProjectEvaluators.RestClient.cs b/sdk/ai/Azure.AI.Projects/src/Generated/ProjectEvaluators.RestClient.cs index 64cd9915ed54..f740a5e41fbb 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ProjectEvaluators.RestClient.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/ProjectEvaluators.RestClient.cs @@ -193,5 +193,57 @@ internal PipelineMessage CreateUpdateVersionRequest(string name, string version, message.Apply(options); return message; } + + internal PipelineMessage CreateStartPendingUploadRequest(string name, string version, BinaryContent content, string foundryFeatures, RequestOptions options) + { + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/evaluators/", false); + uri.AppendPath(name, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(version, true); + uri.AppendPath("/startPendingUpload", false); + if (_apiVersion != null) + { + uri.AppendQuery("api-version", _apiVersion, true); + } + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier200); + PipelineRequest request = message.Request; + if (foundryFeatures != null) + { + request.Headers.Set("Foundry-Features", foundryFeatures); + } + request.Headers.Set("Content-Type", "application/json"); + request.Headers.Set("Accept", "application/json"); + request.Content = content; + message.Apply(options); + return message; + } + + internal PipelineMessage CreateGetCredentialsRequest(string name, string version, BinaryContent content, string foundryFeatures, RequestOptions options) + { + ClientUriBuilder uri = new ClientUriBuilder(); + uri.Reset(_endpoint); + uri.AppendPath("/evaluators/", false); + uri.AppendPath(name, true); + uri.AppendPath("/versions/", false); + uri.AppendPath(version, true); + uri.AppendPath("/credentials", false); + if (_apiVersion != null) + { + uri.AppendQuery("api-version", _apiVersion, true); + } + PipelineMessage message = Pipeline.CreateMessage(uri.ToUri(), "POST", PipelineMessageClassifier200); + PipelineRequest request = message.Request; + if (foundryFeatures != null) + { + request.Headers.Set("Foundry-Features", foundryFeatures); + } + request.Headers.Set("Content-Type", "application/json"); + request.Headers.Set("Accept", "application/json"); + request.Content = content; + message.Apply(options); + return message; + } } } diff --git a/sdk/ai/Azure.AI.Projects/src/Generated/ProjectEvaluators.cs b/sdk/ai/Azure.AI.Projects/src/Generated/ProjectEvaluators.cs index d8ccf5c6204e..7910f08a8115 100644 --- a/sdk/ai/Azure.AI.Projects/src/Generated/ProjectEvaluators.cs +++ b/sdk/ai/Azure.AI.Projects/src/Generated/ProjectEvaluators.cs @@ -457,5 +457,189 @@ public virtual async Task UpdateVersionAsync(string name, string v using PipelineMessage message = CreateUpdateVersionRequest(name, version, content, options); return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); } + + /// + /// [Protocol Method] Start a new or get an existing pending upload of an evaluator for a specific version. + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The specific version id of the EvaluatorVersion to operate on. + /// The content to send as the body of the request. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// The request options, 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 ClientResult StartPendingUpload(string name, string version, BinaryContent content, string foundryFeatures = default, RequestOptions options = null) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(content, nameof(content)); + + using PipelineMessage message = CreateStartPendingUploadRequest(name, version, content, foundryFeatures, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); + } + + /// + /// [Protocol Method] Start a new or get an existing pending upload of an evaluator for a specific version. + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The specific version id of the EvaluatorVersion to operate on. + /// The content to send as the body of the request. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// The request options, 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 StartPendingUploadAsync(string name, string version, BinaryContent content, string foundryFeatures = default, RequestOptions options = null) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(content, nameof(content)); + + using PipelineMessage message = CreateStartPendingUploadRequest(name, version, content, foundryFeatures, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + } + + /// Start a new or get an existing pending upload of an evaluator for a specific version. + /// + /// The specific version id of the EvaluatorVersion to operate on. + /// The pending upload request parameters. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// The cancellation token that can be used to cancel the operation. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + public virtual ClientResult StartPendingUpload(string name, string version, PendingUploadConfiguration pendingUploadRequest, FoundryFeaturesOptInKeys? foundryFeatures = default, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(pendingUploadRequest, nameof(pendingUploadRequest)); + + ClientResult result = StartPendingUpload(name, version, pendingUploadRequest, foundryFeatures?.ToSerialString(), cancellationToken.ToRequestOptions()); + return ClientResult.FromValue((PendingUploadResult)result, result.GetRawResponse()); + } + + /// Start a new or get an existing pending upload of an evaluator for a specific version. + /// + /// The specific version id of the EvaluatorVersion to operate on. + /// The pending upload request parameters. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// The cancellation token that can be used to cancel the operation. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + public virtual async Task> StartPendingUploadAsync(string name, string version, PendingUploadConfiguration pendingUploadRequest, FoundryFeaturesOptInKeys? foundryFeatures = default, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(pendingUploadRequest, nameof(pendingUploadRequest)); + + ClientResult result = await StartPendingUploadAsync(name, version, pendingUploadRequest, foundryFeatures?.ToSerialString(), cancellationToken.ToRequestOptions()).ConfigureAwait(false); + return ClientResult.FromValue((PendingUploadResult)result, result.GetRawResponse()); + } + + /// + /// [Protocol Method] Get the SAS credential to access the storage account associated with an Evaluator version. + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The specific version id of the EvaluatorVersion to operate on. + /// The content to send as the body of the request. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// The request options, 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 ClientResult GetCredentials(string name, string version, BinaryContent content, string foundryFeatures = default, RequestOptions options = null) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(content, nameof(content)); + + using PipelineMessage message = CreateGetCredentialsRequest(name, version, content, foundryFeatures, options); + return ClientResult.FromResponse(Pipeline.ProcessMessage(message, options)); + } + + /// + /// [Protocol Method] Get the SAS credential to access the storage account associated with an Evaluator version. + /// + /// + /// This protocol method allows explicit creation of the request and processing of the response for advanced scenarios. + /// + /// + /// + /// + /// The specific version id of the EvaluatorVersion to operate on. + /// The content to send as the body of the request. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// The request options, 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 GetCredentialsAsync(string name, string version, BinaryContent content, string foundryFeatures = default, RequestOptions options = null) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(content, nameof(content)); + + using PipelineMessage message = CreateGetCredentialsRequest(name, version, content, foundryFeatures, options); + return ClientResult.FromResponse(await Pipeline.ProcessMessageAsync(message, options).ConfigureAwait(false)); + } + + /// Get the SAS credential to access the storage account associated with an Evaluator version. + /// + /// The specific version id of the EvaluatorVersion to operate on. + /// The credential request parameters. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// The cancellation token that can be used to cancel the operation. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + public virtual ClientResult GetCredentials(string name, string version, EvaluatorCredentialRequest credentialRequest, FoundryFeaturesOptInKeys? foundryFeatures = default, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(credentialRequest, nameof(credentialRequest)); + + ClientResult result = GetCredentials(name, version, credentialRequest, foundryFeatures?.ToSerialString(), cancellationToken.ToRequestOptions()); + return ClientResult.FromValue((DatasetCredential)result, result.GetRawResponse()); + } + + /// Get the SAS credential to access the storage account associated with an Evaluator version. + /// + /// The specific version id of the EvaluatorVersion to operate on. + /// The credential request parameters. + /// A feature flag opt-in required when using preview operations or modifying persisted preview resources. + /// The cancellation token that can be used to cancel the operation. + /// , or is null. + /// or is an empty string, and was expected to be non-empty. + /// Service returned a non-success status code. + public virtual async Task> GetCredentialsAsync(string name, string version, EvaluatorCredentialRequest credentialRequest, FoundryFeaturesOptInKeys? foundryFeatures = default, CancellationToken cancellationToken = default) + { + Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(version, nameof(version)); + Argument.AssertNotNull(credentialRequest, nameof(credentialRequest)); + + ClientResult result = await GetCredentialsAsync(name, version, credentialRequest, foundryFeatures?.ToSerialString(), cancellationToken.ToRequestOptions()).ConfigureAwait(false); + return ClientResult.FromValue((DatasetCredential)result, result.GetRawResponse()); + } } } diff --git a/sdk/ai/Azure.AI.Projects/tsp-location.yaml b/sdk/ai/Azure.AI.Projects/tsp-location.yaml index f7f8d7f3365a..d049eca00d46 100644 --- a/sdk/ai/Azure.AI.Projects/tsp-location.yaml +++ b/sdk/ai/Azure.AI.Projects/tsp-location.yaml @@ -1,5 +1,5 @@ directory: specification/ai-foundry/data-plane/Foundry -commit: b4de814e0b475880111db5c641b78ef85c8a3157 +commit: d70b666663d37cc99887311c19996b3ae29ce927 repo: Azure/azure-rest-api-specs emitterPackageJsonPath: eng/http-client-csharp-emitter-package.json entrypointFile: client.csharp.tsp